Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Null Move Pruning and Draw Detection

Author: Richard Pijl

Date: 06:57:26 01/15/03

Go up one level in this thread


On January 15, 2003 at 07:24:44, David Rasmussen wrote:

>On January 15, 2003 at 06:54:59, Richard Pijl wrote:
>
>>On January 15, 2003 at 06:12:23, David Rasmussen wrote:
>>
>>>Since null moves are illegal in the real game, it is not obvious how it affects
>>>or should affect repetitions and the fifty move rule.
>>>What I do now in Chezzz is just pretty much ignore the relation between these
>>>concepts and formulate them as if they were formulated in isolation.
>>>What is the correct way to deal with these things?
>>>For instance:
>>>
>>>1. What to do with the fifty moves rule counter when doing a null move?
>>
>>I think in situations where you have not done any captures or pawn moves for
>>30-40 moves nullmove pruning may yield little result as the programs often are
>>'nullmoving' with real moves anyway. I haven't done experiments with it yet but
>>I seriously consider turning nullmove off when the 50 moves counter reaches 35.
>>But whatever you do, the overall effect in your engine is probably close to zero
>
>I've done exactly that, except it's 37.5 (75 ply) :)
>

:-)

>>...
>>
>>>2. When doing a null move, we obtain a new position, one that can never be
>>>   on the board immedeately after the currect position in a real game, but
>>>   it is treated as a "normal" position. What if a "repetition" is found of
>>>   two of these "imaginary" positions in the current line? We would return a
>>>   draw (that is what I do, since I treat these positions as all others, as do
>>>   most programs I've seen, Crafty for instance).
>>
>>I think that when you're getting a repetition in search (so it appears twice in
>>search) you can safely return draw. If the first occurrence happens before a
>>nullmove, there is no progress so it probably won't produce a cuttoff as it is
>>likely the repetition (or better) can be reached by not null-moving.
>>
>>Richard.
>>
>
I have to check it again. I know that the version of a few months ago did _not_
detects draws after a nullmove, except when the repetition happened after
playing the nullmove (I reset the fifty move counter to 0 on playing a
nullmove). And as repetition detection also uses the fifty move counter (no
point in looking at positions before a pawn or capture move) it basically turns
off both 50 move draw and repetition detection
I know I have been toying with it some months ago, but I don't remember what the
result was. I'll check when I get at home.

>I'm not totally convinced by this. There are several cases, aren't there? Let's
>just see it from white's perspectice, it will of course be symmetric for black:
>doesn't all this depend on:
>1. whether white is winning or losing at the root

Is not really relevant as I only return a draw when the position appears twice
_below_ the root. The only exception is when the position occurs for the third
time. That one will return draw always.

>2. whether the real score of the current position is below or above alpha or
>beta
>3. whether the last move was really good or really bad
>

So what you're saying that if beta is below 0 you might get a cutoff based on a
draw score that cannot happen because of nullmove.
I have to check that with the Baron, but I think the risk is limited, but the
possible gain is there. You don't want endless repetitions, especially not when
extending checks at the same time
So turning off repetition detection is not a great idea.
Perhaps resetting the fifty move counter on nullmove isn't a really bad idea ...

>Also, what about stalemate detections? Null move pruning affects that too as far
>as I can see.

In most situations where you allow nullmove, you'll probably have another
(legal) move that also leads to stalemate. I don't see a problem with that.

Otherwise it's a zugzwang condition and you should have made precautions for
that anyway ... :-)

Richard.

>
>/David



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.