Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Hash codes - how good is good enough?

Author: Ricardo Gibert

Date: 16:34:03 02/09/01

Go up one level in this thread


On February 09, 2001 at 19:04:45, David Rasmussen wrote:

>On February 09, 2001 at 10:39:09, Pat King wrote:
>
>>On February 07, 2001 at 10:59:31, Pat King wrote:
>>
>>>I have seen it written here that with 64 bit Zobrist hashing, the perfect key
>>>should change 32 bits. When I had what I thought to be hashing problems, I
>>>captured some stats on my hash keys. I found that most of them changed 28-36
>>>bits (within 4) with a few outliers as far as 13 bits from "perfection". I also
>>>checked that I was not generating duplicate keys. How good or bad is this?
>>>Should I work on the average, or the outliers? Any comments appreciated :)
>>>
>>>Pat
>>Thanks to all for your thoughtful replies. For what it's worth, the only change
>>I've made is to generate a key set with hamming distance 31-33, with a
>>significant improvement in hash performance (thanks to Ricardo for providing a
>>reasonable argument to justify the 32 bit standard). I have yet to compare this
>>set with Rob's 16 bit criteria for XORing any 2 keys.
>>
>>Pat
>
>But 32 isn't optimal. As high as possible is optimal.


So far the conclusions I've come up with are:

(1) A Key = 0 should be excluded, since positions with a particular piece on a
particular square will produce the same hash signature as the same position
without that piece.
(2) Keys with a close hamming distance to zero should be also be excluded.
(3) Pairs of keys of the form x and ~x, since 2 such pairs will XOR to zero.
(4) Pairs with a close hamming distance to x and ~x should also be excluded.
(5) A key set with a hamming distance > 21 and < 43 with respect to each other
*and* to zero should satisfy (1)-(4) above can be quickly produced within the
program without having to read in a file with the keys. Just use the same random
number seed.

I'm trying to find sources on the net to verify these conclusions, but so far no
luck. What do you think?




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.