future_move/move: remove usages of tried_children

This commit is contained in:
Simon Gardling 2025-03-25 15:50:03 -04:00
parent 0fb6003f38
commit 10e0770c4f
Signed by: titaniumtown
GPG Key ID: 9AB28AC10ECE533D
2 changed files with 1 additions and 6 deletions

View File

@ -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(())

View File

@ -20,9 +20,6 @@ pub struct Move {
// cascading effects though, something to think about
pub children: Vec<usize>,
/// Has this [`Move`] already attempted to create children?
pub tried_children: bool,
/// Value of this move (including children)
pub value: Option<i32>,
@ -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