Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Tablebase format

Author: Larry Coon

Date: 20:20:09 08/27/98

Go up one level in this thread


On August 22, 1998 at 14:30:15, Dan Newman wrote:

>Hi,
>    Here's something I dug up from my files: SJE's readme.tb file.
>Hope this helps.

I've now had a chance to digest it completely, and it answered
almost all my questions -- thanks again.

However, I do have a couple of questions.

SJE's doc listed specs for only a few of the existing
tablebases.  I think I can infer the pattern in the
remaining files, but I want to double check:

1. Is it safe to assume that "qsf" (queenside)and "tri"
   (a1-d1-d4 triangle) indexing are never used in the
   same tablebase file?

2. Is the order of array indexes always the reverse
   order of the piece order in the tablebase name?
   (eg: in KQRKR would they be bR, bK, wR, wQ, wK?)

3. Is the last black piece in the tablebase name
   always the one with the "tri" or "qsf" index,
   unless there's a pawn, in which case it's the
   pawn?

4. Is it true that if the last piece is a pawn the
   first index is always "qsf", otherwise it is "tri"?

So to continue with my example, for KQRKR it would be
the C array:
    signed char KQRKR[10][64][64][64][64]
with the subscripts and scanning patterns: bR = "tri",
bK = "all", wR = "all", wQ = "all" and wK = "all",
respectively.  Yes?

I have more questions about the following:

>Note that all the tablebases are constructed with White as the side with more
>material (e.g., better winning chances).  If Black is the side with better
>material, then the colors are reversed and, if any pawns are present, the
>piece positions have to be reflected across the X axis prior to indexing.

I'm unclear as to the order in which things are done here.
Let's say the following position appears:
   8/8/8/5kp1/8/6K1/8/8 w

According to this I reverse the colors and reflect across the
X axis:
   8/8/6k1/8/5KP1/8/8/8 b

and will now use the tablebase KPK.tbb.  But since the indexing
in this tablebase is "all", "tri", "all", I -now- have to
reflect about the Y axis, right?  So this gives me:
   8/8/1k6/8/1KP5/8/8/8 b

and I can now look up my value in KPK.tbb[41][13][26].  Is this
the correct process?

Thanks again,

Larry Coon



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.