RLStrategy

Trait RLStrategy 

pub trait RLStrategy<RLC>
where RLC: RLComponentsTypes,
{ // Required method fn train_loop( &self, training_components: RLComponents<RLC>, learner_agent: &mut <RLC as RLComponentsTypes>::LearningAgent, starting_epoch: usize, env_init: <RLC as RLComponentsTypes>::EnvInit, ) -> (<RLC as RLComponentsTypes>::Policy, AsyncProcessorTraining<RLEvent<<RLC as RLComponentsTypes>::TrainingOutput, <RLC as RLComponentsTypes>::ActionContext>, AgentEvaluationEvent<<RLC as RLComponentsTypes>::ActionContext>>); // Provided method fn train( &self, learner_agent: <RLC as RLComponentsTypes>::LearningAgent, training_components: RLComponents<RLC>, env_init: <RLC as RLComponentsTypes>::EnvInit, ) -> RLResult<<RLC as RLComponentsTypes>::Policy> { ... } }
Expand description

Provides the fit function for any learning strategy

Required Methods§

fn train_loop( &self, training_components: RLComponents<RLC>, learner_agent: &mut <RLC as RLComponentsTypes>::LearningAgent, starting_epoch: usize, env_init: <RLC as RLComponentsTypes>::EnvInit, ) -> (<RLC as RLComponentsTypes>::Policy, AsyncProcessorTraining<RLEvent<<RLC as RLComponentsTypes>::TrainingOutput, <RLC as RLComponentsTypes>::ActionContext>, AgentEvaluationEvent<<RLC as RLComponentsTypes>::ActionContext>>)

Training loop for this strategy

Provided Methods§

fn train( &self, learner_agent: <RLC as RLComponentsTypes>::LearningAgent, training_components: RLComponents<RLC>, env_init: <RLC as RLComponentsTypes>::EnvInit, ) -> RLResult<<RLC as RLComponentsTypes>::Policy>

Train the learner agent with this strategy.

Implementors§

§

impl<RLC> RLStrategy<RLC> for OffPolicyStrategy<RLC>
where RLC: RLComponentsTypes, <RLC as RLComponentsTypes>::PolicyObs: SliceAccess<<RLC as RLComponentsTypes>::Backend>, <RLC as RLComponentsTypes>::PolicyAction: SliceAccess<<RLC as RLComponentsTypes>::Backend>,