X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=719fc0eac47fc9ac3ccbcf7dc75071670f9fa10b;hp=78b85485d1efcf24ac9b53e11eb383c797f8ed05;hb=e59ff49a55da737a70d2a50fd12d830ae9f22b90;hpb=18cd83a38042a3993678e88bc8163ceb1cbd62b4 diff --git a/src/search.cpp b/src/search.cpp index 78b85485..719fc0ea 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 && myTime < 1000) + NodesBetweenPolls = 1000; + else if (myTime && myTime < 5000) + NodesBetweenPolls = 5000; else NodesBetweenPolls = 30000;