Trait AgentEnvLoop
pub trait AgentEnvLoop<BT, RLC>where
BT: Backend,
RLC: RLComponentsTypes,{
// Required methods
fn run_steps(
&mut self,
num_steps: usize,
processor: &mut AsyncProcessorTraining<RLEvent<<RLC as RLComponentsTypes>::TrainingOutput, <RLC as RLComponentsTypes>::ActionContext>, AgentEvaluationEvent<<RLC as RLComponentsTypes>::ActionContext>>,
interrupter: &Interrupter,
progress: &mut Progress,
) -> Vec<TimeStep<BT, <RLC as RLComponentsTypes>::State, <RLC as RLComponentsTypes>::Action, <RLC as RLComponentsTypes>::ActionContext>>;
fn run_episodes(
&mut self,
num_episodes: usize,
processor: &mut AsyncProcessorTraining<RLEvent<<RLC as RLComponentsTypes>::TrainingOutput, <RLC as RLComponentsTypes>::ActionContext>, AgentEvaluationEvent<<RLC as RLComponentsTypes>::ActionContext>>,
interrupter: &Interrupter,
progress: &mut Progress,
) -> Vec<Trajectory<BT, <RLC as RLComponentsTypes>::State, <RLC as RLComponentsTypes>::Action, <RLC as RLComponentsTypes>::ActionContext>>;
fn update_policy(&mut self, update: <RLC as RLComponentsTypes>::PolicyState);
fn policy(&self) -> <RLC as RLComponentsTypes>::PolicyState;
}Expand description
Trait for a structure that implements an agent/environement interface.
Required Methods§
fn run_steps(
&mut self,
num_steps: usize,
processor: &mut AsyncProcessorTraining<RLEvent<<RLC as RLComponentsTypes>::TrainingOutput, <RLC as RLComponentsTypes>::ActionContext>, AgentEvaluationEvent<<RLC as RLComponentsTypes>::ActionContext>>,
interrupter: &Interrupter,
progress: &mut Progress,
) -> Vec<TimeStep<BT, <RLC as RLComponentsTypes>::State, <RLC as RLComponentsTypes>::Action, <RLC as RLComponentsTypes>::ActionContext>>
fn run_steps( &mut self, num_steps: usize, processor: &mut AsyncProcessorTraining<RLEvent<<RLC as RLComponentsTypes>::TrainingOutput, <RLC as RLComponentsTypes>::ActionContext>, AgentEvaluationEvent<<RLC as RLComponentsTypes>::ActionContext>>, interrupter: &Interrupter, progress: &mut Progress, ) -> Vec<TimeStep<BT, <RLC as RLComponentsTypes>::State, <RLC as RLComponentsTypes>::Action, <RLC as RLComponentsTypes>::ActionContext>>
Run a certain number of timesteps.
§Arguments
num_steps- The number of time_steps to run.processor- An crate::EventProcessorTraining.interrupter- An crate::Interrupter.num_steps- The number of time_steps to run.progress- A mutable reference to the learning progress.
§Returns
A list of ordered timesteps.
fn run_episodes(
&mut self,
num_episodes: usize,
processor: &mut AsyncProcessorTraining<RLEvent<<RLC as RLComponentsTypes>::TrainingOutput, <RLC as RLComponentsTypes>::ActionContext>, AgentEvaluationEvent<<RLC as RLComponentsTypes>::ActionContext>>,
interrupter: &Interrupter,
progress: &mut Progress,
) -> Vec<Trajectory<BT, <RLC as RLComponentsTypes>::State, <RLC as RLComponentsTypes>::Action, <RLC as RLComponentsTypes>::ActionContext>>
fn run_episodes( &mut self, num_episodes: usize, processor: &mut AsyncProcessorTraining<RLEvent<<RLC as RLComponentsTypes>::TrainingOutput, <RLC as RLComponentsTypes>::ActionContext>, AgentEvaluationEvent<<RLC as RLComponentsTypes>::ActionContext>>, interrupter: &Interrupter, progress: &mut Progress, ) -> Vec<Trajectory<BT, <RLC as RLComponentsTypes>::State, <RLC as RLComponentsTypes>::Action, <RLC as RLComponentsTypes>::ActionContext>>
Run a certain number of episodes.
§Arguments
num_episodes- The number of episodes to run.processor- An crate::EventProcessorTraining.interrupter- An crate::Interrupter.progress- A mutable reference to the learning progress.
§Returns
A list of ordered timesteps.
fn update_policy(&mut self, update: <RLC as RLComponentsTypes>::PolicyState)
fn update_policy(&mut self, update: <RLC as RLComponentsTypes>::PolicyState)
Update the runner’s agent.
fn policy(&self) -> <RLC as RLComponentsTypes>::PolicyState
fn policy(&self) -> <RLC as RLComponentsTypes>::PolicyState
Get the state of the runner’s agent.