X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=587506ec44ff91218b730f4cc948e74b1afecc98;hp=d4a7dabe7fc8bd7c196381cd5bae0087e9d611c1;hb=aea2fde6117be2fbda1caa62c842dea766780be5;hpb=b8fd1a78dc69f9baba2d8b0079e2d7844fe62958 diff --git a/src/search.cpp b/src/search.cpp index d4a7dabe..587506ec 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -20,7 +20,7 @@ #include #include #include -#include +#include // For std::memset #include #include @@ -193,7 +193,7 @@ template uint64_t Search::perft(Position& pos, Depth depth); void Search::think() { - TimeMgr.init(Limits, RootPos.game_ply(), RootPos.side_to_move()); + TimeMgr.init(Limits, RootPos.side_to_move(), RootPos.game_ply()); int contempt = Options["Contempt"] * PawnValueEg / 100; // From centipawns DrawValue[ RootPos.side_to_move()] = VALUE_DRAW - Value(contempt); @@ -650,7 +650,7 @@ namespace { assert(eval - beta >= 0); // Null move dynamic reduction based on depth and value - Depth R = (3 + depth / 4 + std::min((eval - beta) / PawnValueMg, 3)) * ONE_PLY; + Depth R = ((823 + 67 * depth) / 256 + std::min((eval - beta) / PawnValueMg, 3)) * ONE_PLY; pos.do_null_move(st); (ss+1)->skipEarlyPruning = true; @@ -1446,8 +1446,12 @@ moves_loop: // When in check and at SpNode search starts from here ss << "info depth " << d / ONE_PLY << " seldepth " << selDepth << " multipv " << i + 1 - << " score " << ((!tb && i == PVIdx) ? UCI::value(v, alpha, beta) : UCI::value(v)) - << " nodes " << pos.nodes_searched() + << " score " << UCI::value(v); + + if (!tb && i == PVIdx) + ss << (v >= beta ? " lowerbound" : v <= alpha ? " upperbound" : ""); + + ss << " nodes " << pos.nodes_searched() << " nps " << pos.nodes_searched() * 1000 / elapsed << " tbhits " << TB::Hits << " time " << elapsed