Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: A New Approach to Draw Detection by Move Repetition in Computer Ches

Author: Pallav Nawani

Date: 11:27:42 07/29/04

Go up one level in this thread


On July 29, 2004 at 13:57:31, Mathieu Pagé wrote:

>On July 29, 2004 at 06:26:52, Gian-Carlo Pascutto wrote:
>
>>http://arxiv.org/ftp/cs/papers/0406/0406038.pdf
>>
>>I stumbled onto this when doing a search for Axon.
>>Not seen it mentioned here yet.
>>
>>They also have a paper about hashing out which I can't
>>download.
>>
>>--
>>GCP
>
>Hi,
>
>  I just read it and I was surprised to red that the classical way of detecting
>draw is by comparing all the board. I know, as other have confirm, that cheking
>only the zobrist hash key is enought to detect draw.
>
>  Now I am wondering if my repetition detection is "classical". I use a small
>hash table of 256 positions that I fill with the zobrist key of the position
>after each MakeMove (That I remove just before UnMakeMove)(Note that I clear all
>entries if an irreversible move is played on the board (not in the game tree)).
>If the position was already in the hash table it is a repetition. If there is a
>collision I do up to four re-hash (using other bits from the 64 bits key) if the
>position is not found in 4 try I assume there is no repetition. In this way I do
>at most 4 64bits comparisons.
>
>  Is this what you all do, or some of you look back in the positions history of
>the game and compare the actual zobrist key with every other since a
>irreversible move is found ?
>

I ( and a lot of other people do it this way) have a positon stack. Hash keys
are pushed into it as the moves are made and popped off as they are unmade. When
I want to detect a draw, I start from the top of stack and compare as many moves
as given by my 'fifty' variable (which is used to detect a draw using fifty
moves rule). I only compare moves made by my side (white or black). If I find 3
matches, I have a repetetion.

Regards,
Pallav


>Mathieu Pagé



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.