added soft tm | bench 902872 #32

Merged
rektdie merged 1 commits from soft_tm into main 2025-03-26 01:33:01 +01:00
+9 -1
View File
@@ -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;