Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Storage idea (maybe Mr Corbit is interested)

Author: Angrim

Date: 13:11:32 10/23/01

Go up one level in this thread


On October 23, 2001 at 13:35:53, Dann Corbit wrote:

>On October 23, 2001 at 02:17:15, Nino wrote:
>[snip]
>>Hi Angrim,
>>
>>How are egtb's done if the position is not stored? (just curious)
>>Anyway I really dont know much about egtb's but I do know a little bit about
>>storing of epd positions and that the current method I think requires 192 bits
>>per position.  I have just put together a table using Les's concept but for
>>storing chess positions.  The table follows:
>>
>>        Bits
>>Square  Saved   % saved
>>
>>1x3	50	78.1
>>1x4	49	76.6
>>1x5	48	75.0
>>1x6	47	73.4
>>1x7	46	71.9
>>1x8	45	70.3
>>2x3	47	73.4
>>2x4	45	70.3
>>2x5	43	67.2
>>2x6	41	64.1
>>2x7	39	60.9
>>2x8	37	57.8
>>3x1	50	78.1
>>3x2	47	73.4
>>3x3	44	68.8
>>3x4	41	64.1
>>3x5	38	59.4
>>3x6	35	54.7
>>3x7	32	50.0
>>3x8	29	45.3
>>4x1	49	76.6
>>4x2	45	70.3
>>4x3	41	64.1
>>4x4	37	57.8
>>4x5	33	51.6
>>4x6	29	45.3
>>4x7	25	39.1
>>4x8	21	32.8
>>5x1	48	75.0
>>5x2	43	67.2
>>5x3	38	59.4
>>5x4	33	51.6
>>5x5	28	43.8
>>5x6	23	35.9
>>5x7	18	28.1
>>5x8	13	20.3
>>6x1	47	73.4
>>6x2	41	64.1
>>6x3	35	54.7
>>6x4	29	45.3
>>6x5	23	35.9
>>6x6	17	26.6
>>6x7	11	17.2
>>6x8	 5	 7.8
>>7x1	46	71.9
>>7x2	39	60.9
>>7x3	32	50.0
>>7x4	25	39.1
>>7x5	18	28.1
>>7x6	11	17.2
>>7x7	 4	 6.3
>>7x8	-3	-4.7
>>8x1	45	70.3
>>8x2	37	57.8
>>8x3	29	45.3
>>8x4	21	32.8
>>8x5	13	20.3
>>8x6	 5	 7.8
>>8x7	-3	-4.7
>>8x8    -11     -17.2
>>
>>It is interesting to see the gains using this method.  Remember to throw out the
>>7x8, 8x7 and 8x8 sets.  Now those numbers might be interesting to ponder when it
>>comes to storing chess positions.  Unless my math is wrong can someone tell me
>>if they see anything wrong with this approach?  Mr Corbit??
>
>I think it is a good idea, which compresses the 64 bit board image pretty well.
>My problem is I don't really know what Eugene does internally.  To me, the
>tablebase is just a black box that spits out answers.  Probably Eugene can
>address whether this notion will save anything or not.

Here is a simplified version of the algo for calculating the index into
the tablebase file.  This index could be used to store board positions,
since the calculation is reversible.
1. use the filename or a few bytes at the start of the file to store which
pieces are present.
2. for each piece, calculate that pieces index from 0-63,
  notation i[N] is index of piece #N
3. for 3 piece table, index is i[1]*64*64+i[2]*64+i[3]

This is a number between 0 and 63*64*64+63*64+63=262143 so could
be stored in 18 bits.  Note that this is used as an index into the file
and so does not need to be stored at all. Also note that the actual
algo used takes board symetries and legal positions for kings into
account, and so is much more efficient.

Angrim



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.