thing
This commit is contained in:
parent
de0eafecfa
commit
d5ed4eb81a
@ -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),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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()
|
||||
}
|
||||
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user