[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: computer-go: Re: Zobrist hashing
At 04:49 PM 11/30/1999 +0900, you wrote:
>Content-Transfer-Encoding: 7bit
>
>Thanks Stuart for posting the sample code. I have one comment about the
>number of bits for the code:
>32 bits is a bit small nowadays.
That is why I said:
Increase the number of bits in hashkey and the randomizer
to produce fewer collisions.
>If your search generates n distinct
>positions, there are n*(n-1)/2 pairs, and you don't want any such pair to
>have the same code. For example, if n=2^17, you have about 2^33 pairs, so
>you're already likely to get collisions. But 2^17 is only about 130.000, a
>small number. 48 bits is safer, and 64 bits is what I use.
>
>Of course it depends on what exactly you're doing with the table. If a few
>collisions now and then are less important than the extra memory, you can
>go with the smaller code. But if a collision would be fatal, better play it
>safe :)
I personally use 64 bits. The code I sent was from an old program
years ago. Some prefer 96 or 128, depending upon the speed of the
cpu and memory capacity.
>BTW the Zobrist paper has been reprinted in the ICCA journal.
>
>Zobrist, A.L. (1990). A New Hashing Method with Applications for Game
>Playing. ICCA Journal, Vol. 13, No. 2, pp. 69-73.
>
I do have one.
--Stuart