Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: null move

Author: Bruce Moreland

Date: 09:42:09 02/10/99

Go up one level in this thread



On February 10, 1999 at 06:04:52, Viktor Popjuk wrote:

>please, I need some help.
>
>I'm writing  my first chess program and i try implement null-move, but I'm not
>fully understand it.
>
>I write something like this:
>
>alphabeta(a,b,d)
>{
>    if not in check and last_move not null_move
>    then
>        make null_move
>        val = -alphabeta(-b,-a,d-1)

Use -b, -b+1 instead of -b, -a.  The idea is that you don't care about scores in
the range a .. b-1, since all you are comparing against when you come back is b.
 You can narrow the window.

Also, use d-3 rather than d-1.  This is called using an "R" value of 2, since
you search 2 plies less than you would have (d-3 versus d-1).  This will reduce
the search time by a tremendous amount.

The whole idea here is that you are comparing two things:

1) A shallow search, where you are winning without bothering to make a move.

2) A normal deeper search.

The whole point of null move, the only reason it's worth doing, is that
typically if thing #1 works, thing #2 would also work, but thing #1 is massively
cheaper.

>        unmake_move

if (val >= b) return b;

You simply cut off.  Pretend you searched everything, and found something great.
 Something great probably exists.

>
>       ??? what done here with val?
>       ??? return if val >alpha+xxx?
>       ??? and what return ?
>
>   endif
>
>   ...
>   normal alphabeta
>
>}
>
>Thanks for any help.
>
>Viktor.
>
>
>Sorry for my bad english.



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.