//! Use the [`MonteCarloTreeSearch`] algorithm for both players in a really small game. use ncpig::prelude::*; use ncpig_testing::number_claim::*; fn main() -> anyhow::Result<()> { env_logger::init(); let game: NumberClaim<2, 3> = NumberClaim::new([0, 5, 4])?; let mut state = NumberClaimState::default(); let search = MonteCarloTreeSearch::builder().build::(); while !game.is_complete(&state)? { let action = search.choose_action(&game, &state)?.unwrap(); state = game.do_action(&action, state)?; println!("{}\n\n", state); } for player in game.players() { println!("{player} = {}", game.score(player, &state)?); } Ok(()) }