Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Tablebase exits?

Author: David Eppstein

Date: 15:38:10 05/31/99

Go up one level in this thread


On May 31, 1999 at 15:40:25, Dave Gomboc wrote:
>The hunk of code that was posted tries to get Crafty to promote sooner instead
>of diddling around.  But, you don't want to promote by mistake when it's not a
>very good idea, so it (presumably) has some logic that says "if the position I
>am promoting to seems to be not completely winning, I'd better hold off on
>promoting for a bit".

Close, but I think this is not quite accurate.
First, I didn't actually post the hunk of code, just the description of it.

But the idea is: if your tablebase says you currently have a win in 14, then it
must be because there exists some move that is a win in 13.  That move is the
right move. Any move to a win-in-14 or longer position is wrong, and repeatedly
making wrong moves will turn a win into a draw by the 50-move rule.  So you want
to maximize your chances of making the right move even when some of the
tablebases are missing.  Although you might not be able to tell which move is
right (because of the missing tablebases), you can use the remaining tablebases
to tell you that some other moves are definitely not right.

So, at the root of the search, if you're currently in a mate-in-n tablebase
position, you completely prune away any move that stays in a tablebase and isn't
mate-in-(n-1), because such a move can never be right.  If you found a
mate-in-(n-1) tablebase position, you can make that move.  But if you didn't
find a right move in the tablebase, you know that the right move must be one of
the remaining unpruned non-tablebase moves, and you can just do a search among
them.

There is no test for whether the search returns something completely winning or
not.  You just do a search on the unpruned positions and follow what it returns.

The intent is that you only remove tablebases when you trust the search to find
the right move for you.  E.g., in the example I posted, there is no need to
store the KQKN tablebase, because Crafty can always win that endgame easily
without a tablebase, and even a fairly shallow search can generally (always?)
identify the weird situations when you need to underpromote or something instead
of going into that endgame.



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.