▲ | cabirum 8 hours ago | |||||||||||||
Piece type and color fit in 4 bits. So, either a fixed-length encoding of the whole board, 64 * (4 bits) = 256 bits = 32 bytes. Or, sparse variable length encoding of pieces only, 6 bits to index each of 64 squares, = 10 bits * piece count. E.g. initial position takes 32*10 = 320 bits or 40 bytes. | ||||||||||||||
▲ | mcherm 8 hours ago | parent [-] | |||||||||||||
That's a fine upper bound, but it doesn't minimize but usage since it also can represent illegal positions. | ||||||||||||||
|