Trait stateright::Chooser
source · pub trait Chooser<M: Model>: Send + Clone + 'static {
type State;
// Required methods
fn new_state(&self, seed: u64) -> Self::State;
fn choose_initial_state(
&self,
state: &mut Self::State,
initial_states: &[M::State]
) -> usize;
fn choose_action(
&self,
state: &mut Self::State,
current_state: &M::State,
actions: &[M::Action]
) -> usize;
}
Expand description
Choose transitions in the model.
Created once for each thread.
Required Associated Types§
Required Methods§
sourcefn new_state(&self, seed: u64) -> Self::State
fn new_state(&self, seed: u64) -> Self::State
Create a new chooser state from this seed for the run.
sourcefn choose_initial_state(
&self,
state: &mut Self::State,
initial_states: &[M::State]
) -> usize
fn choose_initial_state( &self, state: &mut Self::State, initial_states: &[M::State] ) -> usize
Choose the initial state for this simulation run.