]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Remove CONNECTED_KINGS from Syzygy code
[stockfish] / src / search.cpp
index 0901187acee2af63bebbc120bed03e33948962da..0005391fd833f2ba5eb5b379f1964686b0450641 100644 (file)
 #include "thread.h"
 #include "tt.h"
 #include "uci.h"
-
-#ifdef SYZYGY
 #include "syzygy/tbprobe.h"
-#endif
 
 namespace Search {
 
@@ -207,7 +204,6 @@ void Search::think() {
   }
   else
   {
-#ifdef SYZYGY
       // Check Tablebases at root
       int piecesCnt = RootPos.total_piece_count();
       TBCardinality = Options["SyzygyProbeLimit"];
@@ -259,7 +255,6 @@ void Search::think() {
                       : TBScore;
           }
       }
-#endif
 
       for (size_t i = 0; i < Threads.size(); ++i)
           Threads[i]->maxPly = 0;
@@ -552,7 +547,6 @@ namespace {
         return ttValue;
     }
 
-#ifdef SYZYGY
     // Step 4a. Tablebase probe
     if (   !RootNode
         && pos.total_piece_count() <= TBCardinality
@@ -583,7 +577,6 @@ namespace {
             return value;
         }
     }
-#endif
 
     // Step 5. Evaluate the position statically and update parent's gain statistics
     if (inCheck)
@@ -1451,14 +1444,8 @@ moves_loop: // When in check and at SpNode search starts from here
         Depth d = updated ? depth : depth - ONE_PLY;
         Value v = updated ? RootMoves[i].score : RootMoves[i].prevScore;
 
-        bool tb = RootInTB;
-        if (tb)
-        {
-            if (abs(v) >= VALUE_MATE - MAX_PLY)
-                tb = false;
-            else
-                v = TBScore;
-        }
+        bool tb = RootInTB && abs(v) < VALUE_MATE - MAX_PLY;
+        v = tb ? TBScore : v;
 
         if (ss.rdbuf()->in_avail()) // Not at first line
             ss << "\n";