From: H.G.Muller Date: Sat, 17 Feb 2018 18:26:54 +0000 (+0100) Subject: Fix score-range return on pin break X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=50d734dc5f4ee65d3c38618b8f91569ea90c4c23;p=crazywa.git 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. --- 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; + } }