Null move: minimum depth

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Henk
Posts: 5799
Joined: Mon May 27, 2013 8:31 am

Null move: minimum depth

Post by Henk » Mon Sep 14, 2015 9:37 am

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

User avatar
hgm
Posts: 23615
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: Null move: minimum depth

Post by hgm » Mon Sep 14, 2015 10:09 am

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.)

Henk
Posts: 5799
Joined: Mon May 27, 2013 8:31 am

Re: Null move: minimum depth

Post by Henk » Mon Sep 14, 2015 10:41 am

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.

User avatar
hgm
Posts: 23615
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: Null move: minimum depth

Post by hgm » Mon Sep 14, 2015 11:03 am

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.

Henk
Posts: 5799
Joined: Mon May 27, 2013 8:31 am

Re: Null move: minimum depth

Post by Henk » Mon Sep 14, 2015 11:41 am

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.

User avatar
hgm
Posts: 23615
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: Null move: minimum depth

Post by hgm » Mon Sep 14, 2015 12:17 pm

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?

Henk
Posts: 5799
Joined: Mon May 27, 2013 8:31 am

Re: Null move: minimum depth

Post by Henk » Mon Sep 14, 2015 12:26 pm

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.
Last edited by Henk on Mon Sep 14, 2015 12:35 pm, edited 1 time in total.

User avatar
hgm
Posts: 23615
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: Null move: minimum depth

Post by hgm » Mon Sep 14, 2015 12:34 pm

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.

bob
Posts: 20478
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: Null move: minimum depth

Post by bob » Mon Sep 14, 2015 1:31 pm

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.

User avatar
hgm
Posts: 23615
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: Null move: minimum depth

Post by hgm » Mon Sep 14, 2015 1:41 pm

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.

Post Reply