move around if statement in prune_bad_children

This commit is contained in:
Simon Gardling 2025-02-27 21:39:25 -05:00
parent f4e882aea2
commit 5c3884653e
Signed by: titaniumtown
GPG Key ID: 9AB28AC10ECE533D

View File

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