Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Pawn hashing without Zobrist keys

Author: Omid David Tabibi

Date: 13:53:44 09/12/03

Go up one level in this thread


On September 12, 2003 at 16:49:09, Gerd Isenberg wrote:

>On September 12, 2003 at 16:39:33, Omid David Tabibi wrote:
>
>>On September 12, 2003 at 16:34:48, Gian-Carlo Pascutto wrote:
>>
>>>On September 12, 2003 at 16:33:13, Omid David Tabibi wrote:
>>>
>>>>I still don't understand why modulus is needed, and
>>>>I have a pawn hash of 2^17 entries. What is so special
>>>>about pawn hash that you need the modulus operation
>>>>there while you don't need it in the normal hash table?
>>>
>>>You don't?
>>>
>>>I assume you have 32 or 64 bit hash keys.
>>
>>64 bit.
>>
>>>
>>>How do you map 2^64 -> 2^17 ?
>>
>>Please, don't tell me that you guys are mapping the hash key as following:
>>
>>address = key % table_size;
>
>
>Yes, unless you use zobrist keys and power of two table sizes for pawn hashing,
>which is probably smarter. Do you have a smarter way of getting a hashkey from
>white/black pawn bitboards?
>
>>
>>???
>>
>>Do you know how many cycles does the modolus operation take???
>>
>
>Yes, that's the reason for my initial posting.
>

assuming 'table_size' is a power of 2, the following two expressions are
equivalent:

address = key % table_size;
address = key & (table_size - 1);



>Gerd
>
>>
>>>
>>>--
>>>GCP



This page took 0.01 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.