Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: A question about pawn hash tables

Author: Andrew Williams

Date: 05:38:31 09/14/00

Go up one level in this thread


On September 14, 2000 at 05:25:32, Andreas Herrmann wrote:

>On September 13, 2000 at 17:12:07, Andreas Herrmann wrote:
>
>>Hello,
>>
>>i want to include pawn hash tables in my chess program holmes, but i don't know
>>how i have to calculate the hash index and the hash key.
>>I think the hash index of the position will only calculated with the pawns on
>>the board like the following,
>>
>>for (pos=A1;pos<=h8;pos=pos+1) {
>>  if (figure[pos]=pawn) {
>>    PawnHashIndex = PawnHashIndex ^ RandomIndex[pos].index;
>>  }
>>}
>>
>>is this right??
>>
>>How can i get a good hash key? What have i calculate with xor?
>>
>>Thanks for each information.
>>
>>Andreas
>>
>>
>>www.wbholmes.de
>
>Hello again,
>
>the links from Ricardo are a good information source, but i found nothing about
>pawn hash tables, only normal hash table and that's not new for me.
>
>My question is how can i get a good hash key for collision check in the pawn
>hash table.
>Is a XOR combination with a random figure enough? Or is it not so difficult than
>i am thinking?
>
>Andreas

Yes. I've always used a 64-bit integer derived in just the way you describe.
I don't know if 32-bits would be sufficient, as I've never tried it.

Andrew



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.