diff --git a/src/complexagent.rs b/src/complexagent.rs index c804527..19295a4 100644 --- a/src/complexagent.rs +++ b/src/complexagent.rs @@ -13,7 +13,7 @@ pub struct ComplexAgent { impl ComplexAgent { pub const fn new(color: Piece) -> Self { const MAX_DEPTH: usize = 14; - const NON_LAZY_DEPTH: usize = 5; + const NON_LAZY_DEPTH: usize = 8; Self { color, future_moves: FutureMoves::new(color, MAX_DEPTH, NON_LAZY_DEPTH), diff --git a/src/logic/future_moves.rs b/src/logic/future_moves.rs index 338eb8a..15291c2 100644 --- a/src/logic/future_moves.rs +++ b/src/logic/future_moves.rs @@ -200,7 +200,7 @@ impl FutureMoves { .rev() // rev then reverse so we get an index starting from the back .enumerate() // since children are sorted by value, we should weight the first one more - .map(|(i, &child)| self.arena[child].value * (i as i128)) + .map(|(i, &child)| self.arena[child].value * ((i + 1) as i128)) .sum::(); self.arena[idx].value =