Skip to content

Commit

Permalink
fix: technically should play out games
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielBarton446 committed Apr 12, 2024
1 parent 1883aa3 commit 2f1b970
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shogi-ai/mcts_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def select_action(self):
# Seed initial expansion
self._expansion(self.env.board, self.tree)

while time_delta < self.time_limit or self.games_simulated < 1000:
while time_delta < self.time_limit:
time_delta = time.time() - start_time
node_to_simulate = self._selection()
self._simulation(node_to_simulate)
Expand Down Expand Up @@ -126,7 +126,7 @@ def _rollout(self, board_copy: Board) -> int:
# we just play moves after we get to the current move position
self.rollouts += 1

while not board_copy.is_game_over() and board_copy.move_number < 100:
while not board_copy.is_game_over():
new_random_move = self._random_move(board_copy)
board_copy.push(new_random_move)

Expand Down

0 comments on commit 2f1b970

Please sign in to comment.