X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=6982082252c66a0a2434e916faa32d181b3f506a;hb=c7866a4215c31d7d0af8e8550fbf8c13f6ea1d1a;hp=6ef15600d70604708b65847f8739c1281ec070a6;hpb=e738fa7d10a24ab41fa2389be1660cb4204573f4;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index 6ef15600..69820822 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -198,7 +198,7 @@ namespace { int MaxSearchTime, AbsoluteMaxSearchTime, ExtraSearchTime, ExactMaxTime; bool UseTimeManagement, InfiniteSearch, PonderSearch, StopOnPonderhit; bool AbortSearch, Quit; - bool FailLow; + bool AspirationFailLow; // Show current line? bool ShowCurrentLine; @@ -340,7 +340,7 @@ bool think(const Position& pos, bool infinite, bool ponder, int side_to_move, // Initialize global search variables Idle = StopOnPonderhit = AbortSearch = Quit = false; - FailLow = false; + AspirationFailLow = false; NodesSincePoll = 0; SearchStartTime = get_system_time(); ExactMaxTime = maxTime; @@ -1078,9 +1078,9 @@ namespace { assert(alpha >= oldAlpha); - FailLow = (alpha == oldAlpha); + AspirationFailLow = (alpha == oldAlpha); - if (FailLow && StopOnPonderhit) + if (AspirationFailLow && StopOnPonderhit) StopOnPonderhit = false; } @@ -2683,7 +2683,7 @@ namespace { return; bool stillAtFirstMove = RootMoveNumber == 1 - && !FailLow + && !AspirationFailLow && t > MaxSearchTime + ExtraSearchTime; bool noMoreTime = t > AbsoluteMaxSearchTime @@ -2706,7 +2706,7 @@ namespace { PonderSearch = false; bool stillAtFirstMove = RootMoveNumber == 1 - && !FailLow + && !AspirationFailLow && t > MaxSearchTime + ExtraSearchTime; bool noMoreTime = t > AbsoluteMaxSearchTime @@ -3026,7 +3026,7 @@ namespace { for (int i = 0; i < ActiveThreads; i++) if (i == master || splitPoint->slaves[i]) { - memcpy(splitPoint->sstack[i] + ply - 1, sstck + ply - 1, 3 * sizeof(SearchStack)); + memcpy(splitPoint->sstack[i] + ply - 1, sstck + ply - 1, 4 * sizeof(SearchStack)); Threads[i].workIsWaiting = true; // This makes the slave to exit from idle_loop() }