Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Detecting Draws using a Small Hash Table?

Author: Uri Blass

Date: 06:19:20 02/20/02

Go up one level in this thread


On February 20, 2002 at 08:25:54, Steve Maughan wrote:

>The draw detection in Monarch uses a small hash table (65535 entries) to store
>the path since a pawn move or capture.  When the search finds the current
>position in the table it returns a draw score; if it's not found it store the
>hash signiture carries on searching all the child positions and when complete
>resets the hash entry to zero on exit.  This type of approach is outlined on
>Bruce Moreland's excellent web page.  It seems to work well and detects draw
>quite nicely.  However, I have been sent a game where Monarch allows a
>repetition when it is clearly winning.  Having looked at the position, Monarch
>sees the draw then 'loses' it.  Clearly this is unacceptable.  The problem crops
>up when the draw is based upon positions already played in the game.  Monarch
>usually sees the draw but since (many) other positions are also searched there
>is a high likelihood that these historic board positions will be overwritten
>with other search positions - hence Monarch loses the draw.
>
>Has anyone else had the same problem?  Any obvious solutions?

I do not use hash tables to detect repetition.

I use only the move list and the position that is currently on the board to
detect repetition.

For repetition you need even number of moves and repetition for white and for
black

Some Examples:

1)If the last moves of white are 1.a1-b1 2.b1-b2 3.b2-a1 then I can detect
repetition for white

2)If the previous moves are 1.b1-b2 2.a1-b1 3.b2-a1
I need to look at the position on the board
If the pieces at b1 and a1 are the same there is repetition
otherwise there is no repetition and the moves could be
Qb1-b2,Ra1-b1 Qb2-a1 that means that the queen and the rook traded squares.

I am not going to release my source code for it and it can be a good exercise in
programming to write a program to detect repetition in that way.

Uri



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.