Skip to content

Commit 64e8e1b

Browse files
aronpetkovondele
authored andcommitted
Simplify LMR extension limit formula
This patch simplifies the maximum depth formula that reductions in LMR can allow. Passed STC LLR: 2.93 (-2.94,2.94) <-1.75,0.25> Total: 35616 W: 9358 L: 9139 D: 17119 Ptnml(0-2): 101, 4051, 9278, 4284, 94 https://tests.stockfishchess.org/tests/view/688608cf966ed85face24882 Passed LTC LLR: 2.95 (-2.94,2.94) <-1.75,0.25> Total: 22284 W: 5833 L: 5613 D: 10838 Ptnml(0-2): 8, 2367, 6173, 2585, 9 https://tests.stockfishchess.org/tests/view/68860d7f966ed85face248d5 closes #6191 Bench: 2902492
1 parent 525a574 commit 64e8e1b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/search.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,9 +1219,7 @@ Value Search::Worker::search(
12191219
// beyond the first move depth.
12201220
// To prevent problems when the max value is less than the min value,
12211221
// std::clamp has been replaced by a more robust implementation.
1222-
Depth d = std::max(1, std::min(newDepth - r / 1024,
1223-
newDepth + !allNode + (PvNode && !bestMove)))
1224-
+ PvNode;
1222+
Depth d = std::max(1, std::min(newDepth - r / 1024, newDepth + 1 + PvNode)) + PvNode;
12251223

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

0 commit comments

Comments
 (0)