mirror of
https://github.com/sockspls/badfish
synced 2025-05-01 01:03:09 +00:00
Remove rootDelta branch
This makes rootDelta logic easier to understand, recalculating the value where it belongs so removes an unnecessary branch. Passed non-regression STC: https://tests.stockfishchess.org/tests/view/664fc147a86388d5e27d8d8e LLR: 2.94 (-2.94,2.94) <-1.75,0.25> Total: 206016 W: 53120 L: 53089 D: 99807 Ptnml(0-2): 591, 20928, 59888, 21061, 540 closes https://github.com/official-stockfish/Stockfish/pull/5289 No functional change
This commit is contained in:
parent
8bc3fd3871
commit
8e1f273c7d
1 changed files with 1 additions and 2 deletions
|
@ -330,6 +330,7 @@ void Search::Worker::iterative_deepening() {
|
||||||
// for every four searchAgain steps (see issue #2717).
|
// for every four searchAgain steps (see issue #2717).
|
||||||
Depth adjustedDepth =
|
Depth adjustedDepth =
|
||||||
std::max(1, rootDepth - failedHighCnt - 3 * (searchAgainCounter + 1) / 4);
|
std::max(1, rootDepth - failedHighCnt - 3 * (searchAgainCounter + 1) / 4);
|
||||||
|
rootDelta = beta - alpha;
|
||||||
bestValue = search<Root>(rootPos, ss, alpha, beta, adjustedDepth, false);
|
bestValue = search<Root>(rootPos, ss, alpha, beta, adjustedDepth, false);
|
||||||
|
|
||||||
// Bring the best move to the front. It is critical that sorting
|
// Bring the best move to the front. It is critical that sorting
|
||||||
|
@ -590,8 +591,6 @@ Value Search::Worker::search(
|
||||||
if (alpha >= beta)
|
if (alpha >= beta)
|
||||||
return alpha;
|
return alpha;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
thisThread->rootDelta = beta - alpha;
|
|
||||||
|
|
||||||
assert(0 <= ss->ply && ss->ply < MAX_PLY);
|
assert(0 <= ss->ply && ss->ply < MAX_PLY);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue