pub struct ActorCriticAgent<OS, AS, P: Policy, C> { /* private fields */ }
Implementations§
Source§impl<OS, AS, P: Policy, C> ActorCriticAgent<OS, AS, P, C>
impl<OS, AS, P: Policy, C> ActorCriticAgent<OS, AS, P, C>
pub fn new<E, PB, CB>(env: &E, config: &ActorCriticConfig<PB, CB>) -> Selfwhere
E: EnvStructure<ObservationSpace = OS, ActionSpace = AS> + ?Sized,
E::FeedbackSpace: Space<Element = Reward>,
PB: BuildPolicy<Policy = P>,
CB: BuildCritic<Critic = C>,
Trait Implementations§
Source§impl<OS, AS, P, C> Agent<<OS as Space>::Element, <AS as Space>::Element> for ActorCriticAgent<OS, AS, P, C>
impl<OS, AS, P, C> Agent<<OS as Space>::Element, <AS as Space>::Element> for ActorCriticAgent<OS, AS, P, C>
Source§impl<OS, AS, P, C> BatchUpdate<<OS as Space>::Element, <AS as Space>::Element> for ActorCriticAgent<OS, AS, P, C>where
OS: FeatureSpace,
OS::Element: 'static,
AS: ParameterizedDistributionSpace<Tensor>,
AS::Element: 'static,
P: Policy,
C: Critic,
impl<OS, AS, P, C> BatchUpdate<<OS as Space>::Element, <AS as Space>::Element> for ActorCriticAgent<OS, AS, P, C>where
OS: FeatureSpace,
OS::Element: 'static,
AS: ParameterizedDistributionSpace<Tensor>,
AS::Element: 'static,
P: Policy,
C: Critic,
type HistoryBuffer = VecBuffer<<OS as Space>::Element, <AS as Space>::Element>
Source§fn buffer(&self) -> Self::HistoryBuffer
fn buffer(&self) -> Self::HistoryBuffer
Create a new history buffer.
Source§fn min_update_size(&self) -> HistoryDataBound
fn min_update_size(&self) -> HistoryDataBound
Request a minimum amount of on-policy data for the next batch update.
Source§fn batch_update<'a, I>(&mut self, buffers: I, logger: &mut dyn StatsLogger)
fn batch_update<'a, I>(&mut self, buffers: I, logger: &mut dyn StatsLogger)
Update the agent from a collection of history buffers. Read more
Source§impl<OS: Clone, AS: Clone, P: Clone + Policy, C: Clone> Clone for ActorCriticAgent<OS, AS, P, C>
impl<OS: Clone, AS: Clone, P: Clone + Policy, C: Clone> Clone for ActorCriticAgent<OS, AS, P, C>
Source§fn clone(&self) -> ActorCriticAgent<OS, AS, P, C>
fn clone(&self) -> ActorCriticAgent<OS, AS, P, C>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<OS: Debug, AS: Debug, P: Debug + Policy, C: Debug> Debug for ActorCriticAgent<OS, AS, P, C>
impl<OS: Debug, AS: Debug, P: Debug + Policy, C: Debug> Debug for ActorCriticAgent<OS, AS, P, C>
Source§impl<'de, OS, AS, P, C> Deserialize<'de> for ActorCriticAgent<OS, AS, P, C>where
OS: Deserialize<'de>,
AS: Deserialize<'de>,
P: Deserialize<'de> + Policy,
C: Deserialize<'de>,
impl<'de, OS, AS, P, C> Deserialize<'de> for ActorCriticAgent<OS, AS, P, C>where
OS: Deserialize<'de>,
AS: Deserialize<'de>,
P: Deserialize<'de> + Policy,
C: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<OS: PartialEq, AS: PartialEq, P: PartialEq + Policy, C: PartialEq> PartialEq for ActorCriticAgent<OS, AS, P, C>
impl<OS: PartialEq, AS: PartialEq, P: PartialEq + Policy, C: PartialEq> PartialEq for ActorCriticAgent<OS, AS, P, C>
Source§fn eq(&self, other: &ActorCriticAgent<OS, AS, P, C>) -> bool
fn eq(&self, other: &ActorCriticAgent<OS, AS, P, C>) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.Source§impl<OS, AS, P, C> Serialize for ActorCriticAgent<OS, AS, P, C>
impl<OS, AS, P, C> Serialize for ActorCriticAgent<OS, AS, P, C>
impl<OS, AS, P: Policy, C> StructuralPartialEq for ActorCriticAgent<OS, AS, P, C>
Auto Trait Implementations§
impl<OS, AS, P, C> !Freeze for ActorCriticAgent<OS, AS, P, C>
impl<OS, AS, P, C> !RefUnwindSafe for ActorCriticAgent<OS, AS, P, C>
impl<OS, AS, P, C> Send for ActorCriticAgent<OS, AS, P, C>
impl<OS, AS, P, C> !Sync for ActorCriticAgent<OS, AS, P, C>
impl<OS, AS, P, C> Unpin for ActorCriticAgent<OS, AS, P, C>
impl<OS, AS, P, C> UnwindSafe for ActorCriticAgent<OS, AS, P, C>where
AS: UnwindSafe,
C: UnwindSafe,
OS: UnwindSafe,
P: UnwindSafe,
<P as Policy>::PolicyModule: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more