Typo fix, the node is not mutable

This commit is contained in:
David Kruger 2025-06-27 13:55:01 -07:00
parent 3317c29480
commit 37b1f56f74

View File

@ -97,7 +97,7 @@ impl<'conf, S: GameState + std::fmt::Debug> MCTS<'conf, S> {
/// MCTS Phase 2: Expansion - Expand the selected node on the tree /// MCTS Phase 2: Expansion - Expand the selected node on the tree
fn expand(&mut self, id: usize) { fn expand(&mut self, id: usize) {
let parent: &Node<S> = self.arena.get_node_mut(id); let parent: &Node<S> = self.arena.get_node(id);
let legal_actions: Vec<S::Action> = parent.state.get_legal_actions(); let legal_actions: Vec<S::Action> = parent.state.get_legal_actions();
let parent_state: S = parent.state.clone(); let parent_state: S = parent.state.clone();
for action in legal_actions { for action in legal_actions {