Skip to main content

Bot

Trait Bot 

Source
pub trait Bot<G: Game> {
    // Required method
    fn choose(
        &mut self,
        game: &G,
        state: &G::State,
        player: PlayerId,
    ) -> Option<G::Action>;
}
Expand description

A policy that picks one action for a player at a decision point.

Required Methods§

Source

fn choose( &mut self, game: &G, state: &G::State, player: PlayerId, ) -> Option<G::Action>

Returns the action to play for player in state, or None if there is nothing to do (no legal actions, e.g. a terminal state).

Implementors§

Source§

impl<G> Bot<G> for Ismcts
where G: Determinize, G::State: Clone, G::Action: Clone,

Source§

impl<G> Bot<G> for Mcts
where G: Game, G::State: Clone, G::Action: Clone,

Source§

impl<G> Bot<G> for Minimax
where G: Game, G::State: Clone, G::Action: Clone,

Source§

impl<G: Game> Bot<G> for Random