glinscott / leela-chess

**MOVED TO https://github.com/LeelaChessZero/leela-chess ** A chess adaption of GCP's Leela Zero
http://lczero.org
GNU General Public License v3.0
760 stars 299 forks source link

Time-remaining overrides -playouts argument #169

Open gsobala opened 6 years ago

gsobala commented 6 years ago

The current code prioritizes time-remaining over the playout limit set by the -p argument.

I.e. if I run ./lczero -w weights.txt -p 800 --noponder as a UCI engine in a GUI game then the -p 800 argument has no effect at all - instead lczero searches according to the timecontrol set.

The current relevant code is

// Used to check if we've run out of time or reached out playout limit
bool UCTSearch::halt_search() {
    return m_target_time < 0 ? playout_limit_reached() : m_target_time - 50 < now() - m_start_time;
}
killerducky commented 6 years ago

@JackThomson2 do you have time to look at this?

jjoshua2 commented 6 years ago

It also appears that lcz does not honor node and ply limits that cutechess sets, like SF does. It is handy for now to set up time handicapped games, because I can limit SF to 6 ply while lcz takes a long time.

JackThomson2 commented 6 years ago

Sorry I hadn't seen this I can certainly look into it.