logical improvements and cleanup

This commit is contained in:
2025-02-20 20:52:59 -05:00
parent 2011ae001b
commit 3b07a67d2e
3 changed files with 48 additions and 31 deletions

View File

@@ -12,10 +12,10 @@ pub struct ComplexAgent {
#[allow(dead_code)]
impl ComplexAgent {
pub const fn new(color: Piece) -> Self {
const MAX_DEPTH: usize = 12;
const MAX_DEPTH: usize = 10;
Self {
color,
future_moves: FutureMoves::new(color, MAX_DEPTH, 6),
future_moves: FutureMoves::new(color, MAX_DEPTH, 8),
}
}
}
@@ -24,7 +24,7 @@ impl Agent for ComplexAgent {
fn next_move(&mut self, board: &Board) -> Option<(usize, usize)> {
self.future_moves.update(board);
println!("# of moves stored: {}", self.future_moves.len());
println!("# of moves stored: {}", self.future_moves.arena_len());
self.future_moves.best_move().inspect(|&(i, j)| {
if !self.future_moves.update_root_coord(i, j) {