Computer Chess Club Archives


Search

Terms

Messages

Subject: How to handle EGTB stalemates

Author: Tom Likens

Date: 09:15:19 03/02/03



I ran across an interesting bug the other day that I thought I'd share
and also get some advice on.  I hash the scores and moves that I get
from the tablebases during a search.  For a normal draw (i.e. a non-
stalemate draw) I simply store any move that maintains the draw in both
the hash table and the principal variation.

The problem I ran into is that when a stalemate is encountered, there is
no move to store.  This has the potential to corrupt the hash table.
Unfortunately, since the tablebase only returns a 0 for a draw, there is
no easy way to differentiate between the two types of draws.  I'm curious
how other people handle this problem.  I can think of a couple of
solutions, but none that are completely satisfactory.

1. Whenever a draw is returned from the tablebase verify that it is
   or is not a stalemate.  If it is a stalemate, skip the storage step.
   This is accurate and works, but it's slow.

2. If a draw score is returned, check if the side with the right to move
   has only a lone king.  If yes, then also skip the storage of the move.
   This is faster, but it is not completely accurate since it could miss
   a variety of stalemate positions.

I'm probably missing something trivial so any thoughts and/or comments
would be welcome.

regards,
--tom



This page took 0.03 seconds to execute

Last modified: Thu, 07 Jul 11 08:48:38 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.