pub struct MetaObservationSpace<OS, AS, FSI> {
pub inner_observation: OptionSpace<OS>,
pub prev_step: OptionSpace<InnerStepObsSpace<AS, FSI>>,
pub episode_done: BooleanSpace,
}
Expand description
MetaEnv
observation space for element MetaObservation
.
Note
The generic feedback space type FSI
is the inner feedback space E::FeedbackSpace::InnerSpace
for MetaEnv<E>
.
Fields
inner_observation: OptionSpace<OS>
prev_step: OptionSpace<InnerStepObsSpace<AS, FSI>>
episode_done: BooleanSpace
Trait Implementations
sourceimpl<TC, OS, AS, FS> BuildAgent<MetaObservationSpace<OS, AS, FS>, AS, FS> for ResettingMetaAgentConfig<TC> where
TC: BuildAgent<OS, AS, FS> + Clone,
TC::Agent: BatchUpdate<OS::Element, AS::Element, Feedback = FS::Element>,
OS: Space + Clone,
AS: NonEmptySpace + Clone,
FS: Space + Clone,
impl<TC, OS, AS, FS> BuildAgent<MetaObservationSpace<OS, AS, FS>, AS, FS> for ResettingMetaAgentConfig<TC> where
TC: BuildAgent<OS, AS, FS> + Clone,
TC::Agent: BatchUpdate<OS::Element, AS::Element, Feedback = FS::Element>,
OS: Space + Clone,
AS: NonEmptySpace + Clone,
FS: Space + Clone,
type Agent = Arc<ResettingMetaAgent<TC, OS, AS, FS>>
type Agent = Arc<ResettingMetaAgent<TC, OS, AS, FS>>
Type of agent to build
sourcefn build_agent(
&self,
env: &dyn EnvStructure<ObservationSpace = MetaObservationSpace<OS, AS, FS>, ActionSpace = AS, FeedbackSpace = FS>,
_: &mut Prng
) -> Result<Self::Agent, BuildAgentError>
fn build_agent(
&self,
env: &dyn EnvStructure<ObservationSpace = MetaObservationSpace<OS, AS, FS>, ActionSpace = AS, FeedbackSpace = FS>,
_: &mut Prng
) -> Result<Self::Agent, BuildAgentError>
Build an agent for the given environment structure (EnvStructure
). Read more
sourceimpl<OS: Clone, AS: Clone, FSI: Clone> Clone for MetaObservationSpace<OS, AS, FSI>
impl<OS: Clone, AS: Clone, FSI: Clone> Clone for MetaObservationSpace<OS, AS, FSI>
sourcefn clone(&self) -> MetaObservationSpace<OS, AS, FSI>
fn clone(&self) -> MetaObservationSpace<OS, AS, FSI>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<OS: Space + Distribution<<OS as Space>::Element>, AS: Space + Distribution<<AS as Space>::Element>, FSI: Space + Distribution<<FSI as Space>::Element>> Distribution<<MetaObservationSpace<OS, AS, FSI> as Space>::Element> for MetaObservationSpace<OS, AS, FSI>
impl<OS: Space + Distribution<<OS as Space>::Element>, AS: Space + Distribution<<AS as Space>::Element>, FSI: Space + Distribution<<FSI as Space>::Element>> Distribution<<MetaObservationSpace<OS, AS, FSI> as Space>::Element> for MetaObservationSpace<OS, AS, FSI>
sourcefn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> <Self as Space>::Element
fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> <Self as Space>::Element
Generate a random value of T
, using rng
as the source of randomness.
sourcefn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T> where
R: Rng,
fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T> where
R: Rng,
Create an iterator that generates random values of T
, using rng
as
the source of randomness. Read more
sourceimpl<OS: FeatureSpace, AS: FeatureSpace, FSI: FeatureSpace> FeatureSpace for MetaObservationSpace<OS, AS, FSI>
impl<OS: FeatureSpace, AS: FeatureSpace, FSI: FeatureSpace> FeatureSpace for MetaObservationSpace<OS, AS, FSI>
sourcefn num_features(&self) -> usize
fn num_features(&self) -> usize
Length of the encoded feature vectors.
sourcefn features_out<'a, F: Float>(
&self,
element: &Self::Element,
out: &'a mut [F],
zeroed: bool
) -> &'a mut [F]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
fn features_out<'a, F: Float>(
&self,
element: &Self::Element,
out: &'a mut [F],
zeroed: bool
) -> &'a mut [F]ⓘNotable traits for &[u8]impl Read for &[u8]impl Write for &mut [u8]
Encode the feature vector of an element into a mutable slice. Read more
sourcefn features<T>(&self, element: &Self::Element) -> T where
T: BuildFromArray1D,
<T::Array as NumArray1D>::Elem: Float,
fn features<T>(&self, element: &Self::Element) -> T where
T: BuildFromArray1D,
<T::Array as NumArray1D>::Elem: Float,
Encode the feature vector of an element into an array.
sourcefn batch_features_out<'a, I, A>(
&self,
elements: I,
out: &mut ArrayBase<A, Ix2>,
zeroed: bool
) where
I: IntoIterator<Item = &'a Self::Element>,
Self::Element: 'a,
A: DataMut,
A::Elem: Float,
fn batch_features_out<'a, I, A>(
&self,
elements: I,
out: &mut ArrayBase<A, Ix2>,
zeroed: bool
) where
I: IntoIterator<Item = &'a Self::Element>,
Self::Element: 'a,
A: DataMut,
A::Elem: Float,
Encode the feature vectors of multiple elements into rows of a two-dimensional array. Read more
sourcefn batch_features<'a, I, T>(&self, elements: I) -> T where
I: IntoIterator<Item = &'a Self::Element>,
I::IntoIter: ExactSizeIterator,
Self::Element: 'a,
T: BuildFromArray2D,
<T::Array as NumArray2D>::Elem: Float,
fn batch_features<'a, I, T>(&self, elements: I) -> T where
I: IntoIterator<Item = &'a Self::Element>,
I::IntoIter: ExactSizeIterator,
Self::Element: 'a,
T: BuildFromArray2D,
<T::Array as NumArray2D>::Elem: Float,
Encode the feature vectors of multiple elements as rows of a two-dimensional array.
sourceimpl<OS: LogElementSpace, AS: LogElementSpace, FSI: LogElementSpace> LogElementSpace for MetaObservationSpace<OS, AS, FSI>
impl<OS: LogElementSpace, AS: LogElementSpace, FSI: LogElementSpace> LogElementSpace for MetaObservationSpace<OS, AS, FSI>
sourcefn log_element<L: StatsLogger + ?Sized>(
&self,
name: &'static str,
element: &Self::Element,
logger: &mut L
) -> Result<(), LogError>
fn log_element<L: StatsLogger + ?Sized>(
&self,
name: &'static str,
element: &Self::Element,
logger: &mut L
) -> Result<(), LogError>
Log an element of the space
sourceimpl<OS: NonEmptySpace, AS: NonEmptySpace, FSI: NonEmptySpace> NonEmptySpace for MetaObservationSpace<OS, AS, FSI>
impl<OS: NonEmptySpace, AS: NonEmptySpace, FSI: NonEmptySpace> NonEmptySpace for MetaObservationSpace<OS, AS, FSI>
sourcefn some_element(&self) -> <Self as Space>::Element
fn some_element(&self) -> <Self as Space>::Element
An arbitrary deterministic element from the space.
sourceimpl<OS: PartialEq, AS: PartialEq, FSI: PartialEq> PartialEq<MetaObservationSpace<OS, AS, FSI>> for MetaObservationSpace<OS, AS, FSI>
impl<OS: PartialEq, AS: PartialEq, FSI: PartialEq> PartialEq<MetaObservationSpace<OS, AS, FSI>> for MetaObservationSpace<OS, AS, FSI>
sourcefn eq(&self, other: &MetaObservationSpace<OS, AS, FSI>) -> bool
fn eq(&self, other: &MetaObservationSpace<OS, AS, FSI>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &MetaObservationSpace<OS, AS, FSI>) -> bool
fn ne(&self, other: &MetaObservationSpace<OS, AS, FSI>) -> bool
This method tests for !=
.
sourceimpl<OS: SubsetOrd, AS: SubsetOrd, FSI: SubsetOrd> SubsetOrd for MetaObservationSpace<OS, AS, FSI>
impl<OS: SubsetOrd, AS: SubsetOrd, FSI: SubsetOrd> SubsetOrd for MetaObservationSpace<OS, AS, FSI>
sourcefn subset_cmp(&self, other: &Self) -> Option<Ordering>
fn subset_cmp(&self, other: &Self) -> Option<Ordering>
Compare using the subset relationship. This is a partial order.
sourcefn strict_subset_of(&self, other: &Self) -> bool
fn strict_subset_of(&self, other: &Self) -> bool
Check if this is a strict subset of other
.
sourcefn subset_of(&self, other: &Self) -> bool
fn subset_of(&self, other: &Self) -> bool
Check if this is a subset (strict or equal) of other
.
sourcefn strict_superset_of(&self, other: &Self) -> bool
fn strict_superset_of(&self, other: &Self) -> bool
Check if this is a strict superset of other
.
sourcefn superset_of(&self, other: &Self) -> bool
fn superset_of(&self, other: &Self) -> bool
Check if this is a superset (strict or equal) of other
.
impl<OS: Copy, AS: Copy, FSI: Copy> Copy for MetaObservationSpace<OS, AS, FSI>
impl<OS, AS, FSI> StructuralPartialEq for MetaObservationSpace<OS, AS, FSI>
Auto Trait Implementations
impl<OS, AS, FSI> RefUnwindSafe for MetaObservationSpace<OS, AS, FSI> where
AS: RefUnwindSafe,
FSI: RefUnwindSafe,
OS: RefUnwindSafe,
impl<OS, AS, FSI> Send for MetaObservationSpace<OS, AS, FSI> where
AS: Send,
FSI: Send,
OS: Send,
impl<OS, AS, FSI> Sync for MetaObservationSpace<OS, AS, FSI> where
AS: Sync,
FSI: Sync,
OS: Sync,
impl<OS, AS, FSI> Unpin for MetaObservationSpace<OS, AS, FSI> where
AS: Unpin,
FSI: Unpin,
OS: Unpin,
impl<OS, AS, FSI> UnwindSafe for MetaObservationSpace<OS, AS, FSI> where
AS: UnwindSafe,
FSI: UnwindSafe,
OS: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more