Computer Chess Club Archives




Subject: Re: What approach do you use to handle castling/en passant for repetition?

Author: Robert Hyatt

Date: 19:02:27 02/28/00

Go up one level in this thread

On February 28, 2000 at 17:04:13, William Bryant wrote:

>I am curious,
>do you hash a different constant for each of the 16 possible ep squares, or
>simply a single constant if ep is possible.
>I have sixteen different values that are XOR'ed into the hash signature
>depending on which square is the ep square.
>It is intersting that Bruce made a comment about this a while back.  He noted
>that the same opening position reached by a different order of moves will
>produce a different hash signature doing ep squares in this way.  Therefore it
>does create a degree of inefficiency because (except for the ep move) the rest
>of the position may have already been evaluated and in the hash table.

1.  I have a random number for each possible EP target square.  So that
I can tell the difference between two identical positions where one had
black playing a5 and the other had it playing h5, both with white pawns
at b5 and g5.

2.  It can become inefficient (a bit) but this EP value is only in the
hash signature for one move, because one move later the EP possibility
is gone.  So it doesn't affect a lot of things.

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.