From: H.G.Muller Date: Sat, 8 Dec 2018 13:29:28 +0000 (+0100) Subject: Fix pondering with incremental TC X-Git-Tag: v4.0~9 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=2b385df82d70d44518a167befa41e71fbd65c652;p=uci2wb.git 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. --- 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