There is another potential problem. When PVS first came along, Ken used it in Belle, and did the following:xmas79 wrote:Ok, so we agree that the problem is more general... I simply would remark some specific pattern which seems to be common. I will present them here in temporal order (so you will see what you would see on a console window, top = oldest line, bottom = newest line)
case 1: multiple fail lows due to bad AB window. For fail soft frameworks the engine could print the so far best (and bad) move. Fail hard would simply ouput the ? without any move.Here the engine fails low three times lowering the best (bad) score, and finally find the best move being d4 with a score of -1.45.Code: Select all
13 +0.20 1:15 e4? 13 +0.10 1:16 e4? 13 -0.10 1:17 e4? 13 -1.45 1:17 d4 blah blah blah
Case 2: two exact scores due to bad move ordering.Here the engine finds two exact scores due to a bad move ordering schema. During search it picks first the "e4" move and find it to be the best move, then picks "f4" and this results in a better move.Code: Select all
13 +0.20 1:15 e4 blah blah blah 13 +0.25 1:16 f4 blah blah
Case 3: an exact score, followed by fail high, followed by an exact score againHere the engine finds a best move, then picks another move which triggers a fail high (due to TT hash hit and lack of depth, typical in distant mates). The research though cannot "complete" the fail high, and the f4 search produces nothing, leaving again e4 as the best move.Code: Select all
13 +0.20 1:15 e4 blah blah 13 +0.90 1:16 f4! 13 +0.20 1:17 e4 blah blah
Ideally, the thinking output window should display everything that reflects the current preferred choice of the engine, and not what the GUI thinks the engine is actually preferring. How you would display such outputs?
(1) get first score for first move.
(2) continue searching with null window.
(3) if a move fails high, remember it and the score (which would be current alpha +1 on the null-window search.
(4) if a second move fails high, re-search the first fail-high move with a relaxed beta value to get a real score.
(5) re-search the second fail-high move with new_score, new_score+1 where new_score is from (4).
(6) if it fails low, keep going with nv, nv+1 over the remaining moves.
(7) if the move fails high, or if any of the remaining moves fail high, go back to step (3).
This allows you to get a PV, a fail high, a second fail high on a different move, a PV from the first move, and nothing or a fail high from the second fail-high move or beyond. That's a lot of out-of-order stuff going on.
In thinking, I wonder if HGM could add a new "feature" like
feature=temporal_order
which says "display the moves in the order they are produced, period" and perhaps
feature=n_best_order
where he sorts to handle the n_best output when it is used. Then he doesn't have to try to figure out which to use, the engine tells him.