Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Handling repetitions?

Author: Dann Corbit

Date: 14:42:40 12/20/05

Go up one level in this thread


On December 20, 2005 at 17:11:41, Frederik Tack wrote:

>I'm looking for the best way to implement a repetition detection in the search
>tree for my engine without loosing performance.
>
>I've found some articles on the internet suggesting to create a repetition table
>using zobristkeys. I have now implemented this and it works fine, but i've lost
>about 10% performance.
>
>I have now come up with a new idea that should have no impact on performance.
>However, i'm not sure if what i'm about to do is completely correct. Here's the
>idea. Before starting the analysis, i store every position i've had on the board
>from the move history in the transposition table with an evaluation of 0 and a
>depth of maxdepth + 1. During the analysis, i use a replacement scheme in the
>transposition table that will not replace the position if the depth in the tree
>is smaller than depth in the table. Since i've stored the historic positions
>with maxdepth + 1, they will never get replaced. This should score every
>position that has been on the board before with a draw score.
>
>The fact is i haven't found any article on the internet discussing this way of
>working, so i fear it may have some drawbacks i'm not aware of. Has any1 tried
>implementing repetition detection this way or has any1 an idea why this wouldn't
>work?

That sounds similar to what most everyone does.  Usually, you keep a list of all
the positions you have played [or are planning to play enough to shove it in the
pv] OTB up to now (usually called the move_stack or thereabouts).  Then, you
just scan the move stack to see if there is any strange feelings of Deja Vu.

That way, you can clear your hash table if you want to.





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.