Update MCTS to change color for children

This commit is contained in:
2024-01-31 17:39:08 +01:00
parent b6bb61ec45
commit 793d83b943
3 changed files with 9 additions and 9 deletions

View File

@@ -29,7 +29,7 @@ class ClassicMcts:
self.untried_actions.remove(move)
next_board = self.board.copy()
next_board.push(move)
child_node = ClassicMcts(next_board, color=self.color, strategy=self.strategy, parent=self, move=move)
child_node = ClassicMcts(next_board, color=not self.color, strategy=self.strategy, parent=self, move=move)
self.children.append(child_node)
return child_node