Author: martin fierz
Date: 02:09:36 07/11/01
Go up one level in this thread
On July 11, 2001 at 03:17:54, Artem Pyatakov wrote: >I noticed a lot of people either simply apply a "%" or ">>" to their hash key to >get the actual memory location in which to store the result of the hash... > >I am wondering, how safe is this? In other words, could this actually result in >more unusable collisions than necessary? Or does using this method with the >Zobrist hash avoid these problems? > >Artem Pyatakov this is perfectly safe as long as you know what you are doing: if your hash key has N bits, then using such a % or >> operation uses some of these bits as an index, lets say M (for a 1 million entry table, M = 20). so you have N-M bits left to detect a collision. if your key was a 64 bit number, you still have 44 more bits left to detect collisons, if it was 32, you only have 12... of course it all depends a bit on how you are implementing things, but generally speaking, having only 12 bits left is not a good idea, while 44 is enough by far. i am using 32 of these 44 to detect collisions, that is still enough. cheers martin
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.