fix teaching redo bug

This commit is contained in:
Sander Land committed 2020-05-08 17:06:59 +02:00
1 parent cd4b98970d
commit 69f8b60dff
4 files changed
+2 -1

No files matched your search

+1
View File
@@ -13,6 +13,7 @@ PORT = int(sys.argv[1]) if len(sys.argv) > 1 else 8587
ENGINE_SETTINGS = { ENGINE_SETTINGS = {
"katago": "my/katago25", "katago": "my/katago25",
# "katago": "KataGo/katago",
"model": "KataGo/models/b15-1.3.2.txt.gz", "model": "KataGo/models/b15-1.3.2.txt.gz",
"config": "KataGo/analysis_config.cfg", "config": "KataGo/analysis_config.cfg",
"max_visits": 50, "max_visits": 50,
Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

+1 -1
View File
@@ -91,7 +91,7 @@ class KaTrainGui(BoxLayout):
# AI and Trainer/auto-undo handlers # AI and Trainer/auto-undo handlers
cn = self.game.current_node cn = self.game.current_node
auto_undo = cn.player and "undo" in self.controls.player_mode(cn.player) auto_undo = cn.player and "undo" in self.controls.player_mode(cn.player)
if auto_undo and cn.analysis_ready and cn.parent and cn.parent.analysis_ready: if auto_undo and cn.analysis_ready and cn.parent and cn.parent.analysis_ready and not cn.children and not self.game.ended:
self.game.analyze_undo(cn, self.config("trainer")) # not via message loop self.game.analyze_undo(cn, self.config("trainer")) # not via message loop
if cn.analysis_ready and "ai" in self.controls.player_mode(cn.next_player).lower() and not cn.children and not self.game.ended and not (auto_undo and cn.auto_undo is None): if cn.analysis_ready and "ai" in self.controls.player_mode(cn.next_player).lower() and not cn.children and not self.game.ended and not (auto_undo and cn.auto_undo is None):
self._do_ai_move(cn) # cn mismatch stops this if undo fired. avoid message loop here or fires repeatedly. self._do_ai_move(cn) # cn mismatch stops this if undo fired. avoid message loop here or fires repeatedly.