Author: Uri Blass
Date: 15:02:37 09/03/03
Go up one level in this thread
On September 03, 2003 at 16:57:39, Robert Hyatt wrote:
>On September 03, 2003 at 03:26:59, Uri Blass wrote:
>
>>It is something that I need to fix but before fixing it I prefer
>>to read what other people do.
>>
>>Today I update
>>1)the side to move
>
>correct.
>
>>2)the ep array(I have instead of one global varaible an array of 3 numbers that
>>gives me the en passant possibilities(square of the pawn that can capture and
>>squares that it can capture) and maybe it is better if I compress it to one
>>varaible and replace ep[0],ep[1],ep[2] by defines)
>>
>>I am also not sure if all my global varaibles is a good idea and it may be
>>better to save the ep information only in the history information.
>>
>>3)A global varaible that is the zobrist key(maybe I should get rid of it and
>>read the zobrist key from the history information something that is possible
>>only after I change my makenull move)
>
>All you need to do here is correct the hash signature for the en passant
>status that is now not possible. (IE you can't do an EP move immediately
>following a null-move.)
I do it
I have a global array int ep[3]
ep[0]=-1 if enpassent capture is not possible and otherwise it is the square of
the first pawn that can capture.
ep[1] is updated only when ep[0] is not -1 and it is the first square that the
pawn can go when it does the first possible enpassent capture.
ep[2] is -1 unless there are 2 possible captures and in that case it is the
second square that the pawn goto when it does enpassent capture.
My donullmove function begins with
side=1^side;
if (ep[0]!=-1)
{
zob=zob^zobrist[0][1][fil0(ep[1])];
ep[0]=-1;
}
zob=zob^zobrist[0][0][0];
Note that in case of undo null move I need to get back ep[0],ep[-1],ep[-2].
Today I do not remember them in the array of the history struct because
donullmove unlike normal move does not store information in that array so
I need to remember them elsewhere and they are local varaibles in the alphabeta
function that calls nullmove and that function also call undonullmove later.
I decided as first step to fix my do null move and undo null move is to store
information in the history struct arrays.
I see that this influence the number of nodes and after more than 600000 nodes
the number of nodes is smaller.
I suspect that it can be because of some search decision that is based on the
history but I need to find the exact reason before I continue.
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.