This commit is contained in:
Simon Gardling 2025-02-20 23:14:07 -05:00
parent de0eafecfa
commit d5ed4eb81a
Signed by: titaniumtown
GPG Key ID: 9AB28AC10ECE533D
3 changed files with 7 additions and 5 deletions

View File

@ -12,10 +12,11 @@ pub struct ComplexAgent {
#[allow(dead_code)]
impl ComplexAgent {
pub const fn new(color: Piece) -> Self {
const MAX_DEPTH: usize = 10;
const MAX_DEPTH: usize = 14;
const NON_LAZY_DEPTH: usize = 5;
Self {
color,
future_moves: FutureMoves::new(color, MAX_DEPTH, 8),
future_moves: FutureMoves::new(color, MAX_DEPTH, NON_LAZY_DEPTH),
}
}
}

View File

@ -276,7 +276,8 @@ impl FutureMoves {
&& node.coords() == (i, j)
})
.map(|x| x.0)
.inspect(|&root| self.update_root_idx(root))
// do raw set so we can prune it on the next move (in `update`)
.inspect(|&root| self.update_root_idx_raw(root))
.is_some()
}

View File

@ -10,8 +10,8 @@ pub mod repr;
fn main() {
let player1 = complexagent::ComplexAgent::new(Piece::Black);
// let player2 = complexagent::ComplexAgent::new(Piece::White);
let player2 = agent::ManualAgent::new(Piece::White);
// let player2 = agent::RandomAgent::new(Piece::White);
// let player2 = agent::ManualAgent::new(Piece::White);
let player2 = agent::RandomAgent::new(Piece::White);
let mut game = Game::new(Box::new(player1), Box::new(player2));
game.game_loop();
}