]> git.sesse.net Git - stockfish/commitdiff
Update failedHighCnt rule #2063
authorxoto10 <buylow001@gmail.com>
Sun, 31 Mar 2019 15:33:32 +0000 (16:33 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Wed, 15 May 2019 09:23:07 +0000 (11:23 +0200)
Treat all threads the same as main thread and increment
failedHighCnt on fail highs. This makes the search try
again at lower depth.

@vondele suggested also changing the reset of failedHighCnt
when there is a fail low. Tests including this passed so the
branch has been updated to include both changes. failedHighCnt
is now handled exactly the same in helper threads and the main
thread. Thanks vondele :-)

STC @ 5+0.05 th 4 :
LLR: 2.94 (-2.94,2.94) [-3.00,1.00]
Total: 7769 W: 1704 L: 1557 D: 4508
http://tests.stockfishchess.org/tests/view/5c9f19520ebc5925cfffd2a1

LTC @ 20+0.2 th 8 :
LLR: 2.94 (-2.94,2.94) [-3.00,1.00]
Total: 37888 W: 5983 L: 5889 D: 26016
http://tests.stockfishchess.org/tests/view/5c9f57d10ebc5925cfffd696

Bench 3824325

src/search.cpp

index 0e9674a05cc6bad59c7f4089edf8ac3f73301dab..fdef140026bd529a52390e8954f536eff42fa5ef 100644 (file)
@@ -404,17 +404,14 @@ void Thread::search() {
                   beta = (alpha + beta) / 2;
                   alpha = std::max(bestValue - delta, -VALUE_INFINITE);
 
                   beta = (alpha + beta) / 2;
                   alpha = std::max(bestValue - delta, -VALUE_INFINITE);
 
+                  failedHighCnt = 0;
                   if (mainThread)
                   if (mainThread)
-                  {
-                      failedHighCnt = 0;
                       mainThread->stopOnPonderhit = false;
                       mainThread->stopOnPonderhit = false;
-                  }
               }
               else if (bestValue >= beta)
               {
                   beta = std::min(bestValue + delta, VALUE_INFINITE);
               }
               else if (bestValue >= beta)
               {
                   beta = std::min(bestValue + delta, VALUE_INFINITE);
-                  if (mainThread)
-                      ++failedHighCnt;
+                  ++failedHighCnt;
               }
               else
                   break;
               }
               else
                   break;