Computer Chess Club Archives


Search

Terms

Messages

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

Author: Uri Blass

Date: 21:18:09 02/20/02

Go up one level in this thread


On February 20, 2002 at 19:18:51, Vincent Diepeveen wrote:

>On February 20, 2002 at 16:39:58, Uri Blass wrote:
>
>>On February 20, 2002 at 13:10:01, Vincent Diepeveen wrote:
>>
>>>On February 20, 2002 at 09:19:20, Uri Blass wrote:
>>>
>>>sounds very buggy to me.
>>>
>>>easier is storing an array with hashcodes. goes very fast.
>>>you can even skip step 2.
>>>
>>>what you do is pretty hard and not very smart IMHO.
>>
>>I agree it was not easy and I agree that hash tables are probably better but I
>>wanted to get my program to participate in the 5th division of the winboard
>>engines and one of the conditions was repetition detection.
>
>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



This page took 0.02 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.