Reduce null move less after first spite check
authorH.G.Muller <hgm@hgm-xboard.(none)>
Sun, 14 May 2017 13:19:38 +0000 (15:19 +0200)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Sun, 14 May 2017 13:19:38 +0000 (15:19 +0200)
The null-move reduction is aken one ply less after the first (check, evasion)
pair in a branch, to prevent spite checks pushing unavoidable mates over
the null-search horizon.

dropper.c

index c8019d9..90fc7b2 100644 (file)
--- a/dropper.c
+++ b/dropper.c
@@ -1207,6 +1207,8 @@ if(hashMove && board[hashMove>>8&255] == 0) {char s[100];sprintf(s,"bad hash mov
        }
     } else if(curEval >= beta && f.checker == CK_NONE) {
        int nullDepth = depth - 3;
+       int eva = (ff->checker != CK_NONE) && !oldAna && nullDepth >= 0; // first evasion in branch, and depth of null-move search was higher before the check
+       nullDepth += eva; // reduce one less than normal after first evasion, to make sure we see same threats after spite check
        if(nullDepth < 0) nullDepth = 0;
        f.mutation = -2; // kludge to suppress testing for discovered check
        f.newEval = f.pstEval;