From 9d667850e2b3664a5efeeac121f486ec7dcc322d Mon Sep 17 00:00:00 2001 From: Sander Land Date: Sat, 15 Feb 2020 23:30:20 +0100 Subject: [PATCH] simpler rule for show previous eval --- board.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/board.py b/board.py index da9c109..8f9425f 100644 --- a/board.py +++ b/board.py @@ -96,15 +96,12 @@ class Move: elif not self.is_pass and self.parent.analysis[0]["move"] != self.gtp(): if sgf or eval: outdated_evaluation = self.outdated_evaluation - if outdated_evaluation and outdated_evaluation > self.evaluation + 0.05 and outdated_evaluation > 0.95: - text += f"Was considered last move as: {outdated_evaluation:.1%} efficient.\n" - else: - text += f"Evaluation: {self.evaluation:.1%} efficient\n" - if outdated_evaluation and outdated_evaluation > self.evaluation and outdated_evaluation > self.evaluation + 0.025: - text += f"(Was considered last move as: {outdated_evaluation:.0%})\n" - points_lost = self.player_sign * (prev_best_score - score) - if points_lost > 0.5: - text += f"Estimated point loss: {points_lost:.1f}\n" + text += f"Evaluation: {self.evaluation:.1%} efficient\n" + if outdated_evaluation and outdated_evaluation > self.evaluation and outdated_evaluation > self.evaluation + 0.05: + text += f"(Was considered last move as {outdated_evaluation:.0%})\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 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: