Skip to content

Commit

Permalink
Allow Pv nodes at certain conditions to spawn zero window searches de…
Browse files Browse the repository at this point in the history
…eper than default

In current case it's allowed if there is no best move.

Passed STC:
https://tests.stockfishchess.org/tests/view/67640fd586d5ee47d9543d5a
LLR: 2.96 (-2.94,2.94) <0.00,2.00>
Total: 392480 W: 102038 L: 101192 D: 189250
Ptnml(0-2): 1303, 46287, 100253, 47055, 1342

Passed LTC:
https://tests.stockfishchess.org/tests/view/67671a4686d5ee47d9544476
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 128616 W: 32941 L: 32433 D: 63242
Ptnml(0-2): 84, 13997, 35634, 14513, 80

closes #5733

Bench: 1095871
  • Loading branch information
Vizvezdenec authored and Disservin committed Jan 5, 2025
1 parent f656fdf commit 03e4cde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,7 @@ Value Search::Worker::search(
// beyond the first move depth.
// To prevent problems when the max value is less than the min value,
// std::clamp has been replaced by a more robust implementation.
Depth d = std::max(1, std::min(newDepth - r / 1024, newDepth + !allNode));
Depth d = std::max(1, std::min(newDepth - r / 1024, newDepth + !allNode + (PvNode && !bestMove)));

value = -search<NonPV>(pos, ss + 1, -(alpha + 1), -alpha, d, true);

Expand Down

0 comments on commit 03e4cde

Please sign in to comment.