diff --git a/katrain/core/ai.py b/katrain/core/ai.py index c1d83a4..9d0bc6b 100644 --- a/katrain/core/ai.py +++ b/katrain/core/ai.py @@ -272,7 +272,7 @@ def generate_ai_move(game: Game, ai_mode: str, ai_settings: Dict) -> Tuple[Move, candidate_ai_moves = handicap_analysis["moveInfos"] top_cand = Move.from_gtp(candidate_ai_moves[0]["move"], player=cn.next_player) - if top_cand.is_pass and not ai_mode not in [AI_DEFAULT, AI_HANDICAP]: # don't play suicidal to balance score + if top_cand.is_pass and ai_mode not in [AI_DEFAULT, AI_HANDICAP]: # don't play suicidal to balance score aimove = top_cand ai_thoughts += f"Top move is pass, so passing regardless of strategy. " else: diff --git a/katrain/gui/badukpan.py b/katrain/gui/badukpan.py index d9d5f75..caa8db9 100644 --- a/katrain/gui/badukpan.py +++ b/katrain/gui/badukpan.py @@ -234,6 +234,8 @@ class BadukPanWidget(Widget): return katrain = self.katrain board_size_x, board_size_y = katrain.game.board_size + if len(self.gridpos_x) < board_size_x or len(self.gridpos_y) < board_size_y: + return # race condition show_n_eval = self.trainer_config["eval_off_show_last"] with self.canvas: diff --git a/katrain/gui/popups.py b/katrain/gui/popups.py index 95267fb..50a98be 100644 --- a/katrain/gui/popups.py +++ b/katrain/gui/popups.py @@ -149,8 +149,11 @@ class LabelledSelectionSlider(BoxLayout): def input_value(self): if self.textbox.text: return float(self.textbox.text) - return self.slider.values[self.silder.index][0] + return self.slider.values[self.slider.index][0] + @property + def raw_input_value(self): + return self.textbox.text class InputParseError(Exception): pass @@ -320,7 +323,11 @@ class ConfigAIPopup(QuickConfigGui): def estimate_rank_from_options(self, *_args): strategy = self.ai_select.selected[1] - options = self.collect_properties(self) # [strategy] + try: + options = self.collect_properties(self) # [strategy] + except InputParseError: + self.estimated_rank_label.text = "??" + return prefix = f"ai/{strategy}/" options = {k[len(prefix) :]: v for k, v in options.items() if k.startswith(prefix)} dan_rank, model_based = ai_rank_estimation(strategy, options) diff --git a/katrain/i18n/locales/de/LC_MESSAGES/katrain.mo b/katrain/i18n/locales/de/LC_MESSAGES/katrain.mo index 6f262ec..6b9a4e4 100644 Binary files a/katrain/i18n/locales/de/LC_MESSAGES/katrain.mo and b/katrain/i18n/locales/de/LC_MESSAGES/katrain.mo differ diff --git a/katrain/i18n/locales/de/LC_MESSAGES/katrain.po b/katrain/i18n/locales/de/LC_MESSAGES/katrain.po index 82867b1..74550b4 100644 --- a/katrain/i18n/locales/de/LC_MESSAGES/katrain.po +++ b/katrain/i18n/locales/de/LC_MESSAGES/katrain.po @@ -600,51 +600,38 @@ msgstr "Analyse der Kandidatenzüge wird abgeglichen mit {visits} Visits" msgid "sweep analysis" msgstr "Analysiere gesamtes Brett mit {visits} Visits/Zug" -#. TODO - shown on on the model select dropdown msgid "models available" -msgstr "{num} available model(s) found" +msgstr "{num} verfügbare Modelle gefunden" -#. TODO - button in general settings for downloading models msgid "download models button" -msgstr "Download Models" +msgstr "Modelle herunterladen" -#. TODO - error message on trying to download models when already done msgid "All models downloaded" -msgstr "All available models already downloaded" +msgstr "Alle verfügbaren Modelle bereits heruntergeladen" -#. TODO - shown on a graph tab msgid "tab:rank_est" -msgstr "Rank Estimate" +msgstr "Rangschätzung" -#. TODO - status message msgid "game re-analysis" -msgstr "Re-analyzing entire game using {visits} visits" +msgstr "Neuanalyse des gesamten Spiels mit {visits} Visits" -#. TODO - Analyze every node in the game more deeply msgid "analysis:game" -msgstr "Deeper full game analysis" +msgstr "Tiefere Gesamtspielanalyse" -#. TODO - Keep improving current position analysis when there is nothing else -#. to do msgid "analysis:continuous" -msgstr "Continuous analysis" +msgstr "Kontinuierliche Analyse ein/aus" -#. TODO - ai which handles handicap games better msgid "ai:handicap" msgstr "KataHandicap" -#. TODO msgid "aihelp:handicap" msgstr "" -"KataGo optimized for playing higher handicap games.The `pda` setting " -"corresponds to `playoutDoublingAdvantage` in KataGo, from black's " -"perspective. When `automatic` is set, KaTrain will find a suitable value " -"automatically." +"Optimiertes KataGo für höhere Handicap Spiele.Die pda Einstellungentspricht " +"playoutDoublingAdvantage in KataGo, aus Sicht von Schwarz.Wenn automatic " +"eingestellt ist, wird KaTrain automatischeinen geeigneten Wert finden." -#. TODO - in AI settings msgid "estimated strength" -msgstr "Estimated Strength" +msgstr "Geschätzte Spielstärke" -#. TODO - label in little popup for analyzing entire game msgid "reanalyze max visits" -msgstr "Number of visits per move" +msgstr "Anzahl der Visits pro Zug"