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