From 50d734dc5f4ee65d3c38618b8f91569ea90c4c23 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Sat, 17 Feb 2018 19:26:54 +0100 Subject: [PATCH] Fix score-range return on pin break The lower end of the score range was not returned when a node was aborted because the pin test detected King capture. --- dropper.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dropper.c b/dropper.c index 959a50a..b46c031 100644 --- a/dropper.c +++ b/dropper.c @@ -1124,8 +1124,10 @@ Search (int stm, int alpha, int beta, StackFrame *ff, int depth, int reduction, if(ply > 90) { if(DEBUG) Dump("maxply"); ff->depth = 0; ff->lim = ff->newEval-150; return -ff->newEval+150; } f.xking = location[stm+31]; // opponent King, as stm not yet toggled if(!earlyGen && ff->mutation > 0) { // if other piece was moved (not dropped!), abort with +INF score if it was pinned - if(Pinned(stm, ff->fromSqr, f.xking)) return INF; - if(board[ff->captSqr] == 0 && Pinned(stm, ff->captSqr, f.xking)) return INF; // also check 'e.p. pin' + if(Pinned(stm, ff->fromSqr, f.xking) || + board[ff->captSqr] == 0 && Pinned(stm, ff->captSqr, f.xking)) { // also check 'e.p. pin' + ff->depth = MAXPLY; ff->lim = -INF; return INF; + } } -- 1.7.0.4