]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Fix Singular extension condition to handle mate scores
[stockfish] / src / search.cpp
index 24fde88fc0ef5c1087cb43bdfd41a87d81c35f7f..8f9a369ae23d86a9a4d62d046a8f35ea4c9f6013 100644 (file)
@@ -700,7 +700,8 @@ moves_loop: // When in check and at SpNode search starts from here
                            &&  depth >= 8 * ONE_PLY
                            &&  abs(beta) < VALUE_KNOWN_WIN
                            &&  ttMove != MOVE_NONE
-                           &&  ttValue != VALUE_NONE
+                       /*  &&  ttValue != VALUE_NONE Already implicit in the next condition */
+                           &&  abs(ttValue) < VALUE_KNOWN_WIN
                            && !excludedMove // Recursive singular search is not allowed
                            && (tte->bound() & BOUND_LOWER)
                            &&  tte->depth() >= depth - 3 * ONE_PLY;
@@ -978,8 +979,8 @@ moves_loop: // When in check and at SpNode search starts from here
 
       // Step 19. Check for splitting the search
       if (   !SpNode
+          &&  Threads.size() >= 2
           &&  depth >= Threads.minimumSplitDepth
-          &&  Threads.available_slave(thisThread)
           &&  (   !thisThread->activeSplitPoint
                || !thisThread->activeSplitPoint->allSlavesSearching)
           &&  thisThread->splitPointsSize < MAX_SPLITPOINTS_PER_THREAD)