diff --git a/src/logic/future_moves.rs b/src/logic/future_moves.rs index 70d0e63..cba8ba5 100644 --- a/src/logic/future_moves.rs +++ b/src/logic/future_moves.rs @@ -330,11 +330,6 @@ impl FutureMoves { } fn prune_bad_children(&mut self) { - // values are needed in order to prune and see what's best - self.compute_values(0..self.arena_len()); - - let by_depth = self.by_depth(0..self.arena.len()); - if self .config .max_depth @@ -344,6 +339,11 @@ impl FutureMoves { return; } + // values are needed in order to prune and see what's best + self.compute_values(0..self.arena_len()); + + let by_depth = self.by_depth(0..self.arena.len()); + for (depth, indexes) in by_depth { // TODO! maybe update by_depth every iteration or something? if depth > self.current_depth.saturating_sub(self.config.up_to_minus) {