Simulator

Trait Simulator 

Source
pub trait Simulator {
    // Required methods
    fn simulate(&self, state: &State, action: Action) -> (State, GameVars);
    fn simulator_type(&self) -> SimulatorType;
    fn get_initial_state(&self, state: State) -> State;
}
Expand description

Minimal interface for pluggable simulators used by MCTS.

Required Methods§

Source

fn simulate(&self, state: &State, action: Action) -> (State, GameVars)

Simulate one step from state with action, returning the next state and game vars.

Source

fn simulator_type(&self) -> SimulatorType

Whether this simulator works at the ground or abstract level.

Source

fn get_initial_state(&self, state: State) -> State

Transform a ground state into the appropriate simulator’s initial state.

Trait Implementations§

Source§

impl Simulator for Box<dyn Simulator>

Source§

fn simulate(&self, state: &State, action: Action) -> (State, GameVars)

Simulate one step from state with action, returning the next state and game vars.
Source§

fn simulator_type(&self) -> SimulatorType

Whether this simulator works at the ground or abstract level.
Source§

fn get_initial_state(&self, state: State) -> State

Transform a ground state into the appropriate simulator’s initial state.

Implementations on Foreign Types§

Source§

impl Simulator for Box<dyn Simulator>

Source§

fn simulate(&self, state: &State, action: Action) -> (State, GameVars)

Source§

fn simulator_type(&self) -> SimulatorType

Source§

fn get_initial_state(&self, state: State) -> State

Implementors§