From fb6be17ad40d321b5fff02395bc156568fce3091 Mon Sep 17 00:00:00 2001 From: Daniel Monroe Date: Sun, 17 Nov 2024 20:46:30 -0800 Subject: [PATCH] Simplify statscore at captures Simplify statscores for captures, setting them to 0 A recent tweak of Vizvezdenec finds substantial elo gain from giving captures a separate statscore, which is used mainly for reductions. The idea is that the old combination of quiet histories was inappropriate and that a value based on the capture history is more suitable. This simplification sets the statscore for captures to 0, suggesting that the elo gain came from rectifying the quiet history/capture mismatch. Passed STC (against a slightly older version of Viz's patch) https://tests.stockfishchess.org/tests/view/673ac6e286d5ee47d953f0ec LR: 2.96 (-2.94,2.94) <-1.75,0.25> Total: 57312 W: 14872 L: 14672 D: 27768 Ptnml(0-2): 152, 6761, 14649, 6923, 171 Passed LTC (against Viz's newest patch) https://tests.stockfishchess.org/tests/view/673cd00686d5ee47d953f2db LLR: 2.95 (-2.94,2.94) <-1.75,0.25> Total: 88236 W: 22510 L: 22358 D: 43368 Ptnml(0-2): 70, 9530, 24745, 9724, 49 closes https://github.com/official-stockfish/Stockfish/pull/5691 Bench: 959947 --- src/search.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index ace6385d7f0..560b031bae7 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -538,7 +538,7 @@ Value Search::Worker::search( // Dive into quiescence search when the depth reaches zero if (depth <= 0) - return qsearch < PvNode ? PV : NonPV > (pos, ss, alpha, beta); + return qsearch(pos, ss, alpha, beta); // Limit the depth if extensions made it too large depth = std::min(depth, MAX_PLY - 1); @@ -1181,9 +1181,7 @@ Value Search::Worker::search( r -= 1879; if (capture) - ss->statScore = - thisThread->captureHistory[movedPiece][move.to_sq()][type_of(pos.captured_piece())] - - 5454; + ss->statScore = 0; else ss->statScore = 2 * thisThread->mainHistory[us][move.from_to()] + (*contHist[0])[movedPiece][move.to_sq()]