Skip to main content

RLStrategy

Trait RLStrategy 

Source
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§

Source

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§

Source

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.

Implementors§