From 10e0770c4fb2ee7f5c9bcbc4028e0a0420414620 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Tue, 25 Mar 2025 15:50:03 -0400 Subject: [PATCH] future_move/move: remove usages of `tried_children` --- src/logic/future_moves.rs | 3 +-- src/logic/move.rs | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/logic/future_moves.rs b/src/logic/future_moves.rs index 16215ca..8afa331 100644 --- a/src/logic/future_moves.rs +++ b/src/logic/future_moves.rs @@ -109,7 +109,7 @@ impl FutureMoves { // we want to select all nodes that don't have children, or are lazy (need to maybe be regenerated) .filter(|&idx| { let got = &self.arena[idx]; - !got.is_trimmed && !got.tried_children && got.winner == Winner::None + !got.is_trimmed && got.children.is_empty() && got.winner == Winner::None }) .filter(|&idx| self.is_connected_to_root(idx)) .collect(); @@ -155,7 +155,6 @@ impl FutureMoves { .progress_with_style(ProgressStyle::with_template(pstyle_inner).unwrap()) .try_for_each(|node_idx| { self.generate_children(node_idx); - self.arena[node_idx].tried_children = true; if self.arena_len() >= self.config.max_arena_size { ControlFlow::Break(()) diff --git a/src/logic/move.rs b/src/logic/move.rs index 892a0d4..44c32e6 100644 --- a/src/logic/move.rs +++ b/src/logic/move.rs @@ -20,9 +20,6 @@ pub struct Move { // cascading effects though, something to think about pub children: Vec, - /// Has this [`Move`] already attempted to create children? - pub tried_children: bool, - /// Value of this move (including children) pub value: Option, @@ -47,7 +44,6 @@ impl Move { color, is_trimmed: false, self_value: 0, - tried_children: false, }; m.self_value = m.compute_self_value(agent_color, &board, true); m