Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Tablebase exits?

Author: Dave Gomboc

Date: 12:40:25 05/31/99

Go up one level in this thread


On May 31, 1999 at 14:38:11, James T. Walker wrote:

>On May 31, 1999 at 12:20:12, Dave Gomboc wrote:
>
>>On May 31, 1999 at 08:51:38, James T. Walker wrote:
>>
>>>Hello David,
>>>In the above code is the case where there are several "Last moves" in the EGTB
>>>that are say "Mate in 13" covered?  You seem to say you have it covered where
>>>the other moves are higher mates like "Mate in 14" but what keeps the program
>>>from jumping from one mate in 13 to another mate in 13 since it's not worse?
>>>Jim Walker
>>
>>It has to be better.
>>
>>When you've already found a "mate in n", your next position must be a "mate in
>>n-1".  Otherwise, the first position wasn't actually a mate in n.
>>
>>BTW, I didn't examine the code.
>>
>>Dave
>
>Hello Dave,
>Please understand, I'm not a programmer so my questions may sound silly.  The
>question I'm trying to clear up is when the program finds a mate in 13 but the
>mate in 12 is only found by having the next tabelbase (which is missing).  Now
>you have to force yourself to go to a score of say +9.3 instead of mate in 12
>because the tabelbase is missing.  He seemed to be saying there was only two
>possiblities, 1.  when the tablebase is available and 2 when only other moves
>were mate in 14 (In my example).  This seemed to ignore the possibility of
>having multiple mate in 13 positions in the tablebase.  So my question was about
>how do you avoid the other mate in 13 positions since they are not worse than
>the one you are in but only equal.  I ask this because I saw a program play
>several moves at the mate in 13 level before dropping out of the tablebase.  I'm
>not sure what caused it to finally drop out except maybe it was in danger of 3
>times rep which would make dropping out preferable to staying at mate in 13 and
>taking the draw.  I'm just trying to figure out if I missed something in the
>explanation.
>Jim Walker

I didn't think your question was silly.  My response was probably too brief.

Okay, the idea is to make progress at every move towards the checkmate... and
let's say that we have a mate in 14.  So we play a move, the opponent responds.
Now we must have a mate in 13, but if we don't have the proper tablebase (let's
say you need to promote a pawn to achieve this mate in 13), then without the
patch code it will just think "gee, well, I can only get +10.2 if I promote, but
if I don't promote, I still will have a mate in 14."  So it won't promote.  And
the move after that, "gee, well, I can only get +10.2 if I promote, but if I
don't promote, I still will have a mate in 14."  And this will keep happening...
like you say, it would keep shuffling around until it managed to actually find a
shorter mate after a promotion, or more likely, until the 50-move rule got
close, when it would think everything but promoting leads to a draw, so it
decides to promote and take the +10 score.

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".  Basically, when you know there is a mate in 13 because
your last score was a mate in 14, but you can't find a mate in 13 in the
tablebases that you have, then it must be because there is a promotion or
capture that takes you out of the tablebase into a one of the ones that you are
missing.  So, the idea is to check out all of those promotions and captures by
searching them... and if one looks quite winning, just go ahead and play it.

Dave



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.