From 9e38023a8c2c67204f9a5d03eac5d5f00ea93d3f Mon Sep 17 00:00:00 2001 From: Daniel Monroe Date: Fri, 31 Oct 2025 02:18:22 -0400 Subject: [PATCH] Simplify threat term in movepick Passed simplification STC LLR: 2.97 (-2.94,2.94) <-1.75,0.25> Total: 71296 W: 18605 L: 18419 D: 34272 Ptnml(0-2): 250, 8374, 18183, 8622, 219 https://tests.stockfishchess.org/tests/view/690454c7ea4b268f1fac1bbe Passed simplification LTC LLR: 2.94 (-2.94,2.94) <-1.75,0.25> Total: 240552 W: 61870 L: 61874 D: 116808 Ptnml(0-2): 113, 26300, 67460, 26284, 119 https://tests.stockfishchess.org/tests/view/69063956ea4b268f1fac1f66 closes https://github.com/official-stockfish/Stockfish/pull/6401 bench 2697501 --- src/movepick.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/movepick.cpp b/src/movepick.cpp index b5b02609e..0b18cf565 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -171,9 +171,8 @@ ExtMove* MovePicker::score(MoveList& ml) { // penalty for moving to a square threatened by a lesser piece // or bonus for escaping an attack by a lesser piece. - static constexpr int bonus[KING + 1] = {0, 0, 144, 144, 256, 517, 10000}; - int v = threatByLesser[pt] & to ? -95 : 100 * bool(threatByLesser[pt] & from); - m.value += bonus[pt] * v; + int v = threatByLesser[pt] & to ? -19 : 20 * bool(threatByLesser[pt] & from); + m.value += PieceValue[pt] * v; if (ply < LOW_PLY_HISTORY_SIZE)