Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Tablebase Space Indexing Improvement?

Author: Pham Hong Nguyen

Date: 17:31:37 01/29/04

Go up one level in this thread


On January 29, 2004 at 20:13:44, Ed Trice wrote:

>On January 29, 2004 at 19:59:37, Pham Hong Nguyen wrote:
>
>>>
>>
>>Just mark those positions by a special value, say, ILLEGALPOS. In my database,
>>ILLEGALPOS = 255
>>
>
>well, the procedure I had in mind is more complicated than that. Suppose in a
>given database, the maximum win length in 59 plies. That means you are using
>only integers 0-58 in the white-to-move-and-win database. So, values 59-255 can
>be used.
>
>Let's say in Position X white checks black, yet it is white to move. There can
>be  a host of arrangements where the same piece delivers the check, yet other
>pieces for that side can be at various locations on the board. You could have
>something like 62x61x60 illegal arrangments "all in  a row" depending how you
>encode your indexing function.
>
>So, you can let value 59 in your database mean 1 illegal "run" of moves. value
>60 can be 2 consecutive illegal runs. Value 61 can be 3 consecutive runs...value
>100 might be 225 consecutive runs. Value 101 could be 250, 102 = 275......200
>could be 1500, 201 = 2000, 202 = 2500, etc.
>
>The idea being, you can encode many consecutive illegal positions using only 1
>byte.
>
>This is what we do in the checkers world for creating very large databases.
>Since these are accessed in real-time to assist the search, the lookup is very
>fast. It could be the same here.
>
>Does anyone know if the Tablebases are run length encoded for illegal/impossible
>positions?

You just say about encoding but not mention about finding out a position. That
may be nightmare for your method. As I understand, instead of accessing ramdomly
any position in database (by few seeking and reading), your method requires to
read all positions from begining (too many) to get all run length codes and
compute where the position exactly is.

If you just want to compact your database, one simple implemented idea is to
separate endcoding and compressing. After generating a tablebase, use another
program to compress database in chunks (say, 8k/chunk). When you want to access
a position, compute and read appropriate chunk, uncompress and read its value.
That can help you both in saving space and accessing time.



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.