pub trait StepProcessorBase<E: Env> {
    type Config: Clone;
    type Output;

    // Required methods
    fn build(config: &Self::Config) -> Self;
    fn reset(&mut self, init_obs: E::Obs);
    fn process(&mut self, step: Step<E>) -> Self::Output;
}
Expand description

Process Step and output an item Self::Output.

This trait is used in Trainer. Step object is transformed to Self::Output, which will be pushed into a replay buffer implementing ExperienceBufferBase. The type Self::Output should be the same with ExperienceBufferBase::PushedItem.

Required Associated Types§

source

type Config: Clone

Configuration.

source

type Output

The type of transitions produced by this trait.

Required Methods§

source

fn build(config: &Self::Config) -> Self

Build a producer.

source

fn reset(&mut self, init_obs: E::Obs)

Resets the object.

source

fn process(&mut self, step: Step<E>) -> Self::Output

Processes a Step object.

Implementors§

source§

impl<E, O, A> StepProcessorBase<E> for SimpleStepProcessor<E, O, A>where E: Env, O: SubBatch + From<E::Obs>, A: SubBatch + From<E::Act>,