pub trait ExecutorState<D: Domain> {
// Provided methods
fn create_state_value_estimator(
&self,
) -> Box<dyn StateValueEstimator<D> + Send> { ... }
fn post_action_execute_hook(
&mut self,
_state: &D::State,
_diff: &D::Diff,
_active_task: &ActiveTask<D>,
_queue: &mut ActiveTasks<D>,
) { ... }
fn post_mcts_run_hook(
&mut self,
_mcts: &MCTS<D>,
_last_active_task: &ActiveTask<D>,
) { ... }
}
Expand description
User-defined methods for the executor.
If you have no special need, you can just implement this trait on an empty struct:
struct MyExecutorState;
impl ExecutorState<MyDomain> for MyExecutorState {}
Provided Methods§
Sourcefn create_state_value_estimator(&self) -> Box<dyn StateValueEstimator<D> + Send>
fn create_state_value_estimator(&self) -> Box<dyn StateValueEstimator<D> + Send>
Creates the state value estimator (by default uses rollout-based simulation).
Sourcefn post_action_execute_hook(
&mut self,
_state: &D::State,
_diff: &D::Diff,
_active_task: &ActiveTask<D>,
_queue: &mut ActiveTasks<D>,
)
fn post_action_execute_hook( &mut self, _state: &D::State, _diff: &D::Diff, _active_task: &ActiveTask<D>, _queue: &mut ActiveTasks<D>, )
Method called after action execution, to perform tasks such as visual updates and checking for newly-created agents (by default does nothing).
Sourcefn post_mcts_run_hook(
&mut self,
_mcts: &MCTS<D>,
_last_active_task: &ActiveTask<D>,
)
fn post_mcts_run_hook( &mut self, _mcts: &MCTS<D>, _last_active_task: &ActiveTask<D>, )
Method called after MCTS has run, to perform tasks such as printing the search tree (by default does nothing).