Struct border_core::SyncSampler
source · [−]pub struct SyncSampler<E, P> where
E: Env,
P: StepProcessorBase<E>, { /* private fields */ }
Implementations
pub fn sample_and_push<A, R, R_>(
&mut self,
agent: &mut A,
buffer: &mut R_
) -> Result<Record> where
A: Agent<E, R>,
R: ReplayBufferBase<PushedItem = P::Output>,
R_: ReplayBufferBase<PushedItem = R::PushedItem>,
pub fn sample_and_push<A, R, R_>(
&mut self,
agent: &mut A,
buffer: &mut R_
) -> Result<Record> where
A: Agent<E, R>,
R: ReplayBufferBase<PushedItem = P::Output>,
R_: ReplayBufferBase<PushedItem = R::PushedItem>,
Samples transitions and pushes them into the replay buffer.
The replay buffer R_
, to which samples will be pushed, has to accept
PushedItem
that are the same with Agent::R
.
Returns FPS, including taking action, applying it to the, environment, producing transition, and pushing it into the replay buffer.