Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: hash table question

Author: Bruce Moreland

Date: 15:51:03 01/13/00

Go up one level in this thread


On January 13, 2000 at 18:34:12, Landon Rabern wrote:

>Is it known what information is sufficient to garantee that a hash entry is
>describing the same board as another board hashed to the same value.  Like can I
>store a 64 bit int with all the pieces on the board and use this to test?  Or
>maybe I can use this 64-bit int and test the the from-to of the suggested move
>has the right pieces on them?
>
>Thanks,
>
>Landon W. Rabern

You'd need to figure out how many legal positions there are, and the number of
bits you'd need for the hash key would be the base two log of that, and you'd
also have to figure out a way to convert a position to a unique number.  Best
guess is over a hundred, I think.

If you use 64 bits you will be as OK as if you use more.  Sometimes you will get
a collision, but if you can figure out how to avoid crashing when you get one,
you'll probably never notice.

bruce




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.