Computer Chess Club Archives


Search

Terms

Messages

Subject: Simple hash tables programming question

Author: Jan Pernicka

Date: 05:30:10 09/15/00


 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) ...   )

  Thank you in advance

     Jan



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.