Suppress initiative bonus after spite check
authorH.G.Muller <hgm@hgm-xboard.(none)>
Sun, 18 Feb 2018 10:13:55 +0000 (11:13 +0100)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Sun, 18 Feb 2018 10:13:55 +0000 (11:13 +0100)
The bonus for a vulnerable opponent King should be added to the static
eval, but not to the 'undetermined mate score' replacing a stand pat
after a spite check (i.e. a check tossing material) + evasion made
us reach the horizon.

dropper.c

index 0535836..8261873 100644 (file)
--- a/dropper.c
+++ b/dropper.c
@@ -1246,7 +1246,7 @@ Search (int stm, int alpha, int beta, StackFrame *ff, int depth, int reduction,
        }
     }
 
-    if(depth <= 0) {
+    if(depth <= 0 && anaEval == curEval) {
        int bonus = (m.safety + 3*m.hole)*(10 + m.safety + m.hole + promoGain[stm+30] /*- 0*promoGain[COLOR-stm+30]*/) + 15*m.cBonus;
        bonus += (m.escape < 2 ? 200 - m.escape*100 : 0);
        if(bonus > 900) bonus = 900; // S4