EpisodeAware

Trait EpisodeAware 

Source
pub trait EpisodeAware {
    // Required methods
    fn notify_push(&mut self, write_pos: usize, done: bool);
    fn invalidate_overwritten(&mut self, write_pos: usize, count: usize);
    fn num_complete_episodes(&self) -> usize;
}
Expand description

Trait for episode-aware buffer components.

Anything that needs to track episode boundaries in a ring buffer implements this trait. Used by SequenceReplayBuffer and HERBuffer.

Required Methods§

Source

fn notify_push(&mut self, write_pos: usize, done: bool)

Notify that a transition was pushed at write_pos with done flag.

Source

fn invalidate_overwritten(&mut self, write_pos: usize, count: usize)

Invalidate any episodes that overlap with the overwritten region.

Source

fn num_complete_episodes(&self) -> usize

Number of complete (terminated/truncated) episodes currently tracked.

Implementors§