Skip to content

Commit daa3ef9

Browse files
FauziAkramDisservin
authored andcommitted
Simplify increaseDepth to boolean expression
Non-functional Simplification, maintaining the same logic as before. Big thanks to @peregrineshahin for helping with the code. Passed non-regression bounds: https://tests.stockfishchess.org/tests/view/65ec93860ec64f0526c42375 LLR: 2.93 (-2.94,2.94) <-1.75,0.25> Total: 101088 W: 26196 L: 26047 D: 48845 Ptnml(0-2): 405, 11580, 26473, 11633, 453 closes #5103 No functional change
1 parent 1a26d69 commit daa3ef9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/search.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -464,11 +464,10 @@ void Search::Worker::iterative_deepening() {
464464
else
465465
threads.stop = true;
466466
}
467-
else if (!mainThread->ponder
468-
&& mainThread->tm.elapsed(threads.nodes_searched()) > totalTime * 0.506)
469-
threads.increaseDepth = false;
470467
else
471-
threads.increaseDepth = true;
468+
threads.increaseDepth =
469+
mainThread->ponder
470+
|| mainThread->tm.elapsed(threads.nodes_searched()) <= totalTime * 0.506;
472471
}
473472

474473
mainThread->iterValue[iterIdx] = bestValue;

0 commit comments

Comments
 (0)