Computer Chess Club Archives


Search

Terms

Messages

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

Author: Sune Fischer

Date: 01:59:12 02/21/02

Go up one level in this thread


On February 21, 2002 at 00:18:09, Uri Blass wrote:

>On February 20, 2002 at 19:18:51, Vincent Diepeveen wrote:
>>>no no i do not mean hashtable. i mean ARRAY with hashcodes
>>
>>all you have to do is:
>>
>>  for f=current move to 1   f = f -2;
>>    if( hashcode[f] == currenthash )
>>      return(drawscore);
>
>The question is if there is no small risk of wrong repetition detection.
>In my program wrong repetition detection can happen only because of bugs and in
>this case I guess that hashcode[f] is some compression of the position to 32
>or 64 bit number and it may be the same for different positions.
>
>I guess that in the case of 64 bit number the risk is practically 0.
>
>Uri

There is no risk to the above method, it works perfectly if you use 64 bit.

I talked to Bruce Moreland about this, it seems *safer* and easier than what he
proposes at http://www.seanet.com/~brucemo/topics/repetition.htm

He replyed, that he was worried that it would be too slow to do a O(N) search at
every node. The hashing method requires only a few lookups.
However, rep. detec. is not needed in qsearch and most of the time the search
will break quickly because last or previous move was not a "reversible" move
(you should add a break statement to that code Vincent:).

Bruce did suggest there could be a problem in the endgame if you get close to
the 50 move rule, then you will be doing a O(50) linear search at every node!!

-S.



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.