From 1b6975ac4151d503ca48c9d5d4bd18d5fa11f4b9 Mon Sep 17 00:00:00 2001 From: Mapika Date: Sat, 17 May 2025 18:01:25 +0200 Subject: [PATCH] Add quiet move streak tracking to search stack Passed STC: LLR: 2.93 (-2.94,2.94) <0.00,2.00> Total: 109344 W: 28473 L: 28053 D: 52818 Ptnml(0-2): 320, 12756, 28085, 13206, 305 https://tests.stockfishchess.org/tests/view/6828c43e6ec7634154f99a10 Passed LTC: LLR: 2.96 (-2.94,2.94) <0.50,2.50> Total: 76308 W: 19721 L: 19323 D: 37264 Ptnml(0-2): 39, 8145, 21386, 8547, 37 https://tests.stockfishchess.org/tests/view/6828f65a6ec7634154f99b72 closes https://github.com/official-stockfish/Stockfish/pull/6066 Bench: 2161814 --- AUTHORS | 1 + src/search.cpp | 5 +++++ src/search.h | 1 + 3 files changed, 7 insertions(+) diff --git a/AUTHORS b/AUTHORS index f1675860..8caa2285 100644 --- a/AUTHORS +++ b/AUTHORS @@ -148,6 +148,7 @@ Lucas Braesch (lucasart) Lyudmil Antonov (lantonov) Maciej Żenczykowski (zenczykowski) Malcolm Campbell (xoto10) +Mark Marosi (Mapika) Mark Tenzer (31m059) marotear Mathias Parnaudeau (mparnaudeau) diff --git a/src/search.cpp b/src/search.cpp index 857a8d47..0af54b4f 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1004,6 +1004,8 @@ moves_loop: // When in check, search starts here movedPiece = pos.moved_piece(move); givesCheck = pos.gives_check(move); + (ss + 1)->quietMoveStreak = (!capture && !givesCheck) ? (ss->quietMoveStreak + 1) : 0; + // Calculate new depth for this move newDepth = depth - 1; @@ -1198,6 +1200,9 @@ moves_loop: // When in check, search starts here if ((ss + 1)->cutoffCnt > 2) r += 1036 + allNode * 848; + if (!capture && !givesCheck && ss->quietMoveStreak >= 2) + r += (ss->quietMoveStreak - 1) * 50; + // For first picked move (ttMove) reduce reduction else if (move == ttData.move) r -= 2006; diff --git a/src/search.h b/src/search.h index 0c041c82..5caff10e 100644 --- a/src/search.h +++ b/src/search.h @@ -76,6 +76,7 @@ struct Stack { int cutoffCnt; int reduction; bool isPvNode; + int quietMoveStreak; };