Author: Gerd Isenberg
Date: 13:36:31 03/28/05
Go up one level in this thread
On March 28, 2005 at 14:52:44, Daniel Pineo wrote: > >What is the "Expanding a quad-bitboard to 16-disjoint bitboards" used for in a >chess program? A vague idea i am playing with. A quad-bitboard is a compact 32 bytes 8*8 board representation with up to sixteen different codes per square (one vertical nibble per square). Each code, like empty square or occupied by a special piece, is represented "vertically" by four bits with same bit-index of four bitboards. Of course the issue is not a space saving alternative to board arrays, since getPiece[square] is not longer a simple memory access, but shifting, masking (anding) and oring four bitboards. The issue is a alternative for disjoint sets (max one piece per square or empty) of piece bitboards like this one with 15 codes used: 0 empty 1 whitePawns 2 whiteKnights 3 whiteBishops 4 whiteRook 5 whiteQueens 6 whiteKing 7 whiteFurtherRooks 8 --- 9 blackPawns A blackKnights B blackBishops C blackRook D blackQueens E blackKing 7 blackFurtherRooks with q0 = 1| 3| 5| 7| 9| B| D| F q1 = 2|3| 6|7| A|B| E|F q2 = 4|5|5|7| C|D|E|F q3 = 8|9|A|B|C|D|E|F and to makemove like: QuadBB board; board ^= hugeTable[hash(move)]; If no early return due to repetition or hash-hit occurs, the mentioned routine gets the empty squares and piece bitboards for further use. Quad-bitboards filling with kogge-stone is like filling with up to 15 disjoint sets. As i said - only a vague idea. Gerd
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.