Page 1 of 1

When to do null move

Posted: Sun Jun 05, 2016 6:58 am
by jwes
I am trying to determine how to decide whether to try null move in a position. If I have done my math right, the formula is:

if (nF*pNFL/nN + f1 - f2 > 1) try null, where:

nN is the estimated number of node for a null move search.
nF is the estimated number of node for a full search.
pNFL is the estimated probability of the null move search causing a cutoff.
f1 is a fudge factor for the value of a null move search that does not cause a cutoff.
f2 is a fudge factor for the cost of a false positive.

Some plausible situations in which to avoid null move are:
Hash table says position failed low on the last ply.
Hash table says null move did not cause a cutoff on the last ply.
Depth remaining is 1.
Static evaluation or material is < alpha.
Static evaluation or material is < alpha and the last move was a capture (the probability of a cutoff is much lower if the last move was a capture).

One interesting situation is when depth remaining is 2 as the gain from a null move cutoff is much lower.

When null move was the major reduction, there was little point in spending much effort in avoiding null move as the gain was so large even a small probability of a cutoff made it worth trying. With all the other pruning and reduction that are commonly done now I do not know if that is still true.

Have people been looking at this and what has been found?

Re: When to do null move

Posted: Sun Jun 05, 2016 4:51 pm
by jdart
I don't think you can theoretically predict this very well. I think you have to try it and measure.

I do think based on experience that null move at depth == 2 is definitely beneficial.

--Jon

Re: When to do null move

Posted: Sun Jun 05, 2016 7:46 pm
by ZirconiumX
jwes wrote:I am trying to determine how to decide whether to try null move in a position. If I have done my math right, the formula is:

if (nF*pNFL/nN + f1 - f2 > 1) try null, where:

nN is the estimated number of node for a null move search.
nF is the estimated number of node for a full search.
pNFL is the estimated probability of the null move search causing a cutoff.
f1 is a fudge factor for the value of a null move search that does not cause a cutoff.
f2 is a fudge factor for the cost of a false positive.

Some plausible situations in which to avoid null move are:
Hash table says position failed low on the last ply.
Hash table says null move did not cause a cutoff on the last ply.
Depth remaining is 1.
Static evaluation or material is < alpha.
Static evaluation or material is < alpha and the last move was a capture (the probability of a cutoff is much lower if the last move was a capture).

One interesting situation is when depth remaining is 2 as the gain from a null move cutoff is much lower.

When null move was the major reduction, there was little point in spending much effort in avoiding null move as the gain was so large even a small probability of a cutoff made it worth trying. With all the other pruning and reduction that are commonly done now I do not know if that is still true.

Have people been looking at this and what has been found?
You appear to missing the trivial "don't nullmove in check" case.

Matthew:out

Re: When to do null move

Posted: Sun Jun 05, 2016 10:19 pm
by hgm
If Fairy-Max I do null move precisely for finding out whether I am in check. :lol:

Re: When to do null move

Posted: Thu Jun 09, 2016 5:30 pm
by jwes
jdart wrote:I don't think you can theoretically predict this very well. I think you have to try it and measure.

I do think based on experience that null move at depth == 2 is definitely beneficial.

--Jon
My point was more that there might be more gain in choosing when to do or not do null move at remaining depth 2.