From 0f102f3692f3b21a2c8add92ba867bc8de362c8d Mon Sep 17 00:00:00 2001 From: Shawn Xu Date: Sun, 18 May 2025 13:44:29 -0700 Subject: [PATCH] Simplify Quiet Early Move Penalty Passed STC: LLR: 2.94 (-2.94,2.94) <-1.75,0.25> Total: 185344 W: 47995 L: 47939 D: 89410 Ptnml(0-2): 527, 21898, 47754, 21978, 515 https://tests.stockfishchess.org/tests/view/682a47536ec7634154f9a3bc Passed LTC: LLR: 2.95 (-2.94,2.94) <-1.75,0.25> Total: 101706 W: 26050 L: 25912 D: 49744 Ptnml(0-2): 53, 11056, 28499, 11190, 55 https://tests.stockfishchess.org/tests/view/682a61736ec7634154f9a50e closes https://github.com/official-stockfish/Stockfish/pull/6072 Bench: 2012032 --- src/movepick.cpp | 5 ++--- src/search.cpp | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/movepick.cpp b/src/movepick.cpp index b0059bd3..1df0b0cc 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -249,7 +249,7 @@ top: if (!skipQuiets) { cur = endBadQuiets = endBadCaptures; - endMoves = generate(pos, cur); + endMoves = generate(pos, cur); score(); partial_insertion_sort(cur, endMoves, -3560 * depth); @@ -260,8 +260,7 @@ top: case GOOD_QUIET : if (!skipQuiets && select([&]() { - return cur->value > -14000 ? true - : (*endBadQuiets++ = *cur, false); + return cur->value > -14000 ? true : (*endBadQuiets++ = *cur, false); })) return *(cur - 1); diff --git a/src/search.cpp b/src/search.cpp index bb9ce68b..5f20e593 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1900,8 +1900,7 @@ void update_all_stats(const Position& pos, // Extra penalty for a quiet early move that was not a TT move in // previous ply when it gets refuted. if (prevSq != SQ_NONE && ((ss - 1)->moveCount == 1 + (ss - 1)->ttHit) && !pos.captured_piece()) - update_continuation_histories(ss - 1, pos.piece_on(prevSq), prevSq, - -malus * (512 + depth * 16) / 1024); + update_continuation_histories(ss - 1, pos.piece_on(prevSq), prevSq, -malus * 580 / 1024); // Decrease stats for all non-best capture moves for (Move move : capturesSearched)