root at jennifer-unix.dyn.ml.org
Sun Oct 26 19:25:43 EST 1997
On Thu, 23 Oct 1997, Sebastian Kuzminsky wrote:
> jeff at delta.com (Jeff Woods) wrote:
> There are some fancy high-pack schemes, but a rough BOTE calculation
> will do for now.
> There are 64 squares, so it takes 6 bits to uniquely
> identify a square. There are sixteen pieces and sixteen pawns on the
> board. If each one has a 6-bit square identifier, then thats 32 * 6 =
> 192 bits. The 16 pawns may have been promoted to any of four pieces, or
> be un-promoted in which case they may be allowed to en-passant right or
> left or not at all, that's seven options for another another 3 bits
> each, 16 * 3 = 48. Finally, both sides may be allowed to castle long or
> short, 2 bits per side, 2 * 2 = 4 bits. What did i forget?
1) Encoding for captured peices.
2) Whose turn it is.
3) You can deduce the en passant allowablity from the layout (I think -- I'm
not all that much of a chess player.)
I would do the entire board as a 64*64 array, and have each position marked
by what peice is there (0 for none, high bit is color). Then do a RLE on
the whole thing. Then follow with overall status
> That's 192 + 48 + 4 = 244 bits, or 30.5 bytes.
Didn't check mine, as it is varable-length.
-=- James Mastros
Current Bovine Rate: ~5894.11 mkeys/sec
If Keys were dollars, we could pay off the U.S.
National Debt in 14.70 minutes.
-=- http://rc5stats.distributed.net/statbar.html (Tue Oct 21 1997)
To unsubscribe, send email to majordomo at llamas.net with 'unsubscribe rc5' in the body.
More information about the rc5