From 1a1f1a6c2be2986c7ca938aea27ff36e726549e9 Mon Sep 17 00:00:00 2001 From: Justin Worthe Date: Wed, 10 Jul 2019 20:50:36 +0200 Subject: Marked the position to do pruning --- src/strategy/minimax.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 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 { -- cgit v1.2.3