Computer Chess Club Archives


Search

Terms

Messages

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

Author: Vincent Diepeveen

Date: 03:22:27 12/06/01

Go up one level in this thread


On December 06, 2001 at 05:54:34, Ricardo Gibert wrote:

yes short after i posted i realized it, thanks.

Anyway it's waste of time. you already have for free the pawn zobrist
hashing. i don't see why waste system time generating a different
hashkey.

when i measured some years ago mishits then i got 0.

>On December 06, 2001 at 04:37:55, Vincent Diepeveen wrote:
>
>>On December 05, 2001 at 22:41:48, Andrew Dados wrote:
>>
>>how do you know in your hashscheme how many pawns you have?
>
>The 48 bit bitmap (used to give the locations of all the pawns) contains [part
>of] the information for that. You just have to do some type of pop count on it
>to get the total number of pawns on the board (call it x). If this number is 16,
>then you automatically know there are 8 white pawns and 8 black pawns.
>Otherwise, you do a pop count of the first x bits of the 15 bits used for color
>(call this y) to know how many there are of each color.
>
>Example: Lets say x = 12 and y = 7, then there are y = 7 white pawns and x - y =
>5 black pawns.
>
>>
>>>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.