Author: Bas Hamstra
Date: 05:47:32 09/15/00
Go up one level in this thread
On September 15, 2000 at 08:30:10, Jan Pernicka wrote: > Hi, >as I'm just fighting with hash tables in my program, my question is about it. > >Descriprion: My hash table(s) (HT) are in fact two: one for positions, where > white is on move and one where black is on move. This works OK > but... >Problem: It's clear that one table will be much more occupied than second one > (because when you sketch the tree of the game to some depth (IE these > are positons possibly saved to HT) and label it's nodes as "white to > move" or "black to move", then one kind of them will be in greater > majority. So my model of HT is inefficient. >Solution: 1) To have only one HT and with each saved position have a flag > indicating side to move. > 2) To have (also) one HT and evry hashed positon (IE: that 32-bit > number in HT...) XOR with some (32-bit) constant depending on side > to move. > >So, what is, please, commonly used technique (maybe: 3) ... ) I do 1) and it works fine. Some do 2) (for example logically NOT the hashkey if black is to move) and that also works fine. Bas Hamstra,
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.