From: bmc4 Date: Thu, 14 Oct 2021 03:44:46 +0000 (-0300) Subject: Simplify ttHitAverage away X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=0bddd942b4d096ff31132a4c3e7aef016d0f2d41 Simplify ttHitAverage away Simplify ttHitAverage away, which was introduced in the following commit: [here](https://github.com/BM123499/Stockfish/commit/fe124896b241b4791454fd151da10101ad48f6d7) A few tweaks with Elo gaining bounds have been tried to keep the code, but they all failed: https://tests.stockfishchess.org/tests/view/61656f7683dd501a05b0b292 https://tests.stockfishchess.org/tests/view/6165c0ca83dd501a05b0b2ca https://tests.stockfishchess.org/tests/view/6165bf9683dd501a05b0b2c8 https://tests.stockfishchess.org/tests/view/6165719483dd501a05b0b29b https://tests.stockfishchess.org/tests/view/6166c7fd83dd501a05b0b353 https://tests.stockfishchess.org/tests/view/6166c63b83dd501a05b0b350 STC: LLR: 2.94 (-2.94,2.94) <-2.50,0.50> Total: 58504 W: 14781 L: 14694 D: 29029 Ptnml(0-2): 175, 6718, 15426, 6711, 222 https://tests.stockfishchess.org/tests/view/6165112c83dd501a05b0b257 LTC: LLR: 2.96 (-2.94,2.94) <-2.50,0.50> Total: 33480 W: 8448 L: 8332 D: 16700 Ptnml(0-2): 21, 3569, 9447, 3679, 24 https://tests.stockfishchess.org/tests/view/61656fcf83dd501a05b0b294 change https://github.com/official-stockfish/Stockfish/pull/3739 bench: 4540339 --- diff --git a/src/search.cpp b/src/search.cpp index 28049e87..bdd139ce 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -332,7 +332,6 @@ void Thread::search() { multiPV = std::min(multiPV, rootMoves.size()); - ttHitAverage.set(50, 100); // initialize the running average at 50% doubleExtensionAverage[WHITE].set(0, 100); // initialize the running average at 0% doubleExtensionAverage[BLACK].set(0, 100); // initialize the running average at 0% @@ -670,9 +669,6 @@ namespace { && is_ok((ss-1)->currentMove)) thisThread->lowPlyHistory[ss->ply - 1][from_to((ss-1)->currentMove)] << stat_bonus(depth - 5); - // running average of ttHit - thisThread->ttHitAverage.update(ss->ttHit); - // At non-PV nodes we check for an early TT cutoff if ( !PvNode && ss->ttHit @@ -1182,10 +1178,6 @@ moves_loop: // When in check, search starts here && bestMoveCount <= 3) r--; - // Decrease reduction if the ttHit running average is large (~0 Elo) - if (thisThread->ttHitAverage.is_greater(537, 1024)) - r--; - // Decrease reduction if position is or has been on the PV // and node is not likely to fail low. (~3 Elo) if ( ss->ttPv diff --git a/src/thread.h b/src/thread.h index 2475d2ec..e04d303a 100644 --- a/src/thread.h +++ b/src/thread.h @@ -60,7 +60,6 @@ public: Pawns::Table pawnsTable; Material::Table materialTable; size_t pvIdx, pvLast; - RunningAverage ttHitAverage; RunningAverage doubleExtensionAverage[COLOR_NB]; uint64_t nodesLastExplosive; uint64_t nodesLastNormal;