From 937a48f2302db0da3fd725a2d05f7156c0d2b02e Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Tue, 18 Feb 2025 12:13:59 -0500 Subject: [PATCH] prune_unrelated -> refocus_tree --- src/complexagent.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/complexagent.rs b/src/complexagent.rs index 6c89a5a..ccc6c57 100644 --- a/src/complexagent.rs +++ b/src/complexagent.rs @@ -272,12 +272,13 @@ impl FutureMoves { fn update_root_idx(&mut self, idx: usize) { self.current_root = Some(idx); self.current_depth -= self.depth_of(idx) - 1; - self.prune_unrelated(); + self.refocus_tree(); self.extend_layers(); self.compute_values(0..self.arena.len()); } - fn prune_unrelated(&mut self) { + /// Rebuilds the Arena based on `self.current_root`, prunes unrelated nodes + fn refocus_tree(&mut self) { let Some(root) = self.current_root else { return; };