mirror of
https://github.com/sockspls/badfish
synced 2025-07-11 19:49:14 +00:00
Revert "Fix random moves when time < 10ms"
Possible regression. No functional change.
This commit is contained in:
parent
4803d5772c
commit
45b0aea875
1 changed files with 5 additions and 7 deletions
|
@ -242,11 +242,13 @@ void Search::think() {
|
|||
Threads.sleepWhileIdle = Options["Idle Threads Sleep"];
|
||||
|
||||
// Set best timer interval to avoid lagging under time pressure. Timer is
|
||||
// used to check for remaining available thinking time. Timer will be started
|
||||
// at the end of first iteration to avoid returning with a random move.
|
||||
// used to check for remaining available thinking time.
|
||||
Threads.timer->msec =
|
||||
Limits.use_time_management() ? std::min(100, std::max(TimeMgr.available_time() / 16, TimerResolution)) :
|
||||
Limits.nodes ? 2 * TimerResolution : 100;
|
||||
Limits.nodes ? 2 * TimerResolution
|
||||
: 100;
|
||||
|
||||
Threads.timer->notify_one(); // Wake up the recurring timer
|
||||
|
||||
id_loop(RootPos); // Let's start searching !
|
||||
|
||||
|
@ -400,10 +402,6 @@ namespace {
|
|||
assert(alpha >= -VALUE_INFINITE && beta <= VALUE_INFINITE);
|
||||
}
|
||||
|
||||
// Wake up the recurring timer after first iteration is finished
|
||||
if (depth == 1)
|
||||
Threads.timer->notify_one();
|
||||
|
||||
// Sort the PV lines searched so far and update the GUI
|
||||
std::stable_sort(RootMoves.begin(), RootMoves.begin() + PVIdx + 1);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue