Skip to content

Commit f29d0b4

Browse files
author
Daniel Samek
committed
timemanager changes
1 parent a26959a commit f29d0b4

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/timemanager.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,15 @@
22
#include "timemanager.h"
33

44
int Timemanager::getSearchTime(int timeRemaining, int increment, bool exact) {
5-
// minimum search time at least for depth = 1 - for some move.
6-
const auto minMs = 1;
5+
const auto minMs = 5;
76

8-
auto msCanBeUsed = exact ? timeRemaining : timeRemaining / 18;
7+
auto msCanBeUsed = exact ? timeRemaining : timeRemaining / 20;
98
// increment
109
msCanBeUsed += increment / 2 + increment / 4;
1110

1211
// if we are out of time, clamp it.
1312
if(msCanBeUsed >= timeRemaining && !exact){
14-
msCanBeUsed = std::clamp(msCanBeUsed, minMs, timeRemaining / 18);
13+
msCanBeUsed = std::clamp(msCanBeUsed, minMs, timeRemaining / 20);
1514
}
1615
return msCanBeUsed;
1716
}

0 commit comments

Comments
 (0)