Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: How to handle EGTB stalemates

Author: Dieter Buerssner

Date: 13:30:58 03/02/03

Go up one level in this thread


On March 02, 2003 at 16:11:32, Tom Likens wrote:

>Whenever I store an EXACT hash position I also store a move along
>with it.

When you are mated (in "normal" search), don't you store this in the hash? (I
do). When you are stalemated (in "normal" search), don't you store this in the
hash? In both cases, you don't have a hash move. I store "a1-a1" in either case
as best move (which can mean: no move available, or move unknown).

>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.

Correct. However, I cannot understand why you need a move. The above two
examples will not have a move either, but are perfect candidates for an exact
score.

>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.

Is it perhaps just an initialization problem? You didn't store a move, and a
move from an earlier entry is left? Just clear the move when you hit TBs, or use
an idea like further down.

>I'm not
>sure how disallowing root tablebase cutoffs fixes the problem.

My comment about the root possibly was confusing. Only at the root, you need to
return a move, to make an engine work. Deeper in the tree, a score is enough. A
move is nice, when available (to have a PV). The search will work perfectly
without a move deeper in the tree (of course, there are more subtelties, like
move ordering).

>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 think, not.

>I'm curious, in Yace do you store a hash move for EXACT and LOWER
>bound hash matches.

When I have a move available - I store it - yes. Even for upperbounds, too (the
best "fail soft move"). When none is available, I flag this (typically by
"a1-a1").

>Do you also store a hash move when you encounter
>a tablebase draw?

Yes and no. I store a special move (any never legal move would do, like a1-e2),
to flag this position as TB hit. But the reason is not to have a move, but
rather to know, that the position is from TBs, so that later the score will be
good for a cutoff independent of the depth/draft. Storing a1a1 would also work,
but would make TBs a little bit less efficient (or would need to store the "this
is from TB"-info somwhere else in the hash entry).

Regards,
Dieter





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.