diff options
Diffstat (limited to 'src/strategy/minimax.rs')
-rw-r--r-- | src/strategy/minimax.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/strategy/minimax.rs b/src/strategy/minimax.rs index 31e58a0..e620339 100644 --- a/src/strategy/minimax.rs +++ b/src/strategy/minimax.rs @@ -124,7 +124,6 @@ impl AddAssign<Score> for ScoreSum { } } -// TODO: Transform this into more of a minimax with AB pruning approach? fn expand_tree(node: &mut Node, state: &GameBoard) -> Score { if state.outcome != SimulationOutcome::Continue { score(state) @@ -146,6 +145,10 @@ fn expand_tree(node: &mut Node, state: &GameBoard) -> Score { }; node.children.insert(commands, new_node); + if node.unexplored.is_empty() { + // TODO: Prune dominated moves + } + update(node, commands, score); score } else { |