From c714518fa7b1c57ef2e6b9ffbfe393f1010bb08c Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Tue, 7 Feb 2017 22:10:04 +0100 Subject: [PATCH] Set return move already when we get new PV Returning the move at the endof the iteration did not work if the iteration took an early exit. --- dropper.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dropper.c b/dropper.c index 0ba2078..7b65c34 100644 --- a/dropper.c +++ b/dropper.c @@ -1338,6 +1338,7 @@ printf("%d:%d:%d %2d. %08x %c%d%c%d %6d %6d %6d\n",ply,depth,iterDepth,curMove,m printf("%d %d %d %d", iterDepth, xbScore, ReadClock(0)/10, nodeCount); for(tail=pvStart; *tail; tail++) printf(" %s", MoveToText(*tail)); printf("\n"); fflush(stdout); + ff->move = moveStack[bestNr]; } } } @@ -1353,7 +1354,6 @@ if(PATH)printf("%d:%d:%d iter end, max=%d, alpha=%d start=%d\n", ply, depth,iter alpha = startAlpha; // reset alpha for next iteration // put best in front - ff->move = moveStack[bestNr]; if(bestNr > m.firstMove) { int bestMove = moveStack[bestNr]; if(bestNr == m.firstMove+1) moveStack[bestNr] = moveStack[m.firstMove]; else m.firstMove--; // swap first two, or prepend duplicat -- 1.7.0.4