Computer Chess Club Archives


Search

Terms

Messages

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

Author: Bruce Moreland

Date: 17:28:56 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.
>
>William
>wbryant@ix.netcom.com

If you hash in en-passant square mindlessly you get a surprising amount of hash
inefficiency.

1. e4 e5 2. c4 and 1. c4 e5 2. e4 produce the same position, and an en-passant
capture is not possible in either.  Yet I bet that some people hash in the
d-file code in the first case and the e-file code in the second case.

I found that it made more sense to check for an adjacent pawn.  In that case the
en-passant capture is at least pseudo-legal.

bruce





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.