From: H.G. Muller Date: Fri, 18 Jan 2013 16:20:39 +0000 (+0100) Subject: Improve time management X-Git-Tag: 0.18~69 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=6a5dda7f317e390eb4ca8368f0cff0594b69b7c7;p=hachu.git Improve time management --- diff --git a/hachu.c b/hachu.c index 7fd6fb8..290fbf2 100644 --- a/hachu.c +++ b/hachu.c @@ -2029,9 +2029,10 @@ flag=0; int SearchBestMove (int stm, int timeLeft, int mps, int timeControl, int inc, int timePerMove, MOVE *move, MOVE *ponderMove) { - int score, targetTime, movesLeft = 50; + int score, targetTime, movesLeft = BW*BH/4 + 20; if(mps) movesLeft = mps - (moveNr>>1)%mps; targetTime = timeLeft*10 / (movesLeft + 2) + 1000 * inc; + if(moveNr < 30) targetTime *= 0.5 + moveNr/60.; // speedup in opening if(timePerMove > 0) targetTime = timeLeft * 5; startTime = GetTickCount(); tlim1 = 0.2*targetTime;