Skip to content

Commit

Permalink
Simplify increaseDepth to boolean expression
Browse files Browse the repository at this point in the history
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
  • Loading branch information
FauziAkram authored and Disservin committed Mar 12, 2024
1 parent 1a26d69 commit daa3ef9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/search.cpp
Expand Up @@ -464,11 +464,10 @@ void Search::Worker::iterative_deepening() {
else
threads.stop = true;
}
else if (!mainThread->ponder
&& mainThread->tm.elapsed(threads.nodes_searched()) > totalTime * 0.506)
threads.increaseDepth = false;
else
threads.increaseDepth = true;
threads.increaseDepth =
mainThread->ponder
|| mainThread->tm.elapsed(threads.nodes_searched()) <= totalTime * 0.506;
}

mainThread->iterValue[iterIdx] = bestValue;
Expand Down

0 comments on commit daa3ef9

Please sign in to comment.