Author: Angrim
Date: 15:48:18 02/13/02
Go up one level in this thread
On February 13, 2002 at 15:29:32, Russell Reagan wrote: >Today in unix class after the test I had to sit there for about an hour, so I >started thinking about computer chess. I was thinking about how you would store >positions in an endgame tablebase. Here's what I came up with, and it's >drastically more than the tablebases I downloaded on to my computer. > >This is all rough estimates, but it's still nowhere close to the actual file >size of the actual TB's. I thought, 64 squares for one king, 63 squares left for >a rook, and 42 squares left for the opposing king due to 8 squares attacked by >the other king, and 14 squares attacked by the rook. That should give us (64 x You can't rely on the rook attacking 14 squares, consider the case where the side to move has Ka2 and Ra1. Only 6 squares attacked by the rook which are not also attacked by the first king. >63 x 42) 169,344 positions. I tried to use as few bits as possible, so I went >with 6 bits for each index of each piece, for 18 bits. 18 bits x 169,344 >positions = 3,048,192 bits. 3,048,192 / 8 = 381,024 bytes. Divide by 8 again for >mirrored positions and rotations, and get 47,628 bytes. I haven't even included >the distance to mate values and we're at about 46 KB. The actual size of one of >the king + rook vs. king endgame TB is about 7 KB. > >So what am I missing? Are the TB as I have them on my computer in a compressed >format? Not only is the file compressed, but the positions are not stored in it. There is no point using 18 bits to store a position, when you know what the position was from the index into the file. Only the positions value is stored in the file. Your design was pretty good for someone who hasn't studied the currently used methods though. Angrim >Thanks, >Russell
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.