pub struct SimpleReplayBuffer<O, A>{ /* private fields */ }
Expand description
A simple generic replay buffer.
Trait Implementations§
Source§impl Agent<TestEnv, SimpleReplayBuffer<TestObsBatch, TestActBatch>> for TestAgent
impl Agent<TestEnv, SimpleReplayBuffer<TestObsBatch, TestActBatch>> for TestAgent
Source§fn opt_with_record(
&mut self,
_buffer: &mut SimpleReplayBuffer<TestObsBatch, TestActBatch>,
) -> Record
fn opt_with_record( &mut self, _buffer: &mut SimpleReplayBuffer<TestObsBatch, TestActBatch>, ) -> Record
Performs an optimization step and returns some information.
Source§fn save_params<T: AsRef<Path>>(&self, _path: T) -> Result<()>
fn save_params<T: AsRef<Path>>(&self, _path: T) -> Result<()>
Save the parameters of the agent in the given directory.
This method commonly creates a number of files consisting the agent
in the directory. For example, the DQN agent in
border_tch_agent
crate saves
two Q-networks corresponding to the original and target networks.Source§impl<O, A> ExperienceBufferBase for SimpleReplayBuffer<O, A>
impl<O, A> ExperienceBufferBase for SimpleReplayBuffer<O, A>
Source§impl<O, A> ReplayBufferBase for SimpleReplayBuffer<O, A>
impl<O, A> ReplayBufferBase for SimpleReplayBuffer<O, A>
Source§type Config = SimpleReplayBufferConfig
type Config = SimpleReplayBufferConfig
Configuration of the replay buffer.
Source§type Batch = GenericTransitionBatch<O, A>
type Batch = GenericTransitionBatch<O, A>
Batch generated from the buffer.
Source§fn build(config: &Self::Config) -> Self
fn build(config: &Self::Config) -> Self
Build a replay buffer from Self::Config.
Auto Trait Implementations§
impl<O, A> Freeze for SimpleReplayBuffer<O, A>
impl<O, A> RefUnwindSafe for SimpleReplayBuffer<O, A>where
O: RefUnwindSafe,
A: RefUnwindSafe,
impl<O, A> Send for SimpleReplayBuffer<O, A>
impl<O, A> Sync for SimpleReplayBuffer<O, A>
impl<O, A> Unpin for SimpleReplayBuffer<O, A>
impl<O, A> UnwindSafe for SimpleReplayBuffer<O, A>where
O: UnwindSafe,
A: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more