Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Null move question

Author: Slater Wold

Date: 11:22:24 05/12/04

Go up one level in this thread


On May 12, 2004 at 14:05:30, Pallav Nawani wrote:

>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

I believe http://www.seanet.com/~brucemo/topics/nullmove.htm has all your
answers.



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.