]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Use st->gamePly to store fullMoves
[stockfish] / src / search.cpp
index 94b34389178f0f18119d010bea23c8bdebf3d06e..29f573851186dda19a072f32127bc3418ec125a1 100644 (file)
@@ -393,7 +393,7 @@ bool think(Position& pos, const SearchLimits& limits, Move searchMoves[]) {
   NodesSincePoll = 0;
   current_search_time(get_system_time());
   Limits = limits;
-  TimeMgr.init(Limits, pos.startpos_ply_counter());
+  TimeMgr.init(Limits, pos.game_ply());
 
   // Set output steram in normal or chess960 mode
   cout << set960(pos.is_chess960());
@@ -633,12 +633,6 @@ namespace {
         // Check for some early stop condition
         if (!StopRequest && Limits.useTimeManagement())
         {
-            // Stop search early when the last two iterations returned a mate score
-            if (   depth >= 5
-                && abs(bestValues[depth])     >= VALUE_MATE_IN_PLY_MAX
-                && abs(bestValues[depth - 1]) >= VALUE_MATE_IN_PLY_MAX)
-                StopRequest = true;
-
             // Stop search early if one move seems to be much better than the
             // others or if there is only a single legal move. Also in the latter
             // case we search up to some depth anyway to get a proper score.