pub trait RLStrategy<RLC: RLComponentsTypes> {
// Required method
fn train_loop(
&self,
training_components: RLComponents<RLC>,
learner_agent: &mut RLC::LearningAgent,
starting_epoch: usize,
env_init: RLC::EnvInit,
) -> (RLC::Policy, RLEventProcessorType<RLC>);
// Provided method
fn train(
&self,
learner_agent: RLC::LearningAgent,
training_components: RLComponents<RLC>,
env_init: RLC::EnvInit,
) -> RLResult<RLC::Policy> { ... }
}Available on crate feature
rl only.Expand description
Provides the fit function for any learning strategy
Required Methods§
Sourcefn train_loop(
&self,
training_components: RLComponents<RLC>,
learner_agent: &mut RLC::LearningAgent,
starting_epoch: usize,
env_init: RLC::EnvInit,
) -> (RLC::Policy, RLEventProcessorType<RLC>)
fn train_loop( &self, training_components: RLComponents<RLC>, learner_agent: &mut RLC::LearningAgent, starting_epoch: usize, env_init: RLC::EnvInit, ) -> (RLC::Policy, RLEventProcessorType<RLC>)
Training loop for this strategy
Provided Methods§
Sourcefn train(
&self,
learner_agent: RLC::LearningAgent,
training_components: RLComponents<RLC>,
env_init: RLC::EnvInit,
) -> RLResult<RLC::Policy>
fn train( &self, learner_agent: RLC::LearningAgent, training_components: RLComponents<RLC>, env_init: RLC::EnvInit, ) -> RLResult<RLC::Policy>
Train the learner agent with this strategy.