Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Dangerously stupid tablebase idea...

Author: Robert Hyatt

Date: 08:08:04 10/19/01

Go up one level in this thread


On October 19, 2001 at 01:20:38, Dann Corbit wrote:

>For pawnless and rookless tablebase files:
>
>The name of the file tells the pieces (e.g. KBBKQ)
>Side-to-move King, Bishop, Bishop
>Side-not-to-move King, Queen
>No bits needed to encode this data.
>
>Then, 5 bits for the positions of the pieces (0-63) times the 5 pieces = 25 bits


How are you doing that compression?  :)

0-63 requires 6 bits, not 5.

So you have 2^30 entries, not 2^25.  2^30 is roughly one billion.




>
>This is the key (the above 25 bits).
>So for any tablebase of this format, there are 2^25 entries.
>
>The answer is encoded as follows:
>Then the move to make (which we can encode in 8 bits -- the move number from 0
>to 255 considering the moves as sorted lexically or as output by a specific move
>generator.)


Why store moves?  We need to know how far to mate, otherwise we will know
all the moves that lead to mate, but not the one that actually takes us closer
to the mate.  We just check over and over.  Or go from mate in 30 to mate in
40 to mate in 50, etc.



>
>Then we need status:
>Won/Loss/Drawn/Broken -- > 4 states means 2 bits.
>
>That is 12 bits.  So any pawnless/rookless tablebase file will need a total of:
>12*(2^25) = 402653184 bits = 50,331,648 bytes before compression.

Make that 1.5 gigs, not 50 megs.  Due to the missing "bit" for each piece
(2^5 vs 2^6)




>
>How does this compare with a decompressed 5 piece Nalimov tablebase file?
>
>For positions with rooks or pawns, we could just use a format like the current
>one.
>
>Seems like it might be a real big win for 6,7,8 man tablebase files.  Each file
>will be exactly 5 times larger than the file one generation before it before
>compression.

Whoah.  That is a _big_ miscalcualtion.  Not 5 times larger.  32 times larger
using your 2^5.  And in reality, it must be 64 times larger when you think
about it, which is 2^6.





>
>So a 6 man tablebase file would take 250 megs before compression.
>And a 7 man tablebase file would take 1250 megs before compression.
>etc.

A few 'factors' missing.  :)





>
>Is my brain the cause of pain because the notion is insane?

Your log2() function is broken.  That is all.  :)



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.