Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: repetition detection & hashing

Author: Derek Mauro

Date: 05:46:24 01/16/02

Go up one level in this thread


On January 15, 2002 at 23:39:45, Robert Hyatt wrote:

>On January 15, 2002 at 22:16:20, Derek Mauro wrote:
>
>>On January 15, 2002 at 21:50:52, martin fierz wrote:
>>
>>>aloha,
>>>
>>>i have a question about repetitions, and it's only about the search itself, not
>>>about the game history: in my checkers program, to find repetition draws i keep
>>>track of the hash keys of the current variation, and if i find that the key for
>>>the current position has already ocurred before in the search, i return zero
>>>without searching further. i think this is the standard implementation?!
>>>anyway, i am wondering about the following problem: imagine you are searching a
>>>variation, and in the end you make a repetition. the program will stop searching
>>>there in the tree and assign the position a value of 0. now imagine that you
>>>have a different path of moves without a repetition which ends up at that node,
>>>probes the hashtable and returns 0. is this just my imagination, or can this
>>>happen and can it be bad?
>>
>>Your hashtable should have a value in it from the first time you used the
>>evaluation function.  If the position repeats, you just have search return 0.
>>You don't record scores in the hashtable that are the result of a repetition,
>>you leave the original score.
>>
>>Derek
>>>
>
>
>
>That leads to results just as wrong as what he described...  you fail to
>recognize draws...
>
If that's true than I'm doing something wrong too.  Whats wrong with doing this:

int search() {
 if(IsRep())
   return 0;
 if (depth == 0) {
   val = evaluate();
   recordhash(val);
   return val;
 }
 // rest of search
}

I've only been hashing scores that are the results of mates and the evaluation
function.

>
>
>>>cheers
>>>  martin



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.