]> git.sesse.net Git - stockfish/commitdiff
Don't reset increaseDepth back to true after it has been set to false
authormstembera <MissingEmail@email>
Tue, 13 Dec 2022 07:22:02 +0000 (23:22 -0800)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Mon, 19 Dec 2022 17:15:09 +0000 (18:15 +0100)
Resetting increaseDepth back to true each time on the very next iteration was not intended so this is a bug fix and a simplification.
See more discussion here #2482 (comment) Thanks to xoto10

STC: https://tests.stockfishchess.org/tests/view/6398c74693ed41c57ede7bfd
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 51128 W: 13543 L: 13220 D: 24365
Ptnml(0-2): 165, 5363, 14174, 5708, 154

LTC: https://tests.stockfishchess.org/tests/view/6399bcd393ed41c57edea750
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 290864 W: 77282 L: 77334 D: 136248
Ptnml(0-2): 107, 28127, 89029, 28049, 120

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

bench: 3611278

src/search.cpp

index 4507460a5b639e40573e6af83e35b6f70eaa6767..d39a8ad275cc09f006b8790b0c1ab952311cf20b 100644 (file)
@@ -487,12 +487,11 @@ void Thread::search() {
               else
                   Threads.stop = true;
           }
-          else if (   Threads.increaseDepth
-                   && !mainThread->ponder
+          else if (   !mainThread->ponder
                    && Time.elapsed() > totalTime * 0.53)
-                   Threads.increaseDepth = false;
+              Threads.increaseDepth = false;
           else
-                   Threads.increaseDepth = true;
+              Threads.increaseDepth = true;
       }
 
       mainThread->iterValue[iterIdx] = bestValue;