Computer Chess Club Archives


Search

Terms

Messages

Subject: Hash Algorithm, maximizing distance between inputs?

Author: Brian McKinley

Date: 18:26:16 02/02/98


I am creating hash keys using what I assume is a common technique
suggested to me by Robert Hyatt.  I generated 13 * 64 random numbers (64
bit in my case) and xor values together for each square depending on the
piece and color or lack of a piece on each square.  I then xor an
additional value based on flags for empassant and castling status.  The
hash key is determined by using the first (n) bits from the resulting
value depending on the size of the hash table.  This is working much
better (translate faster) than what I was doing before, but the
resulting distribution in the hash table is not very even.  Has anyone
investigated using numbers that are not randomly generated to maximize
the distance between inputs.  My math skills are not up to the
challenge.

--Brian



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.