Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Random keys and hamming distance

Author: Alessandro Damiani

Date: 03:48:24 08/17/02

Go up one level in this thread


On August 16, 2002 at 23:26:08, James Swafford wrote:

>
>I'm in the process of tracking down some hashing problems, and
>I'm starting with my Zobrist keys.  For each piece (i.e. bp, wp,
>wr, ...) I have 64 keys.  I have 65 keys for "ep square", two
>for "player to move", 16 for castling rights.  All keys are 64 bits.
>
>I just did a test to find the minimum hamming distance among
>all keys, and it was 14 bits.  That seems a bit low.
>
>I think the way I'm doing 64 bit random number generation sucks.
>Here it is:
>
>Bitmap RandomBitmap(void)
>{
>   Bitmap r1,r2;
>
>   r1=Random32();
>   r2=Random32();
>
>   return ((r1<<32)|r2);
>}
>
>
>Ok, someone please confirm that this sucks and tell me a better
>way. :)
>
>I'm also interested in hearing what others are getting for min
>hamming distance between keys.
>
>--
>James

I use RANROT type B for 64bit numbers. Some time back I read here that it is
used in Shredder. After reading the documentation I was convinced of its
quality. But perhaps there is a better one for chess, I am not an expert in this
field.

Here is the link: http://www.agner.org/random/


Alessandro



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.