Author: Andrew Dados
Date: 06:32:49 05/17/99
Go up one level in this thread
On May 17, 1999 at 01:36:20, Eugene Nalimov wrote: >Earlier I wrote how you can pack locations of both kings and castling status in >12 bits. In your schema you can do exactly the same - store not 10, but 12 bits >in header, and don't store squares of the knigs in the bitmap. Then you don't >need to store one extra bit that is castling status in the header. > >Eugene > Doh I looked up your post and just didn't think I can simply skip those king position bits... Thanks for pointing that out! And one more bit saving: throwing that last bit of piece_location bitmap (was 64th; without kings will be 62nd). Here's how (as usual - worse case: 32 pieces, no EP, no castling): - if total piece count (up to last marked location in bitmap) + kings equals 32 then we don't need that bit anyway - if total so far is 31 or less then if last square (either on first or last rank; make it a1) is empty we put there 'dummy' pawn to mark it (we have room having only 29 pieces other then kings). Any other piece is a 'true piece'. As usual with squeezing things get more and more tricky and 'not elegant'. Anyhow: total count now is down to 21 bytes 6 bits for position with no 50-move counter nor repetition mark (they both are useless when in game - real move history takes precedence, anyway. Also useless when starting from FEN,,, ). Now time to squeeze some carrot juice here... -regards- Andrew
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.