Computer Chess Club Archives


Search

Terms

Messages

Subject: Major "DUH" bug in my code :)

Author: Larry Griffiths

Date: 13:23:00 09/17/00

Go up one level in this thread


On September 17, 2000 at 03:54:23, Johan Melin wrote:

>On September 17, 2000 at 02:46:34, Larry Griffiths wrote:
>
>>I tried using my compilers rand() function but it was only generating
>>random numbers from 0 to 0x7fff.
>>
>>I ran 78 positions from the BWTC suite
>>and got over 10,000 mis-matches using my 64-bit hash keys.
>>I looked at my smallboards and they usually differ by a piece missing or in a
>>different position.  My Piece table does not have zero or duplicate entries
>>and the random numbers in the piece table look good.
>>I built hashkeys using the two different smallboards and they do indeed
>>generate the same hashkeys.
>>
>>Maybe my hashkeys should be prime numbers?
>>
>>I will play around with random some more and see if it changes my mismatch
>>rate.
>>
>>Thanks Bob.
>>
>>Larry.
>
>With 10,000 mismatches something must be broken. How good are your random
>numbers? Try counting the bit-difference between all pairs of 64-bit keys.
>The average should be around 32 and the minimum above 12.
>
>/Johan Melin

My problems came down to TWO major bugs.  I fixed the castleing problem with my
smallboard and that was the first bug.

The second bug amounted to not initializing my smallboard when I loaded
a position from an EPD string (embarassing).

Thanks to all who replied to my posts!

Larry.



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.