diff --git a/katrain/__main__.py b/katrain/__main__.py index b8ecd36..ba081d9 100644 --- a/katrain/__main__.py +++ b/katrain/__main__.py @@ -388,6 +388,7 @@ class KaTrainGui(Screen, KaTrainBase): popup_contents.filesel.on_success = readfile popup_contents.filesel.on_submit = readfile self.fileselect_popup.open() + self.fileselect_popup.content.filesel.ids.list_view._trigger_update() def _do_output_sgf(self): msg = self.game.write_sgf(self.config("general/sgf_save")) diff --git a/katrain/core/ai.py b/katrain/core/ai.py index d7533a8..61bcccf 100644 --- a/katrain/core/ai.py +++ b/katrain/core/ai.py @@ -352,7 +352,6 @@ def generate_ai_move(game: Game, ai_mode: str, ai_settings: Dict) -> Tuple[Move, if top_cand.is_pass and ai_mode not in [ AI_DEFAULT, AI_HANDICAP, - AI_SIMPLE, ]: # don't play suicidal to balance score aimove = top_cand ai_thoughts += f"Top move is pass, so passing regardless of strategy. " diff --git a/katrain/core/constants.py b/katrain/core/constants.py index f1219f6..94373ab 100644 --- a/katrain/core/constants.py +++ b/katrain/core/constants.py @@ -89,8 +89,8 @@ AI_OPTION_VALUES = { "threshold": [2, 2.5, 3, 3.5, 4, 4.5], "automatic": "bool", "pda": [(x / 10, f"{'W' if x<0 else 'B'}+{abs(x/10):.1f}") for x in range(-30, 31)], - "max_points_lost": [x/10 for x in range(51)], - "settled_weight": [x/10 for x in range(-100,101)], + "max_points_lost": [x / 10 for x in range(51)], + "settled_weight": [x / 10 for x in range(-100, 101)], } AI_KEY_PROPERTIES = {"kyu_rank", "strength", "weaken_fac", "pick_frac", "pick_n", "automatic"} diff --git a/katrain/core/engine.py b/katrain/core/engine.py index 8fb0319..4bff9be 100644 --- a/katrain/core/engine.py +++ b/katrain/core/engine.py @@ -281,6 +281,7 @@ class KataGoEngine: "boardXSize": size_x, "boardYSize": size_y, "includeOwnership": ownership and not next_move, + "includeMovesOwnership": ownership and not next_move, "includePolicy": not next_move, "initialStones": [[m.player, m.gtp()] for m in initial_stones], "initialPlayer": analysis_node.root.next_player, diff --git a/katrain/gui/controlspanel.py b/katrain/gui/controlspanel.py index fb5f351..592afc5 100644 --- a/katrain/gui/controlspanel.py +++ b/katrain/gui/controlspanel.py @@ -151,13 +151,13 @@ class ControlsPanel(BoxLayout): self.info.text = info def update_timer(self, _dt): - game = self.katrain and self.katrain.game + game = self.katrain and self.katrain.game current_node = game and self.katrain.game.current_node if current_node: last_update_node, last_update_time, beeping = self.last_timer_update new_beeping = beeping now = time.time() - main_time = self.katrain.config("timer/main_time",0) * 60 + main_time = self.katrain.config("timer/main_time", 0) * 60 byo_len = max(1, self.katrain.config("timer/byo_length")) byo_num = max(1, self.katrain.config("timer/byo_periods")) sounds_on = self.katrain.config("timer/sound")