From 2b385df82d70d44518a167befa41e71fbd65c652 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Sat, 8 Dec 2018 14:29:28 +0100 Subject: [PATCH] Fix pondering with incremental TC To calculate the time left on our clock after giving a move, for the purpose of starting a ponder search for the next one, we subtracted the increment instead of adding it. --- UCI2WB.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/UCI2WB.c b/UCI2WB.c index 81a7e5f..5118c22 100644 --- a/UCI2WB.c +++ b/UCI2WB.c @@ -260,7 +260,7 @@ HandleEngineOutput() if(strstr(line+9, "(none)") || strstr(line+9, "null") || strstr(line+9, "0000")) { printf("%s\n", lastScore < -99999 ? "resign" : "1/2-1/2 {stalemate}"); computer = NONE; } sscanf(line, "bestmove %s", move[moveNr++]); - myTime -= (GetTickCount() - startTime)*1.02 + inc; // update own clock, so we can give correct wtime, btime with ponder + myTime -= (GetTickCount() - startTime)*1.02 - inc; // update own clock, so we can give correct wtime, btime with ponder if(mps && ((moveNr+1)/2) % mps == 0) myTime += tc; if(sTime) myTime = sTime; // new session or move starts stm = WHITE+BLACK - stm; // first start a new ponder search, if pondering is on and we have a move to ponder on -- 1.7.0.4