Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Hash Collision

Author: Sune Fischer

Date: 10:54:56 12/07/02

Go up one level in this thread


On December 07, 2002 at 13:17:06, David Rasmussen wrote:

>On December 07, 2002 at 12:52:48, Sune Fischer wrote:
>
>>
>>You could try making keys with less bits.
>>I did that experiment once, IIRC I started to get collisions at around 45-48
>>bits. So 32 bit is useless but 50 bits is okay.
>>
>>I would think that you about double the collision rate everytime you lose a bit,
>>so if you don't get any collisions during a full game with 50 bits then you have
>>something like 2^14 games before you can expect a collision using full 64 bit
>>keys. In other words it doesn't happen, if it does maybe you need a better PRNG.
>>
>
>While I still think the analysis is too simple, the figure 2^14 = 16384 games
>seems more reasonable to me. I haven't experienced this in the almost two years
>of developing this rewrite. 16000 games played in two years is not at all
>improbable.

Well it's still a good idea to do the test, because you detect a small portion
when only validating the hash move. Anyway it shouldn't be more than a few lines
inserted into the hash probe.

#define ChopOff(x) (x&0xffffffffffff0000) // ie try with 48 bits

if (current_key!=draft_key)
  if (ChopOff(current_key)==ChopOff(draft_key))
     Collisions++;


-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.