X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=a0215bee2741e34adf2c47de4d41a5a9b6305ba1;hb=8dd01fda121eb138287f09493a4d86c58c58d7e1;hp=17a1aeab984884b261c08bd858556bcdb8884614;hpb=da948cc94ebef4988199c90389a5099b087d2088;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index 17a1aeab..a0215bee 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -446,7 +446,8 @@ bool think(const Position& pos, bool infinite, bool ponder, int side_to_move, if (movesToGo == 1) { MaxSearchTime = myTime / 2; - AbsoluteMaxSearchTime = Min(myTime / 2, myTime - 500); + AbsoluteMaxSearchTime = + (myTime > 3000)? (myTime - 500) : ((myTime * 3) / 4); } else { MaxSearchTime = myTime / Min(movesToGo, 20); AbsoluteMaxSearchTime = Min((4 * myTime) / movesToGo, myTime / 3); @@ -470,6 +471,10 @@ bool think(const Position& pos, bool infinite, bool ponder, int side_to_move, NodesBetweenPolls = Min(MaxNodes, 30000); InfiniteSearch = true; // HACK } + else if (myTime < 1000) + NodesBetweenPolls = 100; + else if (myTime < 5000) + NodesBetweenPolls = 1000; else NodesBetweenPolls = 30000; @@ -971,7 +976,10 @@ namespace { std::cout << std::endl; if (UseLogFile) - LogFile << pretty_pv(pos, current_search_time(), Iteration, nodes_searched(), value, ss[0].pv) + LogFile << pretty_pv(pos, current_search_time(), Iteration, nodes_searched(), value, + ((value >= beta)? VALUE_TYPE_LOWER + : ((value <= alpha)? VALUE_TYPE_UPPER : VALUE_TYPE_EXACT)), + ss[0].pv) << std::endl; if (value > alpha)