Allow some nodes to spawn even deeper lmr searches

This includes nodes that were PvNode on a previous ply and only for non cutNodes and movecounts < 8.

Passed STC:
https://tests.stockfishchess.org/tests/view/680cdf2e3629b02d74b15576
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 123552 W: 31979 L: 31539 D: 60034
Ptnml(0-2): 322, 14449, 31803, 14871, 331

Passed LTC:
https://tests.stockfishchess.org/tests/view/680cf09a3629b02d74b15599
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 114306 W: 29310 L: 28837 D: 56159
Ptnml(0-2): 51, 12247, 32090, 12708, 57

closes https://github.com/official-stockfish/Stockfish/pull/6022

bench: 1585741
This commit is contained in:
Michael Chaly
2025-04-26 19:48:20 +03:00
committed by Joost VandeVondele
parent 4b58079485
commit 27428a61c2
2 changed files with 5 additions and 2 deletions

View File

@@ -708,6 +708,7 @@ Value Search::Worker::search(
(ss + 2)->cutoffCnt = 0;
Square prevSq = ((ss - 1)->currentMove).is_ok() ? ((ss - 1)->currentMove).to_sq() : SQ_NONE;
ss->statScore = 0;
ss->isPvNode = PvNode;
// Step 4. Transposition table lookup
excludedMove = ss->excludedMove;
@@ -1281,8 +1282,9 @@ moves_loop: // When in check, search starts here
// std::clamp has been replaced by a more robust implementation.
Depth d = std::max(
1, std::min(newDepth - r / 1024, newDepth + !allNode + (PvNode && !bestMove)));
Depth d = std::max(1, std::min(newDepth - r / 1024,
newDepth + !allNode + (PvNode && !bestMove)))
+ (!cutNode && (ss - 1)->isPvNode && moveCount < 8);
ss->reduction = newDepth - d;

View File

@@ -76,6 +76,7 @@ struct Stack {
int cutoffCnt;
int reduction;
bool isTTMove;
bool isPvNode;
};