Trait border_core::ReplayBufferBase
source · pub trait ReplayBufferBase: ExperienceBufferBase {
type Config: Clone;
type Batch;
// Required methods
fn build(config: &Self::Config) -> Self;
fn batch(&mut self, size: usize) -> Result<Self::Batch>;
fn update_priority(
&mut self,
ixs: &Option<Vec<usize>>,
td_err: &Option<Vec<f32>>
);
}
Expand description
Interface of replay buffers.
Ones implementing this trait generates a ReplayBufferBase::Batch, which is used to train agents.
Required Associated Types§
Required Methods§
sourcefn build(config: &Self::Config) -> Self
fn build(config: &Self::Config) -> Self
Build a replay buffer from Self::Config.