diff --git a/src/complexagent.rs b/src/complexagent.rs index cf51d9d..1bc50b4 100644 --- a/src/complexagent.rs +++ b/src/complexagent.rs @@ -11,17 +11,10 @@ pub struct ComplexAgent { #[allow(dead_code)] impl ComplexAgent { - pub const fn new(color: Piece) -> Self { - const CONFIG: FutureMoveConfig = FutureMoveConfig { - max_depth: 20, - min_arena_depth_sub: 3, - top_k_children: 2, - up_to_minus: usize::MAX, // disable pruning - max_arena_size: 50_000_000, - }; + pub const fn new(color: Piece, config: FutureMoveConfig) -> Self { Self { color, - future_moves: FutureMoves::new(color, CONFIG), + future_moves: FutureMoves::new(color, config), } } } diff --git a/src/main.rs b/src/main.rs index 07899bd..5d00392 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,5 @@ use game::Game; +use logic::FutureMoveConfig; use repr::Piece; mod agent; @@ -9,8 +10,26 @@ pub mod repr; // TODO! make this agent configuration a config option via `clap-rs` fn main() { - let player1 = complexagent::ComplexAgent::new(Piece::Black); - // let player2 = complexagent::ComplexAgent::new(Piece::White); + let player1 = complexagent::ComplexAgent::new( + Piece::Black, + FutureMoveConfig { + max_depth: 20, + min_arena_depth_sub: 3, + top_k_children: 2, + up_to_minus: usize::MAX, // disable pruning + max_arena_size: 50_000_000, + }, + ); + // let player2 = complexagent::ComplexAgent::new( + // Piece::White, + // FutureMoveConfig { + // max_depth: 20, + // min_arena_depth_sub: 3, + // top_k_children: 2, + // up_to_minus: 5, // disable pruning + // max_arena_size: 2_000_000, + // }, + // ); 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));