Tord Romstad wrote:Hi all,
If "setoption name MultiPV" is indeed sent while the engine is thinking, how is the engine supposed to react? Is it acceptable to just abort and re-start the search?
Tord
some comments:
1)I prefer to use the word calculating or searching instead of thinking
because engines by definition cannot think.
2)I think that it is not the best solution but I do not complain if you do it because it is not easy to program the best solution(it is not easy to design the solution that I want because even I did not define it exactly and I will simply post examples to show what I prefer to see).
The user may want to change the number of lines during the time that the engine is calculating and even if the score for the moves is saved in the hash I do not like it to forget the depth that the lines were searched in the pv.
The best solution is probably first to remember the lines that the engine searched at all iterations and the depth that they were searched and only later to decide how to restart the search.
3 examples:
Example 1:
Suppose that the engine shows at depth 10
depth 10:1.e4 e5 0.1
depth 10:1.d4 d5 0.08
and later replace 1.d4 d5 by
depth 10 1.c4 d6 0.09
Suppose at this time I increase the number of lines to 3
I prefer that the engine shows me immediatly 1.d4 d5 0.08 because it was alreasy searched at depth 10.
I prefer that the engine does not search at all 1.e4 1.d4 1.c4 at depth<=10 when it search again and show me new information only if it finds something different with score that is more than 0.08 at depth 10 or something at depth 11.
Example 2:
Suppose that the engine has the same
depth 10:1.e4 e5 0.1
depth 10:1.d4 d5 0.08
but suppose that it also has a pv for 1.c4 at depth 9 and it had
depth 9 1.c4 e5 0.09(at depth 9 d4 and 9.e4 were better move so it change it)
In that case I prefer to see the following outpur
depth 10:1.e4 e5 0.1
depth 10:1.d4 d5 0.08
depth 9:1.c4 e5 0.09
This output should be constant when the engine searches moves at depth that is not bigger than 8 and only at depth 9 it may be changed if the engine finds something better than 1.c4 but as long as the engine does not go to depth 10 I prefer to see depth 9 in the bottom of the list except cases of mate score that I give in example 3.
Example 3:
Suppose that the engine in 2 mode at depth 10 has 2 lines
1.e4 e5 depth 10 0.1
2.d4 d5 depth 10 0.09
suppose that later when you increase the number of lines to 3 the engine does less pruning and find thanks to it at depth 8
1.Bxf7+ mate in 7
I think that in this case it is better to write 1.Bxf7+ first inspite of the fact that it has smaller depth because positive mate score at smaller depth is better than non mate score at bigger depth.
Uri