X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=8d0c0c6b27199acc722d72e3188ce7c400a0f0b7;hp=a76a9521c9ee7a19d7ee52c231414a4ce111ba13;hb=4124c94583c8f618738e4e357d86bc8579a5cde5;hpb=a56322fde813094afd8ffa60d12761f94e0bd3ef diff --git a/src/search.cpp b/src/search.cpp index a76a9521..8d0c0c6b 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -254,7 +254,7 @@ void Search::think() { Chess960 = pos.is_chess960(); Eval::RootColor = pos.side_to_move(); SearchTime.restart(); - TimeMgr.init(Limits, pos.startpos_ply_counter()); + TimeMgr.init(Limits, pos.startpos_ply_counter(), pos.side_to_move()); TT.new_search(); H.clear(); @@ -292,9 +292,9 @@ void Search::think() { log << "\nSearching: " << pos.to_fen() << "\ninfinite: " << Limits.infinite << " ponder: " << Limits.ponder - << " time: " << Limits.time - << " increment: " << Limits.increment - << " moves to go: " << Limits.movesToGo + << " time: " << Limits.times[pos.side_to_move()] + << " increment: " << Limits.incs[pos.side_to_move()] + << " moves to go: " << Limits.movestogo << endl; } @@ -362,7 +362,7 @@ namespace { ss->currentMove = MOVE_NULL; // Hack to skip update gains // Iterative deepening loop until requested to stop or target depth reached - while (!Signals.stop && ++depth <= MAX_PLY && (!Limits.maxDepth || depth <= Limits.maxDepth)) + while (!Signals.stop && ++depth <= MAX_PLY && (!Limits.depth || depth <= Limits.depth)) { // Save last iteration's scores before first PV line is searched and all // the move scores but the (new) PV are set to -VALUE_INFINITE. @@ -584,7 +584,7 @@ namespace { // Step 2. Check for aborted search and immediate draw // Enforce node limit here. FIXME: This only works with 1 search thread. - if (Limits.maxNodes && pos.nodes_searched() >= Limits.maxNodes) + if (Limits.nodes && pos.nodes_searched() >= Limits.nodes) Signals.stop = true; if (( Signals.stop @@ -1894,6 +1894,6 @@ void check_time() { || stillAtFirstMove; if ( (Limits.use_time_management() && noMoreTime) - || (Limits.maxTime && e >= Limits.maxTime)) + || (Limits.movetime && e >= Limits.movetime)) Signals.stop = true; }