Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Why using Zobrist keys for Pawn Hasing?

Author: Vincent Diepeveen

Date: 01:37:55 12/06/01

Go up one level in this thread


On December 05, 2001 at 22:41:48, Andrew Dados wrote:

how do you know in your hashscheme how many pawns you have?

>On December 05, 2001 at 18:09:48, Ricardo Gibert wrote:
>
>>On December 05, 2001 at 15:41:12, Bruce Moreland wrote:
>>
>>>On December 05, 2001 at 08:22:40, Gerd Isenberg wrote:
>>>
>>>>About the pawn hash key discussions: Why using Zobrist keys for pawn hashing at
>>>>all, at least in BitBoard programs? Isn't it smarter to use a unique 46 Bit
>>>>(Rank2-7) Difference of two colored Pawn-BitBoards instead of zobrist keys for
>>>>pawns? No key collisions and key and index (key mod nEntries) calculation on the
>>>>fly.
>>>>
>>>>Gerd
>>>
>>>Even if you could generate a Godel number for each pawn structure, there would
>>>still be some problems.  Zobrist keys are wildly different even with small
>>>changes in pawn structure, so the keys tend to disperse well in the table.
>>>Depending upon how you generate the Godel number, things might not disperse as
>>>well.  This could be solved by applying a function to the Godel number that
>>>translated it to another unique number that was not particularly like the
>>>original number, but this sounds like a challenge in a few different ways.
>>>
>>>Please pardon logic errors in the above, I spent too much time doing research
>>>for this answer and now I'm late to go do something.
>>>
>>>I calculated 2^85 different pawn structures, but I believe this is somewhat
>>>wrong.
>>
>>You only need a 48 bit bitmap for the location for all pawns, then since there
>>are only 16 pawns, you only need an additional 16 bits for color for 64 bits
>>total. You can do better than 64 bits with Rube Goldberg like tricks, but it is
>>not worth the trouble.
>>
>>>
>>>bruce
>
>15 bits for color. Which makes 2^63 max pawn positions



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.