Merge branch 'main' of github.com:hykilpikonna/CSC111 into main

This commit is contained in:
MstrPikachu
2022-03-12 18:12:23 -05:00
3 changed files with 256 additions and 2 deletions
+1 -1
View File
@@ -89,7 +89,7 @@ class GameTree:
return 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._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)
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)