From 78b57339394b284ee5d1fe32e5c2c285f80df550 Mon Sep 17 00:00:00 2001 From: Shawn Xu Date: Sat, 21 Dec 2024 12:06:35 -0800 Subject: [PATCH] Simplify post-lmr conthist bonus Passed Non-regression STC: LLR: 2.95 (-2.94,2.94) <-1.75,0.25> Total: 49184 W: 12735 L: 12528 D: 23921 Ptnml(0-2): 134, 5746, 12647, 5909, 156 https://tests.stockfishchess.org/tests/view/6765cd2e86d5ee47d954420e Passed Non-regression LTC: LLR: 2.94 (-2.94,2.94) <-1.75,0.25> Total: 177270 W: 45227 L: 45166 D: 86877 Ptnml(0-2): 132, 19498, 49302, 19583, 120 https://tests.stockfishchess.org/tests/view/676721fd86d5ee47d9544489 closes https://github.com/official-stockfish/Stockfish/pull/5734 Bench: 1042099 --- src/search.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 1fe89c4a..44394c1d 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1198,7 +1198,8 @@ moves_loop: // When in check, search starts here // 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 + (PvNode && !bestMove))); + Depth d = std::max( + 1, std::min(newDepth - r / 1024, newDepth + !allNode + (PvNode && !bestMove))); value = -search(pos, ss + 1, -(alpha + 1), -alpha, d, true); @@ -1216,8 +1217,8 @@ moves_loop: // When in check, search starts here value = -search(pos, ss + 1, -(alpha + 1), -alpha, newDepth, !cutNode); // Post LMR continuation history updates (~1 Elo) - int bonus = (value >= beta) * stat_bonus(newDepth); - update_continuation_histories(ss, movedPiece, move.to_sq(), bonus * 1427 / 1024); + int bonus = (value >= beta) * 2048; + update_continuation_histories(ss, movedPiece, move.to_sq(), bonus); } }