Author: Dieter Buerssner
Date: 14:33:59 05/04/04
Go up one level in this thread
On May 04, 2004 at 14:07:55, Chris Hull wrote: >Does anyone know of a way to store any legal chess position in 160 bits? I don't know it. But 175 bit could be rather efficently used in the following way: 12 bit KK-pos including castling rights 1) 62 bit "occupation vector" for the remaining 62 squares 100 bit 29 pieces + ep-square 2) 1 bit side to move --- 175 1) There are 3612 legal KK positions. 12 bit is good for 4096 states. This is just enough, to also enumerate the castling rights (only few of the 3612 positions can have a castling possibility. 2) Only 29 pieces are needed - we know the 2 Ks already, when there are 32 pieces on the board, we always know what the last piece will be, given the first 31 pieces. 1 piece can at most have 10 states: w/b PNBRK. 3 pieces 1000 states - this almost exactly fits into 10 bits (1024). ep-square can have 9 states (not possible, a-h) - so it is almost like a piece. 30 pieces fit into 100 bytes. 160 bits seems tough, but not impossible. The above simple format has already much redunancy. For example in the 62 bits for the occupation, there will be always at least 30 zero bits. Positions with 31 or 30 pieces only have little "freedom" for the material constallation. ep-square could probably be hidden by encoding an otherwise illegal position. Regards, Dieter
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.