simpler rule for show previous eval

This commit is contained in:
Sander Land committed 2020-02-15 23:30:20 +01:00
1 parent d57e6ce87d
commit 9d667850e2
1 file changed
+6 -9
+6 -9
View File
@@ -96,15 +96,12 @@ class Move:
elif not self.is_pass and self.parent.analysis[0]["move"] != self.gtp(): elif not self.is_pass and self.parent.analysis[0]["move"] != self.gtp():
if sgf or eval: if sgf or eval:
outdated_evaluation = self.outdated_evaluation outdated_evaluation = self.outdated_evaluation
if outdated_evaluation and outdated_evaluation > self.evaluation + 0.05 and outdated_evaluation > 0.95: text += f"Evaluation: {self.evaluation:.1%} efficient\n"
text += f"Was considered last move as: {outdated_evaluation:.1%} efficient.\n" if outdated_evaluation and outdated_evaluation > self.evaluation and outdated_evaluation > self.evaluation + 0.05:
else: text += f"(Was considered last move as {outdated_evaluation:.0%})\n"
text += f"Evaluation: {self.evaluation:.1%} efficient\n" points_lost = self.player_sign * (prev_best_score - score)
if outdated_evaluation and outdated_evaluation > self.evaluation and outdated_evaluation > self.evaluation + 0.025: if points_lost > 0.5:
text += f"(Was considered last move as: {outdated_evaluation:.0%})\n" text += f"Estimated point loss: {points_lost:.1f}\n"
points_lost = self.player_sign * (prev_best_score - score)
if points_lost > 0.5:
text += f"Estimated point loss: {points_lost:.1f}\n"
if eval or sgf: # show undos on move itself in both sgf and while playing if eval or sgf: # show undos on move itself in both sgf and while playing
undids = [m.gtp() + (f"({m.evaluation_info[0]:.1%} efficient)" if m.evaluation_info[0] else "") for m in self.parent.children if m != self] undids = [m.gtp() + (f"({m.evaluation_info[0]:.1%} efficient)" if m.evaluation_info[0] else "") for m in self.parent.children if m != self]
if undids: if undids: