cms271828 wrote:Thanks, thats pretty much what I worked out a few days ago.
I don't have a 'ply' variable, I just have MAX_DEPTH, and DEPTH.
So essentially I have ply = MAX_DEPTH - DEPTH, and thats what I use.
I would not trust that construction. There may be conflicts with extensions
and deeper searches. What happens to your formula in the quiescense
search? I recommend you to use a variable ply that starts with 0 in the
root and is incremented in make_move() and decremented in
undo_move(). You will easily find a place for this little thing in your search
stack. Discussions with other chess programmers will be easier, too.
I have another trivialish question:
When I am at the root node, in which case DEPTH is always equal to MAX_DEPTH...
I start with a probe into hash table.
Suppose I get an entry with an EXACT score bound, then this value is returned immediatley.
So the search completes with that score being returned.
So inside the PROBE_HASH( ), should I include this line to set the Best Move..
Code: Select all
if(DEPTH==MAX_DEPTH) BESTMOVE=hashMove;
This is what I've always used before, and engine crashes if I don't include it in the PROBE_HASH( )
Is this right? Thanks again.
I would not trust this, too. Even if you change it to if (ply == 0 ) ...
In the root my search funtion would be changed and handle a lot of
special cases. Or I would even use another search_root() function.
In the root I would use the hash entries and their moves for move
ordering only. The few real moves to positions in ply 1 where
everything is normal do not cost too much time. I guess there are
hash entries in that ply 1 for all important moves.
If you really want to use a hashed move in the root then do not only
check for depth but for an existing and valid move in the hash entry.
You should even check if it is a valid move on the board comparing it
with the moves from the move generator.
Harald