Author: Robert Hyatt
Date: 09:47:54 07/11/03
Go up one level in this thread
On July 10, 2003 at 06:56:10, Mikael Bäckman wrote:
>Hi,
>
>I've been tracking down problems with my engine, and found some oddities in
>updatíng the hashsignature after each move. Anyways, I thought "I wonder how
>crafty does it" and well, I think crafty does it wrong.
I looked at this. It is inconsistent but correct. I've changed all the
references to castle status to be consistent, but it doesn't change anything
at all.
>
>Code from Crafty 19.3:
>
> case king:
> if (wtm) {
> [snip]
>-> if (WhiteCastle(ply) > 0) { <-
> if (WhiteCastle(ply+1)&2) HashCastleW(1,HashKey);
> if (WhiteCastle(ply+1)&1) HashCastleW(0,HashKey);
> [snip]
> }
> }
> else {
> [snip]
>-> if (BlackCastle(ply+1) > 0) { <- not the same ply as above?
> if (BlackCastle(ply+1)&2) HashCastleB(1,HashKey);
> if (BlackCastle(ply+1)&1) HashCastleB(0,HashKey);
> [snip]
> }
> }
> break;
>
>Since crafty knows how to castle the code obviously works, but it doesn't look
>right..
>
>Regards,
>Mikael
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.