Stockfish 13 time management change in MultiPV?

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Dann Corbit, Harvey Williamson

KLc
Posts: 140
Joined: Wed Jun 03, 2020 6:46 am
Full name: Kurt Lanc

Stockfish 13 time management change in MultiPV?

Post by KLc »

In Stockfish 12 the following takes about 4 seconds to stop with the bestmove:

Code: Select all

uci
ucinewgame
setoption name MultiPV value 4
position fen r2qkb1r/pppbpppp/8/4n3/3Pp3/4B3/PPP1NPPP/R2QKB1R w KQkq - 0 8
go wtime 30000 btime 30000 movestogo 10
But in Stockfish 13 it takes about 7 seconds. Did anything change with the time management from 12 to 13? I can't really see this in

https://github.com/official-stockfish/S ... imeman.cpp
https://github.com/official-stockfish/S ... search.cpp

Background: MultiPV is activated by UCI_LimitStrength and some GUIs (like HCE and Shredder) send the above go command (or a similar one) to get an average movetime timecontrol over a sequence of moves. Stockfish 13 now takes about twice as much time as the given average.
User avatar
hgm
Posts: 27701
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Stockfish 13 time management change in MultiPV?

Post by hgm »

The time used for thinking on a move can vary from position to position, depending on whether the engine has to switch move in a late iteration, and how the end of iterations accidentally falls w.r.t. the target time per move. This can all change when the engine change. Even a faster (but otherwise identical) engine can think longer on the same position, because after duplicating the thinking process of the slow one, it thinks it has enough time left to do an extra iteration. So you cannot conclude anything from a single position.
User avatar
Ajedrecista
Posts: 1952
Joined: Wed Jul 13, 2011 9:04 pm
Location: Madrid, Spain.

Re: Stockfish 13 time management change in MultiPV?

Post by Ajedrecista »

Hello Kurt:

I am not a programmer, but searching at commits history on GitHub might bring some results. I found:

Reduce big time spikes by reducing PV re-searches.

Which I do not know if it is related with your question or not. Other changes where I spotted 'time managment' or 'PV' are:

Add / remove leaves from search tree ttPv

Add large page support for NNUE weights and simplify TT mem management

Regards from Spain.

Ajedrecista.
KLc
Posts: 140
Joined: Wed Jun 03, 2020 6:46 am
Full name: Kurt Lanc

Re: Stockfish 13 time management change in MultiPV?

Post by KLc »

Ah, thank you both. I'll have a look at this!