Inherit killers from before check + evasion
authorH.G.Muller <hgm@hgm-xboard.(none)>
Tue, 7 Feb 2017 20:49:58 +0000 (21:49 +0100)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Tue, 7 Feb 2017 20:49:58 +0000 (21:49 +0100)
Normally killers of the next level are cleared when we enter a new node.
But if the move reaching the new node was a check evasion, we now set them
to the killers at this evasion level, to see if those still work after a
spite check.

dropper.c

index f8a0630..3655bd6 100644 (file)
--- a/dropper.c
+++ b/dropper.c
@@ -1170,7 +1170,8 @@ if(hashMove && board[hashMove>>8&255] == 0) {char s[100];sprintf(s,"bad hash mov
     curEval = f.pstEval + Evaluate(stm, f.rights);
     alpha -= (alpha < curEval); //pre-compensate delayed-loss bonus
     beta  -= (beta <= curEval);
-    killers[ply+1][0] = killers[ply+1][1] = 0;
+    if(ff->checker == CK_NONE) killers[ply+1][0] = killers[ply+1][1] /* = killers[ply+1][2]*/ = 0;
+    else if(ply > 0) killers[ply+1][0] = killers[ply-1][0], killers[ply+1][1] = killers[ply-1][1]; // inherit killers after check+evasion
     if(-INF >= beta) { moveSP = oldSP; return -INF+1; }