From 2967159bb4c8b7ea0f0881d67df22178164c2eed Mon Sep 17 00:00:00 2001 From: Sander Land Date: Mon, 23 Nov 2020 00:04:05 +0100 Subject: [PATCH] minor bugfix --- katrain/core/game_node.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/katrain/core/game_node.py b/katrain/core/game_node.py index 997e4e6..de7bc60 100644 --- a/katrain/core/game_node.py +++ b/katrain/core/game_node.py @@ -219,7 +219,7 @@ class GameNode(SGFNode): if currmove_pol_rank is not None: policy_rank_msg = i18n._("Info:policy rank") text += policy_rank_msg.format(rank=currmove_pol_rank, probability=currmove_pol_prob) + "\n" - if currmove_pol_rank is None or currmove_pol_rank != 1 and (sgf or details): + if currmove_pol_rank != 1 and policy_ranking and (sgf or details): policy_best_msg = i18n._("Info:policy best") pol_move, pol_prob = policy_ranking[0][1].gtp(), policy_ranking[0][0] text += policy_best_msg.format(move=pol_move, probability=pol_prob) + "\n"