Mapping of squares for BitBoard.

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Gerd Isenberg
Posts: 2250
Joined: Wed Mar 08, 2006 8:47 pm
Location: Hattingen, Germany

Re: Mapping of squares for BitBoard.

Post by Gerd Isenberg »

bob wrote:Are there any complete magic tables posted anywhere? IE with the best so far found???
I don't know - since I don't use magic bitboards. But you should combine any vector of magics with the few denser found so far inside your initialization code, considering magic and number of bits required for an index of an individual square.

Denser magics with less bits (n-1) than the number of relevant occupied bits required were found only for a small subset of squares, to halve the table space for those squares. 13 rook squares and 23 bishop squares so far. Biggest individual gain for rook are squares 56 and 63 with 11 instead of 12 bit indices. I don't know if people still try to find magics for denser tables, but probably they don't exist and one has to stay with 12 bits i.e. for rook squares 0 and 7.