Closed rpdelaney closed 8 years ago
This issue raises the general concern that with any engine we can't guarantee that the UCI bestmove is == to the pv root move, although it should be. Furthermore, we always use the pv (not the bestmove) when adding annotations, and so that is what we should rely on. Therefore, we should fill judgment["bestmove"] with the pv root move instead of the engine bestmove.
Intermittently, annotator.py will throw an exception at board = node.board() when using stockfish at very low time budgets. Example stacktrace:
The behavior is not exhibited with other engines tested (Toga II and senpai).
This bug seems to be indirectly caused by a bug in stockfish described here[1], where the UCI bestmove is sometimes different from the pv's first move. This can cause annotator.py to attempt to add illegal moves as an annotation, corrupting the working GameNode object and ultimately preventing python-chess from rendering a board on assignment.