chore: release 0.5.0
feat(mcts): get graph from one playout
fix: reexport search traits in prelude
Algorithms for (multiplayer) non-cooperative perfect information games, written in rust ⚡️.
The core crate is in ncpig
. Numerous example games used for testing can be found in
ncpig-testing
.
use ncpig::prelude::*;
use ncpig_testing::rolit::*;
fn main() -> anyhow::Result<()> {
let game = Rolit::new([RolitPlayer::Green, RolitPlayer::Blue]);
let state = RolitState::default();
let bot = Random::new();
let competition = Competition::new(&game, [&bot, &bot], true);
let finalstate = competition.play(state)?;
for player in game.players() {
println!("{player}: {}", game.score(player, &finalstate)?);
}
Ok(())
}
See the wiki for more info that could be useful to developers.