Skip to content

Commit aa69367

Browse files
committed
Auto generated
bench:4271540
1 parent bf25df4 commit aa69367

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src_files/search.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,9 +438,12 @@ Score Search::pvSearch(Board* b, Score alpha, Score beta, Depth depth, Depth ply
438438
}
439439

440440
// if the time is over, we fail hard to stop the search. We don't want to call the system clock
441-
// too often for speed reasons, so we only apply this when the depth is larger than 6.
442-
if ((depth > 6 && !timeManager->isTimeLeft(&td->searchData))) {
441+
// too often for speed reasons, so we only apply this when the node count is a multiple of 1024
442+
if ( td->nodes % 1024 == 0
443+
&& td->threadID == 0
444+
&& !timeManager->isTimeLeft(&td->searchData)) {
443445
td->dropOut = true;
446+
this->timeManager->stopSearch();
444447
return beta;
445448
}
446449

0 commit comments

Comments
 (0)