Author: Pallav Nawani
Date: 11:05:30 05/12/04
Hello,
I am trying to implement NULL move heuristic in my chess program, Natwarlal.
Addition of null move reduces the number of nodes drastically, but it leads to
the program making stupid captures. For instance, capturing a pawn by a bishop
when the pawn is well defended. What should I do to avoid this problem?
The code I use follows:
(gi is the structure used to hold moves, undo stack, etc.)
// Lets try a NULL move
if(!avoidnull
&& !gi.uptr->incheck
&& gi.ply > 1) {
make_null_move(gi);
if(depth - NULLRED > 0)
score = -search(gi, -beta, -alpha, depth - NULLRED);
else
score = -qsearch(gi, -beta, -alpha);
undo_null_move(gi);
if(score >= beta) {
return beta;
}
}
Thanks in advance.
Pallav Nawani
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.