Merge pull request #32 from rektdie/soft_tm
added soft tm | bench 902872
This commit was merged in pull request #32.
This commit is contained in:
1 file changed
+9
-1
+9
-1
@@ -318,6 +318,7 @@ static SearchResults ID(Board &board, SearchParams params) {
|
||||
|
||||
for (int depth = 1; depth <= 99; depth++) {
|
||||
timeToSearch = (fullTime / 20) + (inc / 2);
|
||||
int softTime = timeToSearch * 0.65;
|
||||
|
||||
SearchResults currentResults = PVS<true>(board, depth, alpha, beta, ply);
|
||||
|
||||
@@ -343,7 +344,14 @@ static SearchResults ID(Board &board, SearchParams params) {
|
||||
safeResults = currentResults;
|
||||
}
|
||||
|
||||
if (searchStopped) break;
|
||||
if (searchStopped) {
|
||||
break;
|
||||
} else {
|
||||
if (sw.GetElapsedMS() >= softTime) {
|
||||
StopSearch();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << "info ";
|
||||
std::cout << "depth " << depth;
|
||||
|
||||
Reference in new issue
Block a user