From 6a5dda7f317e390eb4ca8368f0cff0594b69b7c7 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Fri, 18 Jan 2013 17:20:39 +0100 Subject: [PATCH] Improve time management --- hachu.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) 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; -- 1.7.0.4