This commit is contained in:
wuliaozhiji
2022-03-06 19:10:59 -05:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -89,7 +89,7 @@ class GameTree:
return None return None
def add_subtree(self, subtree: GameTree) -> None: def add_subtree(self, subtree: GameTree) -> None:
"""Add a subtree to this game tree.""" """Add a subtree to this game tree and updates white win probability."""
self._subtrees.append(subtree) self._subtrees.append(subtree)
self._update_white_win_probability() self._update_white_win_probability()
+1 -1
View File
@@ -167,7 +167,7 @@ def part1_runner(games_file: str, n: int, black_random: bool) -> None:
""" """
tree = load_game_tree(games_file) tree = load_game_tree(games_file)
white = RandomTreePlayer(tree) white = RandomTreePlayer(tree)
black = a2_minichess.RandomPlayer() if black_random else white black = a2_minichess.RandomPlayer() if black_random else RandomTreePlayer(tree)
a2_minichess.run_games(n, white, black, show_stats=True) a2_minichess.run_games(n, white, black, show_stats=True)