Apply delayed-loss bonus to analogy
authorH.G.Muller <hgm@hgm-xboard.(none)>
Mon, 15 May 2017 09:26:17 +0000 (11:26 +0200)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Mon, 15 May 2017 09:26:17 +0000 (11:26 +0200)
When we stand pat on an analogy, which usually represents the score of a
deeper search, this could be smaller than the current evaluation, and thus
deserve a delayed-loss bonus.

dropper.c

index ca7d65a..c05fd91 100644 (file)
--- a/dropper.c
+++ b/dropper.c
@@ -1199,7 +1199,7 @@ if(hashMove && board[hashMove>>8&255] == 0) {char s[100];sprintf(s,"bad hash mov
     if(depth <= 0) { // QS
        if(ff->checker != CK_NONE && ff->tpGain > 0) anaEval = 50-INF; // forbid stand pat if horizon check tossed material
        if(anaEval > alpha) {
-           if(anaEval >= beta) { ff->depth = 1; moveSP = oldSP; return anaEval; } // stand-pat cutoff
+           if(anaEval >= beta) { ff->depth = 1; moveSP = oldSP; return anaEval + (anaEval < curEval); } // stand-pat cutoff
            alpha = startScore = anaEval; maxDepth = 0; // we will not fail low, so no extra iterations
        }
        if(maxDepth <= 0) {