Computer Chess Club Archives


Search

Terms

Messages

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

Author: Dieter Buerssner

Date: 08:26:11 12/05/01

Go up one level in this thread


On December 05, 2001 at 10:30:38, Robert Hyatt 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.

I think, it is by now clear, that 48 bits will not be enough in a simple scheme.
96 bits (for black and whithe pawns) would be a bit much. With more update work
(how much more will depend on the internal datastructure used in the engine
anyway), 64 bits will be enough. 48 bits for all pawns, and a color list of 16
entries, where for each set bit in the pawn mask the color of the pawn is given.
This still has much redundance (for example with 16 pawns, you allways will know
the color of the last pawn).

As Robert points, the mod will not work ...

>The problem is that you have 56 bits of information.  48 possible pawn
>positions + 8 possible en passant target files.

This is only needed, when your pawn scoring takes account of ep squares.

>Which N bits of that are
>you going to use to produce the table index?  _that_ is the problem.

Use the key as state information for a suitable pseudo random number generator.
A multiply with carry generator would need 2 muls (+ few adds, ands and shifts).
Sure, it will cost a bit of time, but nothing compared to pawn evaluation.
Certainly, a special purpose "bit mangler" could be faster.

Regards,
Dieter




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.