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§
Sourcefn notify_push(&mut self, write_pos: usize, done: bool)
fn notify_push(&mut self, write_pos: usize, done: bool)
Notify that a transition was pushed at write_pos with done flag.
Sourcefn invalidate_overwritten(&mut self, write_pos: usize, count: usize)
fn invalidate_overwritten(&mut self, write_pos: usize, count: usize)
Invalidate any episodes that overlap with the overwritten region.
Sourcefn num_complete_episodes(&self) -> usize
fn num_complete_episodes(&self) -> usize
Number of complete (terminated/truncated) episodes currently tracked.