X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Ftimeman.cpp;h=bdcaee84c5f4ce10bc75198993ed6c6d315d0d30;hp=e1b3d4e641e43a2e7e25e95c92904b50d9feeca4;hb=45b0aea875860e9f0fe2d0435ee6163906639194;hpb=c5ec94d0f1b128fc2c691c7231663a345409d5cc diff --git a/src/timeman.cpp b/src/timeman.cpp index e1b3d4e6..bdcaee84 100644 --- a/src/timeman.cpp +++ b/src/timeman.cpp @@ -29,7 +29,7 @@ namespace { /// Constants const int MoveHorizon = 50; // Plan time management at most this many moves ahead - const float MaxRatio = 3.0f; // When in trouble, we can step over reserved time with this ratio + const float MaxRatio = 7.0f; // When in trouble, we can step over reserved time with this ratio const float StealRatio = 0.33f; // However we must not steal time from remaining moves over this ratio @@ -76,10 +76,9 @@ namespace { } -void TimeManager::pv_instability(int curChanges, int prevChanges) { +void TimeManager::pv_instability(float bestMoveChanges) { - unstablePVExtraTime = curChanges * (optimumSearchTime / 2) - + prevChanges * (optimumSearchTime / 3); + unstablePVExtraTime = int(bestMoveChanges * optimumSearchTime); }