Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: About debugging HashTables implementation .

Author: Andrew Williams

Date: 09:11:08 04/09/02

Go up one level in this thread


On April 09, 2002 at 11:56:45, Pat King wrote:

>On April 08, 2002 at 15:17:46, Robert Hyatt wrote:
>
>>On April 08, 2002 at 12:38:35, John Marountas wrote:
>[snip]
>>>When searching into the HashTable I keep a record of the returned
>>>Lows,Highs and Hash Collisions. Here are the results:
>>>
>>>Hash Collisions: 1000
>>>Hash High      :  173
>>>Hash Low       :    0
>>>
>>>Best Move : 3...Nxd4
>>>
>>>Why there are  so many collisions?
>>
>>
>>How do you define "collision"?  Normally this means two different board
>>positions produce the same hash signature.  If you are getting _those_ you
>>have a Zobrist hashing bug.
>
>How do you detect collisions, then? Record the entire position in the hash
>table? Even for a debug build, that seems like it would be impractical. Although
>undetected hash bugs are even less practical :)
>

You check to see if the move stored in the hash entry is legal or not. If
the hash keys match but the move isn't legal in the position, it means that
you have a hash collision.

Andrew

>>If you mean two different signatures hash to the
>>same board position then perhaps your 64 bit random numbers are very poorly]
>>chosen...
>[snip]



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.