Author: Uri Blass
Date: 05:50:38 07/10/03
Go up one level in this thread
On July 10, 2003 at 08:26:08, Michel Langeveld wrote:
>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.
>>
>>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
<snipped>
>Since blackcastling rights only change by black moves ...
Not correct.
If I capture your rook then you will not be able to castle with the missing
rook.
Uri
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.