Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: How to handle EGTB stalemates

Author: Tom Likens

Date: 13:11:32 03/02/03

Go up one level in this thread


On March 02, 2003 at 15:42:47, Dieter Buerssner wrote:

>On March 02, 2003 at 12:15:19, Tom Likens wrote:
>
>>I'm probably missing something trivial
>
>Me, too :-)
>
>>so any thoughts and/or comments
>>would be welcome.
>
>Why do you need to know, whether it is stalemate or not? With TBs I never
>bothered about this. Just don't allow cutoffs from TBs in the root position, and
>everything will work automatically (either your "normal" stalemate detection
>will come in, or you will find a drawing move).
>
>Regards,
>Dieter

Hello Dieter,

Whenever I store an EXACT hash position I also store a move along
with it.  For normal draws no big deal, just store any move that doesn't
blow the draw.  But for stalemates, there is no move to store because the
game is over.  I found this after I added some additional debug scaffolding
that checked the validity of the stored hash move whenever a hash match of
an EXACT or LOWER BOUND was found.  For these type of matches my program
expects the stored move to be valid for the current position.

The stalemates that were causing the problem were *not* occurring at the
root, but were instead deep in the tree.  Invalid (i.e. illegal) moves
were being stored in the hash table for the current position.  I'm not
sure how disallowing root tablebase cutoffs fixes the problem.  If you
access the tablebases deeper in the tree, and the position converts
into a tablebase hit, you could still encounter a stalemate and run into
the problem.

I'm curious, in Yace do you store a hash move for EXACT and LOWER
bound hash matches.  Do you also store a hash move when you encounter
a tablebase draw?

Actually, though I think you've given me an idea how to fix this.
Since I update the PV after a tablebase hit, I need to enumerate through
the moves.  If there are no moves available it must be stalemate.  The
cost of this should be minimal, since I'm already doing most of the
work anyway.

regards,
--tom




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.