Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Hashing

Author: Russell Reagan

Date: 17:23:44 04/04/03

Go up one level in this thread


On April 04, 2003 at 20:02:16, Sune Fischer wrote:

>A movelist hash won't work at all.
>Suppose you have two positions with identical movelists, in one position there
>is e.g. a trapped knight, in the other position with the same movelist there is
>no knight.

If there is no knight, the lower 32-bits of the hash key will be different. The
move list hash is only the upper 32-bits. The lower 32-bits is a "normal" hash
key (but it's only the board data, no side to move, no castling rights, no ep,
etc.). I think that they should complement each other correctly.

For instance, if the board arrangement is the same, but the side to move is
different, the move list hash key will be different, causing the 64-bit key to
be different. If the most lists are the same, but one side has an extra piece
that can't move, then the board hash key will be different.

Regarding castling rights and en passant squares, as far as I can tell, they
should only modify the hash key when they matter. IE if white plays 1. e4, the
fact that e3 is technically an en passant capture square is irrelevant and it
shouldn't be hashed as such. Since there is no ep capture, the move list hash
won't be stored as the same position as if there was a valid ep capture. So, if
two positions have an identical board arrangement, and one has a valid ep
capture (different paths led to this position), then they will be hashed
differently since they move list hash key will be different.

But I may well be overlooking something...


>Now these positions are not identical because different trees can
>(and will!) unfold after this position. Different subtrees == different
>positions.
>In the example with the e.p. capture, if there is no capture possible the tree
>is going to be identical whether you set the flag or not, thus _not_ setting the
>flag is better if you want as many hash hits by transpositions as possible.
>Castle flags are important, again because different subtrees will emerge.



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.