filesel/ai
This commit is contained in:
1 parent
e74d7c7166
commit
f336bea3d0
5 files changed
+6
-5
No files matched your search
@@ -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"))
|
||||
|
||||
@@ -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. "
|
||||
|
||||
@@ -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"}
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in new issue
Block a user