Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Transposition table hash key length question

Author: Sune Fischer

Date: 02:38:03 05/30/03

Go up one level in this thread


On May 30, 2003 at 04:31:58, Fermin Serrano wrote:

>I have developed my engine with a trasposition table and a incremental move
>generator (hash move + captures + killers + pasive moves). It is running nice,
>except a few possitions. It could "think" about 7/8 plys without problems, but
>then and inconsistence arrive, and I think that it is because I use a hash key
>length of 32 bits. With this key length, is there any possibility of "real"
>colisions?

32 bits is not enough to avoid collisions.

If you have never heard of the birthday problem, then here it is in a nutshell:

32 bits gives you 2^32 combinations.
Say you have 2^20 entries in your (filled) hash.
Now you generate a bran new key and you look it up.

The chances of a collision is going to be 2^-12 = 1/4096.

Of course not all the keys you generate will be new ones, and the table may not
be entirely full, and the zobrist table may not produce perfectly random
distributed keys, still you will get many collisions a second.

There are enough ways to destabilize a chess engine, no reason to introduce more
noise, IMO.
64 bits are used by many (far majority I think) of the chess programs.

-S.



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.