From 472738ff51eb8fba430ac394bee981cef6514e03 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Mon, 6 Feb 2017 22:57:38 +0100 Subject: [PATCH] Do not try killers when in check Killer moves are unlikely to be check evasions. Also do not try to test null killers for (pseudo-)legality. --- dropper.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dropper.c b/dropper.c index a03acda..2d8f108 100644 --- a/dropper.c +++ b/dropper.c @@ -1218,8 +1218,10 @@ if(PATH)printf("%d:%d:%d new iter moveStack[%d..%d]\n",ply,depth,iterDepth,m.fir if(maxDepth <= 0) { resultDepth = 0; if(bestScore < curEval) bestScore = curEval; break; } // in QS we stop after captures switch(m.stage) { // we reached non-captures case 0: - if(PseudoLegal(stm, killer1)) moveStack[moveSP++] = moveStack[m.late], moveStack[m.late++] = killer1; // insert killers - if(PseudoLegal(stm, killer2)) moveStack[moveSP++] = moveStack[m.late], moveStack[m.late++] = killer2; // (original goes to end) + if(f.checker == CK_NONE) { // do not use killers when in check + if(killer1 && PseudoLegal(stm, killer1)) moveStack[moveSP++] = moveStack[m.late], moveStack[m.late++] = killer1; // insert killers + if(killer2 && PseudoLegal(stm, killer2)) moveStack[moveSP++] = moveStack[m.late], moveStack[m.late++] = killer2; // (original goes to end) + } m.drops = moveSP; // here we can sort based on history if(moveSP > m.late) qsort(moveStack + m.late, moveSP - m.late, sizeof(int), &HisComp); -- 1.7.0.4