pub struct Actor<A, E, P, R>where
A: Agent<E, R> + Configurable + SyncModel + 'static,
E: Env,
P: StepProcessor<E>,
R: ExperienceBufferBase<Item = P::Output> + ReplayBufferBase,{ /* private fields */ }
Expand description
Generate transitions by running Agent
in Env
.
flowchart TB
E["Agent
(in AsyncTrainer)"]-->|SyncModel::ModelInfo|A subgraph D[Actor] A[Agent]-->|Env::Act|B[Env] B-->|Env::Obs|A B-->|Step<E: Env>|C[StepProcessor] end C-->|ReplayBufferBase::PushedItem|F[ReplayBufferProxy]
(in AsyncTrainer)"]-->|SyncModel::ModelInfo|A subgraph D[Actor] A[Agent]-->|Env::Act|B[Env] B-->|Env::Obs|A B-->|Step<E: Env>|C[StepProcessor] end C-->|ReplayBufferBase::PushedItem|F[ReplayBufferProxy]
In Actor
, an Agent
runs on an Env
and generates Step
objects.
These objects are processed with StepProcessor
and sent to ReplayBufferProxy
.
The Agent
in the Actor
periodically synchronizes with the Agent
in
AsyncTrainer
via SyncModel::ModelInfo
.
See also the diagram in AsyncTrainer
.
Implementations§
Source§impl<A, E, P, R> Actor<A, E, P, R>where
A: Agent<E, R> + Configurable + SyncModel + 'static,
E: Env,
P: StepProcessor<E>,
R: ExperienceBufferBase<Item = P::Output> + ReplayBufferBase,
impl<A, E, P, R> Actor<A, E, P, R>where
A: Agent<E, R> + Configurable + SyncModel + 'static,
E: Env,
P: StepProcessor<E>,
R: ExperienceBufferBase<Item = P::Output> + ReplayBufferBase,
Auto Trait Implementations§
impl<A, E, P, R> Freeze for Actor<A, E, P, R>where
<A as Configurable>::Config: Freeze,
<E as Env>::Config: Freeze,
<P as StepProcessor<E>>::Config: Freeze,
impl<A, E, P, R> RefUnwindSafe for Actor<A, E, P, R>where
<A as Configurable>::Config: RefUnwindSafe,
<E as Env>::Config: RefUnwindSafe,
<P as StepProcessor<E>>::Config: RefUnwindSafe,
A: RefUnwindSafe,
E: RefUnwindSafe,
P: RefUnwindSafe,
R: RefUnwindSafe,
impl<A, E, P, R> Send for Actor<A, E, P, R>
impl<A, E, P, R> Sync for Actor<A, E, P, R>
impl<A, E, P, R> Unpin for Actor<A, E, P, R>
impl<A, E, P, R> UnwindSafe for Actor<A, E, P, R>where
<A as Configurable>::Config: UnwindSafe,
<E as Env>::Config: UnwindSafe,
<P as StepProcessor<E>>::Config: UnwindSafe,
A: UnwindSafe,
E: UnwindSafe,
P: UnwindSafe,
R: 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