Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: illegal positions in nalimov tablebases

Author: Guido

Date: 13:08:52 02/04/05

Go up one level in this thread


On February 04, 2005 at 03:41:01, Uri Blass wrote:

>I find that there are some illegal positions in nalimov tablebases like the
>following position because there is no possible last move of white.
>
>[D]3K4/8/8/3R4/3kR3/8/8/8 b - - 0 1
>
>Note that the following position is legal(last move of white could be under
>promotion to a rook)
>[D]kR1K4/8/R7/8/8/8/8/8 b - - 0 1
>
>I wonder if somebody cared to count the number of legal positions with 6 or less
>pieces.

My program, besides of generating TBs, does also this calculation for any chess
endings (without generating the correspondent TB) adding to the normal controls
on the illegality of a position also the check of existence of at least one
preceding move of the opponent with or without capture or promotion (in the
reality they are "resurrections" or "depromotions").
This criterion is not mathematically exact (the only exact criterion is to find
one move sequence starting from the initial position!), but eliminates a large
part of illegal positions. This elimination can be useful only to reduce the
time for TBs generation, because it reduces the positions to calculate,
but in practice this check costs much more, so normally I don't use this
possibility.
A banal example of illegal position in KPK (black to move) is when the white
pawn is for instance in a2 and the black king in b3 under check, and all similar
positions.

Eliminating illegal positions doesn't reduce the dimensions of the files,
because the main problem is the indexing of the positions and it would be very
difficult, if not practically impossible, to find a mathematical rule (also with
the help of numerical tables) that indexes only legal positions.
Only in the case where the legal positions are a very small percentage of the
total, it would be possible to codify the result of each position together with
an hash number that identify such position. This could be (in future) the case
in checkers where the initial composition (12 white + 12 black men) has only
about 9-10 million of legal positions (once I computed the exact number)
instead of a much larger number of possible but not legal positions.

In normal chess TBs, in order to reducing the dimensions of the files, it is
convenient that the index itself identifies the position.

Ciao
Guido



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.