Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Repeated Positions

Author: Robert Hyatt

Date: 19:36:02 08/05/99

Go up one level in this thread


On August 05, 1999 at 16:59:21, Scott Gasch wrote:

>Hi there,
>
>I am finding that due to the check extension code my search slows way down in
>positions where checks are frequent.  I believe this to be because of lines
>containing repeated positions which continue possibly infinitely because I do
>not check for draw by repetition.
>
>I am already hashing positions in a transposition table so finding repeated
>positions should be pretty easy.  I looked at Crafty's code, though, and it
>seems that Bob has a special list of positions he searches to determine whether
>the one passed in is repeating.
>
>I was thinking of adding a "count" field to the hash table structure.  Then, in
>the MakeMove routine, increment the "count" of the table entry.  In the
>UnmakeMove routine decrement it.  In the IsDraw routine check for insufficient
>material, fifty move, and, to detect repetition, check the hash table count
>field of the position.  As far as I see the only drawback of this method is that
>there might not be a transposition table entry for a position when we enter
>MakeMove yet.  Do most people use the "list of position keys" method or has
>anyone done something like this?  I am worried that searching backwards in the
>list of positions might take longer AND that there are really two lists -- one
>of search tree nodes and another of real game positions up until now.
>
>Thanks again,
>Scott


Plan for the future.  The counter idea will break when you do a parallel
search of course.  Because each of 4 cpus could reach that position in their
sub-tree and the counter would hit 4 when the position had really been seen
only once by each thread...

Not a good idea.  You can use a small hash table (that you can replicate
when you start using threads) or a small list as I do.  I have never found
the list taking enough cpu time to warrant doing anything else..



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.