]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Simplify away some unneeded code in time management
[stockfish] / src / search.cpp
index ca1d2632b531a628a8b105340982b3281d7394c0..c5c7f111e8803ee1f4330fa1b7e32b3d5037fb3e 100644 (file)
@@ -474,7 +474,7 @@ void Thread::search() {
           double reduction = (1.56 + mainThread->previousTimeReduction) / (2.20 * timeReduction);
           double bestMoveInstability = 1 + 1.7 * totBestMoveChanges / Threads.size();
           int complexity = mainThread->complexityAverage.value();
-          double complexPosition = std::clamp(1.0 + (complexity - 277) / 1819.1, 0.5, 1.5);
+          double complexPosition = std::min(1.0 + (complexity - 277) / 1819.1, 1.5);
 
           double totalTime = Time.optimum() * fallingEval * reduction * bestMoveInstability * complexPosition;