Author: Albert Bertilsson
Date: 13:18:03 03/22/03
Go up one level in this thread
Hi Russell! Generally use the bigger size, although 56 bits MIGHT be ok for chess there is not really much gained from save that extra byte. If you are going to create a game that don't have the large number combinations that chess has you could perhaps use a smaller key. To find out I'd do this: Have very large hash table (larger size gives more collisions). Do some heavy searching, each time you hit a key that is not in the hash table mask with increasing number of bits and count of. When masking with one bit you'd probrobably get to many false hash hits to count them, but if you get no false hash hits with say 16 bits it would be quite safe to use a 32 bit key. I've done this for chess, testing diffrent types of zobrist keys and found that 56 bits would do quite well, causing very few hash collisions. Since the saving from 64 bits isn't worth the trouble I dumped the idea, but for other games 32 bits might be more than enough. But I guess that type of game (with very few combinations) would not be much of an challange for the computer. Of course the really secure way is to have a key large enough to store the EXACT position, for chess that's probably at least 160 bits (likly some more), but for simple games like tic-tac-toe a key of 16 bits is probably enough. I'm only a novice at this so don't take all this as 100% certain but I think it's close to right. I'm sure if something is wrong others will correct me =) /Regards Albert
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.