From: H.G.Muller Date: Mon, 29 May 2017 14:58:11 +0000 (+0200) Subject: Restore analogy stack pointer on second stand pat X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=05e9c04cc7f325698fa082687e1f6da3bd207903;p=crazywa.git Restore analogy stack pointer on second stand pat --- diff --git a/dropper.c b/dropper.c index 50079b2..9a7bd00 100644 --- a/dropper.c +++ b/dropper.c @@ -1202,7 +1202,7 @@ if(PATH)printf(" Hit, d=%d, checker = %x\n",entry->depth,f.checker); if(depth <= 0) { // QS if(ff->checker != CK_NONE && ff->tpGain > 0) anaEval = 50-INF; // forbid stand pat if horizon check tossed material if(anaEval > alpha) { - if(anaEval >= beta) { ff->depth = 1; moveSP = oldSP; return anaEval + (anaEval < curEval); } // stand-pat cutoff + if(anaEval >= beta) { ff->depth = 1; moveSP = oldSP; anaSP = oldna; return anaEval + (anaEval < curEval); } // stand-pat cutoff alpha = startScore = anaEval; maxDepth = 0; // we will not fail low, so no extra iterations } if(maxDepth <= 0) { @@ -1230,7 +1230,7 @@ if(PATH)printf(" Hit, d=%d, checker = %x\n",entry->depth,f.checker); // move generation if(!earlyGen) { // generate moves if we had not done so yet if(MoveGen(stm, &m, f.rights)) { // impossible (except for hash collision giving wrong in-check status) - if(DEBUG) Dump("King capture"); ff->depth = MAXPLY; moveSP = oldSP; return INF; + if(DEBUG) Dump("King capture"); ff->depth = MAXPLY; moveSP = oldSP; anaSP = oldAna; return INF; } if(f.checkDist && maxDepth <= 1) ipMask = SafeIP(&f); }