3ec8e9f8943dbee9aee845d9cdaa66856d722ede reworked needs_annotation() to take a judgment rather than a pre-computed delta of the played move evaluation vs the best move evaluation. This was done to prepare for introducing improved logic for needs_annotation() that would require access to the full judgment to operate correctly.
Previously, during the first pass chess-annotator would iterate over all the nodes in the game, setting the node.comment to the pre-computed delta, which would then be referenced in the second pass and fed into needs_annotation() to determine which moves would get deeper analysis. Since needs_annotation() now takes a dictionary, not a string, the node.comment is now set to the full judgment (L552). That way, the refactoring necessary to the second pass was minimal.
Further, if no errors are detected on the first pass, chess-annotator deeply analyzes all the moves in the game. To achieve this, after the first pass, if no errors were detected, it sets the node.comment of every move to an arbitrary high integer value, which ensures that needs_annotation() will always return true during the second pass (L603).
However, critically, this behavior was not updated to reflect the new parameters required by needs_annotation(). Therefore, a fatal condition will likely be reached when analyzing an error-free game.
To avoid this condition, when the first pass has not detected any errors, chess-annotator should set node.comment to a pre-fabricated dictionary with a big delta between the played move and the (fictional) best move to ensure that all the moves in the game are analyzed on the second pass.
3ec8e9f8943dbee9aee845d9cdaa66856d722ede reworked
needs_annotation()
to take a judgment rather than a pre-computed delta of the played move evaluation vs the best move evaluation. This was done to prepare for introducing improved logic forneeds_annotation()
that would require access to the full judgment to operate correctly.Previously, during the first pass chess-annotator would iterate over all the nodes in the game, setting the
node.comment
to the pre-computed delta, which would then be referenced in the second pass and fed intoneeds_annotation()
to determine which moves would get deeper analysis. Sinceneeds_annotation()
now takes a dictionary, not a string, thenode.comment
is now set to the full judgment (L552). That way, the refactoring necessary to the second pass was minimal.Further, if no errors are detected on the first pass, chess-annotator deeply analyzes all the moves in the game. To achieve this, after the first pass, if no errors were detected, it sets the
node.comment
of every move to an arbitrary high integer value, which ensures thatneeds_annotation()
will always return true during the second pass (L603).However, critically, this behavior was not updated to reflect the new parameters required by
needs_annotation()
. Therefore, a fatal condition will likely be reached when analyzing an error-free game.To avoid this condition, when the first pass has not detected any errors, chess-annotator should set
node.comment
to a pre-fabricated dictionary with a big delta between the played move and the (fictional) best move to ensure that all the moves in the game are analyzed on the second pass.