move around if statement in prune_bad_children
This commit is contained in:
parent
f4e882aea2
commit
5c3884653e
@ -330,11 +330,6 @@ impl FutureMoves {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn prune_bad_children(&mut self) {
|
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
|
if self
|
||||||
.config
|
.config
|
||||||
.max_depth
|
.max_depth
|
||||||
@ -344,6 +339,11 @@ impl FutureMoves {
|
|||||||
return;
|
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 {
|
for (depth, indexes) in by_depth {
|
||||||
// TODO! maybe update by_depth every iteration or something?
|
// TODO! maybe update by_depth every iteration or something?
|
||||||
if depth > self.current_depth.saturating_sub(self.config.up_to_minus) {
|
if depth > self.current_depth.saturating_sub(self.config.up_to_minus) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user