Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: draw by repetition and hash tables

Author: Pat King

Date: 00:54:36 07/26/98

Go up one level in this thread



On July 24, 1998 at 06:14:04, Robert Hyatt wrote:


>
>
>There are two issues:
>
>(1) *all* hash table scores are technically wrong almost all the time.  Because
>*none* include path information in the key, yet most include path information
>in the score.  Examples include repetition and 50-move draws.

I have a solution to this problem, which may only work for my implementation,
but here goes... I implement undo by storing a stack of positions for the entire
game. It wouldn't be hard for me to modify this to include the current variation
being considered. Then, when the terminal position is reached, you...
  a) Examine the game history for draws by repetition or 50 moves. If found,
 return 0, else...
  b) Consult hash. If found, return result, else...
  c) Call static evaluator (or qsearch) store result in hash, and return result.

Thus stalemates and mates would get stored in the hash, but other draws
wouldn't. You only need to examine the history back to the last capture or pawn
move, so adding the history search isn't terribly expensive, although whether
it's worth the effort in terms of rating points is another matter.

>
>(2) does the error in (1) affect the program?  Hard to say.  But everyone uses
>hashing, and everyone therefore ignores the errors that crop up, most of the
>time with no ill effects.  I always have, for example.  Note that not storing
>draw scores in the hash table only cures one class of error, but not the main
>ones in (1) above...

I think this scheme addresses (1) nicely, but I haven't tried it yet. I'll have
to see how expensive the draw search really is.

Pat King



This page took 0.01 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.