more squares on other reasonable moves

This commit is contained in:
Sander Land committed 2020-02-02 01:00:56 +01:00
1 parent ec2a81e05f
commit 6060fe8a1b
2 files changed
+7 -2

No files matched your search

+6 -1
View File
@@ -322,7 +322,12 @@ class Board:
and (move.evaluation_info[0] or 0.0) < train_settings["sgf_show_best_move_threshold"]
and prev_move.analysis[0]["move"] != move.gtp()
):
best_sq = f"SQ[{Move(gtpcoords=prev_move.analysis[0]['move'], player=0).sgfcoords(self.board_size)}]"
best_sq = "".join(
f"SQ[{Move(gtpcoords=mv['move'], player=0).sgfcoords(self.board_size)}]"
for mv in prev_move.analysis
if move.player_sign * mv["scoreLead"] >= move.player_sign * prev_move.analysis[0]["scoreLead"] - 0.5
and mv["visits"] >= train_settings["balance_play_min_visits"]
)
else:
best_sq = ""
return move.sgf(self.board_size) + f"C[{move.comment(sgf=True)}]{undo_cr}{best_sq}"
+1 -1
View File
@@ -130,7 +130,7 @@ class EngineControls(GridLayout):
time.sleep(0.05)
# select move
current_move = self.board.current_move
pos_moves = [(d["move"], float(d["scoreMean"]), d["evaluation"]) for d in current_move.ai_moves if int(d["visits"]) >= ts["balance_play_min_visits"]]
pos_moves = [(d["move"], float(d["scoreLead"]), d["evaluation"]) for d in current_move.ai_moves if int(d["visits"]) >= ts["balance_play_min_visits"]]
sel_moves = pos_moves[:1]
# don't play suicidal to balance score - pass when it's best
if self.ai_balance.active and pos_moves[0][0] != "pass":