syzygy wrote:I'm not entirely sure why you are referring to MultiPV here. In MultiPV you do end up with final scores of the best N moves. (I may not have read what you wrote carefully enough though.)
It's because MultiPV is meant to be used for analysis.
In analysis, the user would have some tree stored somewhere with backsolved scores of positions.
The old behavior allowed the user to insert into their tree the scores of the most interesting moves, even if they exceeded the MultiPV limit. They were given to the user "for free." Now if the user wants to know actual scores of those moves he'd need to make them on the board or rely on go searchmoves to exclude the moves already analyzed from the search.
Here's an example of the old behavior. Let's say that the user analyzes with MultiPV=4 and to depth 28.
At depth 27 (I'm using letters for the moves):
A. 0.29
B. 0.25
C. 0.19
D. 0.10
Now, it starts depth 28.
A has a score of 0.28.
B falls down to a score of 0.07
C falls down to a score of 0.06
D falls down to a score of 0.00
Now, and only now, the engine examines other moves.
E has a score of 0.11
F has a score of 0.09
G has a score of 0.08
The Shredder Classic GUI (up to version 3) has a feature "Continuous Display", that allows the user to see what happened in all the iterations of MultiPV.
The user can add this to the tree:
A. 0.28
E. 0.11
F. 0.09
G. 0.08
B. 0.07
C. 0.06
D. 0.00
That's 7 moves for the price of 4.
With the current behavior:
At depth 27:
A. 0.29
B. 0.25
C. 0.19
D. 0.10
Now, it starts depth 28.
A has a score of 0.28.
B fails low, Stockfish returns E with a score of 0.11
C fails low, Stockfish returns F with a score of 0.09
D fails low, Stockfish returns G with a score of 0.08
The user is left scratching his head, not knowing what happened to B, C, or D (making Stockfish show fail lows doesn't help because those scores aren't safe to add to the tree.) To get those scores, the user would need MultiPV=7, but switching to it now is more costly than old behavior, and the user doesn't know when this is going to happen, so it can't use 7 from the start.
The user can only add this to the tree:
A. 0.28
E. 0.11
F. 0.09
G. 0.08
Now, suppose the user interacts with the positions until A, E, F and G are refuted to a score of <0.08.
In the old bevahior, the user can jump already to B, which is now the best move. With the current behavior, the user has to take means to get a 5th alternative.
What code would need to be changed so that the engine behaves like in Marco Belli's post in Fail Lows?
elcabesa wrote:Stocksfish search the first best result and you'll see the counter going from 1 to 30,
then it search the second best move and you'll see the counter going from 2 to 30,
then it search the third best move and you'll see the counter going from 3 to 30,
and so on ....