]> git.sesse.net Git - stockfish/commitdiff
Simplifiy TM's root complexity
authorDubslow <bunslow@gmail.com>
Sat, 1 Apr 2023 23:48:31 +0000 (18:48 -0500)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Wed, 5 Apr 2023 06:13:34 +0000 (08:13 +0200)
Also requires moving optimism initialization, this is a very early `evaluate()` call.

STC: https://tests.stockfishchess.org/tests/view/6428c39677ff3301150ca0d7
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 51256 W: 13805 L: 13612 D: 23839
Ptnml(0-2): 145, 5283, 14592, 5450, 158

LTC: https://tests.stockfishchess.org/tests/view/64296ff377ff3301150cc519
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 106968 W: 28951 L: 28830 D: 49187
Ptnml(0-2): 47, 9746, 33789, 9843, 59

closes https://github.com/official-stockfish/Stockfish/pull/4492

no functional change

src/search.cpp

index 46cca50f4b23040c60ae9c25fce257ef98f33ef9..becaee3a20a0bd4d734b90c9c5544984a994061f 100644 (file)
@@ -290,15 +290,13 @@ void Thread::search() {
 
   bestValue = delta = alpha = -VALUE_INFINITE;
   beta = VALUE_INFINITE;
+  optimism[us] = optimism[~us] = VALUE_ZERO;
 
   if (mainThread)
   {
 
       int rootComplexity;
-      if (Eval::useNNUE)
-          Eval::NNUE::evaluate(rootPos, true, &rootComplexity);
-      else
-          Eval::evaluate(rootPos, &rootComplexity);
+      Eval::evaluate(rootPos, &rootComplexity);
 
       mainThread->complexity = std::min(1.03 + (rootComplexity - 241) / 1552.0, 1.45);
 
@@ -320,8 +318,6 @@ void Thread::search() {
 
   multiPV = std::min(multiPV, rootMoves.size());
 
-  optimism[us] = optimism[~us] = VALUE_ZERO;
-
   int searchAgainCounter = 0;
 
   // Iterative deepening loop until requested to stop or the target depth is reached