Null Move concern
Posted: 22 Apr 2006, 16:54
Hi, with the following code in my main search, after the hash probe
and before the attempt to use the hash move / pv move prior to
a move gen, I have this null move attempt:
#ifdef NULLMV
#define R 2
r = R;
// If we are beyond the first 2 ply (0 and 1) of the search
// and the last move was not null move
// and we are above the frontier
// and there is at least one piece for either side
// and we are not in check
// then try null move.
if (ply > 1 && hist[histptr-1].flag != NULLMOVE && depth > 1 && bb_pieces && !incheck(bd)) {
makenullmv();
val = -search(bd,depth - 1 - r, ply, -beta, -beta + 1);
unmakenullmv();
if (val >= beta)
return beta;
}
#endif
But in testing, 250 quiescent positions at 60 seconds each first without
nullmove and next with nullmove, the result is a wash - equality for
nullmove and non-nullmove result.
The average search depth is about 2/3-3/4 ply deeper with null move
but the solution count is only a single position better for null move.
Obviously there is a flaw in the above implementation but I have
not been able to find it.
If anyone sees an improvement, please reply.
Thanks -- Stuart
P.S. Sorry about the left-flush code above. I do not know how to tell
this bulletin-board to take the text exactly as-is.
and before the attempt to use the hash move / pv move prior to
a move gen, I have this null move attempt:
#ifdef NULLMV
#define R 2
r = R;
// If we are beyond the first 2 ply (0 and 1) of the search
// and the last move was not null move
// and we are above the frontier
// and there is at least one piece for either side
// and we are not in check
// then try null move.
if (ply > 1 && hist[histptr-1].flag != NULLMOVE && depth > 1 && bb_pieces && !incheck(bd)) {
makenullmv();
val = -search(bd,depth - 1 - r, ply, -beta, -beta + 1);
unmakenullmv();
if (val >= beta)
return beta;
}
#endif
But in testing, 250 quiescent positions at 60 seconds each first without
nullmove and next with nullmove, the result is a wash - equality for
nullmove and non-nullmove result.
The average search depth is about 2/3-3/4 ply deeper with null move
but the solution count is only a single position better for null move.
Obviously there is a flaw in the above implementation but I have
not been able to find it.
If anyone sees an improvement, please reply.
Thanks -- Stuart
P.S. Sorry about the left-flush code above. I do not know how to tell
this bulletin-board to take the text exactly as-is.