X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=d94128eb41c944bd34ec5d92432aad714e5efce5;hp=3f367d83bd0218fed704ad6d720d3c0eb2c9a2a9;hb=d85cf6d9c3fb31865d9b671d2475a6a81e84e070;hpb=1f73a9ed639b6e55b96635c33b249f29ba726145 diff --git a/src/search.cpp b/src/search.cpp index 3f367d83..d94128eb 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -596,7 +596,7 @@ namespace { SearchStack ss[PLY_MAX_PLUS_2]; Value bestValues[PLY_MAX_PLUS_2]; int bestMoveChanges[PLY_MAX_PLUS_2]; - int depth, researchCountFL, researchCountFH, aspirationDelta; + int depth, aspirationDelta; Value value, alpha, beta; Move bestMove, easyMove; @@ -625,7 +625,7 @@ namespace { // Iterative deepening loop while (++depth <= PLY_MAX && (!MaxDepth || depth <= MaxDepth) && !StopRequest) { - Rml.bestMoveChanges = researchCountFL = researchCountFH = 0; + Rml.bestMoveChanges = 0; cout << "info depth " << depth << endl; // Calculate dynamic aspiration window based on previous iterations @@ -666,16 +666,16 @@ namespace { // otherwise exit the fail high/low loop. if (value >= beta) { - beta = Min(beta + aspirationDelta * (1 << researchCountFH), VALUE_INFINITE); - researchCountFH++; + beta = Min(beta + aspirationDelta, VALUE_INFINITE); + aspirationDelta += aspirationDelta / 2; } else if (value <= alpha) { AspirationFailLow = true; StopOnPonderhit = false; - alpha = Max(alpha - aspirationDelta * (1 << researchCountFL), -VALUE_INFINITE); - researchCountFL++; + alpha = Max(alpha - aspirationDelta, -VALUE_INFINITE); + aspirationDelta += aspirationDelta / 2; } else break;