X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Ftimeman.cpp;h=ebbb5fd5ae875929bd884fe0a2ad16f0646c2308;hb=9afa1d73306cb98e95acec5daf4efd65e592ceff;hp=2612fb52fa88762474170f182a1ef98846180b04;hpb=3fd7e37868ce3a770ab5ca5ef686f75c8aa348f4;p=stockfish diff --git a/src/timeman.cpp b/src/timeman.cpp index 2612fb52..ebbb5fd5 100644 --- a/src/timeman.cpp +++ b/src/timeman.cpp @@ -2,7 +2,7 @@ Stockfish, a UCI chess playing engine derived from Glaurung 2.1 Copyright (C) 2004-2008 Tord Romstad (Glaurung author) Copyright (C) 2008-2015 Marco Costalba, Joona Kiiski, Tord Romstad - Copyright (C) 2015-2017 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad + Copyright (C) 2015-2018 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad Stockfish is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -52,6 +52,9 @@ namespace { else ratio *= 1.5; + if (movesToGo > 1) + ratio = std::min(0.75, ratio); + ratio *= 1 + inc / (myTime * 8.5); } // Otherwise we increase usage of remaining time as the game goes on