mirror of
https://github.com/sockspls/badfish
synced 2025-05-01 17:19:36 +00:00
Simplify away some unneeded code in time management
The lower bound of the clamp is never used since complexity can't be negative and thus is unneeded. closes https://github.com/official-stockfish/Stockfish/pull/4105 No functional change
This commit is contained in:
parent
2e02dd7936
commit
95d24b77df
1 changed files with 1 additions and 1 deletions
|
@ -474,7 +474,7 @@ void Thread::search() {
|
||||||
double reduction = (1.56 + mainThread->previousTimeReduction) / (2.20 * timeReduction);
|
double reduction = (1.56 + mainThread->previousTimeReduction) / (2.20 * timeReduction);
|
||||||
double bestMoveInstability = 1 + 1.7 * totBestMoveChanges / Threads.size();
|
double bestMoveInstability = 1 + 1.7 * totBestMoveChanges / Threads.size();
|
||||||
int complexity = mainThread->complexityAverage.value();
|
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;
|
double totalTime = Time.optimum() * fallingEval * reduction * bestMoveInstability * complexPosition;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue