Page 1 of 6

Null move: minimum depth

Posted: Mon Sep 14, 2015 11:37 am
by Henk
What is the minimum depth null move reduction can be applied without losing accuracy ? Assumption: epsilon <= 0.1; ignoring zugzwang; Depth is always decreased with 1 but null move uses -Search (depth- k, -ub, -(ub - 1)) // ub == beta

Re: Null move: minimum depth

Posted: Mon Sep 14, 2015 12:09 pm
by hgm
I usually apply the null move still at d=1. Obviously there is nothing to reduce then, as the reply would already be QS anyway. But that makes the null move only more reliable compared to the real moves.

If you would pick a real move in a d=1 cut-node you might either pick a capture that initiated an exchange that requires a lot of QS nodes to resolve, or a poor non-capture that wrecks something (e.g. because you moved away an essentialprotector of something else). With the null move you won't run such risks, and most of the moves in the preceding all-node would not have done anything useful, so the null move will be sufficient to refute them.

I sometimes read that dropping into QS directly with null move is a bad idea if you don't search checks in the first QS levels. This then can only apply to cases where you truly reduce (as otherwise real moves would suffer frome xactly the same problem, so playing them instead would solve nothing). But limiting the reduction such that the null-move reply would have at least d=1 always tested as inferior for me. (I never tried doing checks in QS.)

Re: Null move: minimum depth

Posted: Mon Sep 14, 2015 12:41 pm
by Henk
hgm wrote:I usually apply the null move still at d=1. Obviously there is nothing to reduce then, as the reply would already be QS anyway. But that makes the null move only more reliable compared to the real moves.

If you would pick a real move in a d=1 cut-node you might either pick a capture that initiated an exchange that requires a lot of QS nodes to resolve, or a poor non-capture that wrecks something (e.g. because you moved away an essentialprotector of something else). With the null move you won't run such risks, and most of the moves in the preceding all-node would not have done anything useful, so the null move will be sufficient to refute them.

I sometimes read that dropping into QS directly with null move is a bad idea if you don't search checks in the first QS levels. This then can only apply to cases where you truly reduce (as otherwise real moves would suffer frome xactly the same problem, so playing them instead would solve nothing). But limiting the reduction such that the null-move reply would have at least d=1 always tested as inferior for me. (I never tried doing checks in QS.)
I think dropping in QS directly is not good for instance a passed pawn move might have refuted a null move easily.

Re: Null move: minimum depth

Posted: Mon Sep 14, 2015 1:03 pm
by hgm
But that holds just as much for the real moves as for the null move. If at d=3, where this would become an issue with the usual R=2, the null move would overlook this threat, you would just (after a far greater search effort) pick a move that trades something, so that on ply 2 he has to recapture, you can do a pointless non-capture on ply 3 to reach QS, where the passer push is overlooked too. Nothing would have been achieved making the null move recognize it, other than the searching of a few hundred extra nodes, after which you fail high anyway.

Of course QS will get a lot more accurate when it also searches passer (or other Pawn) pushes, and this might actually be worth the extra nodes this would require. Basically the purpose of QS is to search all moves that would cause a substantial score increase, which makes the current evaluation misleading. And like captures, Pawn pushes are also something that you will eventually run out of. A lot depends on whether the static evaluation already foresees such things. (E.g. awards points for passers that can be pushed to a safe square, or does not consider backward Pawns that can be pushed as backward.) But that all is an other issue, and has no bearing on null move vs real moves.

Re: Null move: minimum depth

Posted: Mon Sep 14, 2015 1:41 pm
by Henk
So minimum depth is k + 1 if you reduce with k unless all possible non capturing moves are extended that give (much) larger value in eval().

I doubt if a search of depth-k is always enough to refute a null move at depths even greater than k + 1.

depth - k search is less than the normal depth -1 at depths k >= 2.

Re: Null move: minimum depth

Posted: Mon Sep 14, 2015 2:17 pm
by hgm
It is not clear what you mean. Are you talking about the depth to which the null move is searched, or the depth to which its reply is searched? If you think a d=0 reply is never good enough, you will have a bad problem when searching real moves. How would you ever terminate a branch?

Re: Null move: minimum depth

Posted: Mon Sep 14, 2015 2:26 pm
by Henk
hgm wrote:It is not clear what you mean. Are you talking about the depth to which the null move is searched, or the depth to which its reply is searched? If you think a d=0 reply is never good enough, you will have a bad problem when searching real moves. How would you ever terminate a branch?
I am talking about the depth the reply is searched of course. depth -k is less than depth -1 when k > 1.

Maybe best for me to not use null move at all. Any doubt out. Much easier when debugging. If I find errors it is because search horizon or bad eval. Don't care about elo if elo << 1800.

Re: Null move: minimum depth

Posted: Mon Sep 14, 2015 2:34 pm
by hgm
Well, you should always first get it working without null move. Then you can switch on the null move, and test whether it indeed gives you the exected strength improvement.

Re: Null move: minimum depth

Posted: Mon Sep 14, 2015 3:31 pm
by bob
Henk wrote:What is the minimum depth null move reduction can be applied without losing accuracy ? Assumption: epsilon <= 0.1; ignoring zugzwang; Depth is always decreased with 1 but null move uses -Search (depth- k, -ub, -(ub - 1)) // ub == beta
There is no minimum. However, if you do not do checks in q-search, you can begin to encounter problems and you might want to never do a null-move close enough to a depth=0 position so that you drop from null-move into q-search (captures only). That will overlook a lot of mate threats.

Re: Null move: minimum depth

Posted: Mon Sep 14, 2015 3:41 pm
by hgm
bob wrote: However, if you do not do checks in q-search, you can begin to encounter problems and you might want to never do a null-move close enough to a depth=0 position so that you drop from null-move into q-search (captures only). That will overlook a lot of mate threats.
And at d=1 all the other moves will overlook those mate threats too... So playing those instead of null move doesn;t seem to solve a whole lot.