Struct MetaObservationSpace

Source
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§

Source§

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,

Source§

type Agent = Arc<ResettingMetaAgent<TC, OS, AS, FS>>

Type of agent to build
Source§

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
Source§

impl<OS: Clone, AS: Clone, FSI: Clone> Clone for MetaObservationSpace<OS, AS, FSI>

Source§

fn clone(&self) -> MetaObservationSpace<OS, AS, FSI>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<OS: Debug, AS: Debug, FSI: Debug> Debug for MetaObservationSpace<OS, AS, FSI>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

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>

Source§

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.
Source§

fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>
where R: Rng, Self: Sized,

Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Source§

fn map<F, S>(self, func: F) -> DistMap<Self, F, T, S>
where F: Fn(T) -> S, Self: Sized,

Create a distribution of values of ‘S’ by mapping the output of Self through the closure F Read more
Source§

impl<OS: FeatureSpace, AS: FeatureSpace, FSI: FeatureSpace> FeatureSpace for MetaObservationSpace<OS, AS, FSI>

Source§

fn num_features(&self) -> usize

Length of the encoded feature vectors.
Source§

fn features_out<'a, F: Float>( &self, element: &Self::Element, out: &'a mut [F], zeroed: bool, ) -> &'a mut [F]

Encode the feature vector of an element into a mutable slice. Read more
Source§

fn features<T>(&self, element: &Self::Element) -> T

Encode the feature vector of an element into an array.
Source§

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
Source§

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.
Source§

impl<OS: LogElementSpace, AS: LogElementSpace, FSI: LogElementSpace> LogElementSpace for MetaObservationSpace<OS, AS, FSI>

Source§

fn log_element<L: StatsLogger + ?Sized>( &self, name: &'static str, element: &Self::Element, logger: &mut L, ) -> Result<(), LogError>

Log an element of the space
Source§

impl<OS: NonEmptySpace, AS: NonEmptySpace, FSI: NonEmptySpace> NonEmptySpace for MetaObservationSpace<OS, AS, FSI>

Source§

fn some_element(&self) -> <Self as Space>::Element

An arbitrary deterministic element from the space.
Source§

impl<OS: PartialEq, AS: PartialEq, FSI: PartialEq> PartialEq for MetaObservationSpace<OS, AS, FSI>

Source§

fn eq(&self, other: &MetaObservationSpace<OS, AS, FSI>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<OS: Space, AS: Space, FSI: Space> Space for MetaObservationSpace<OS, AS, FSI>

Source§

type Element = MetaObservation<<OS as Space>::Element, <AS as Space>::Element, <FSI as Space>::Element>

Source§

fn contains(&self, value: &Self::Element) -> bool

Check whether a particular value is contained in the space.
Source§

impl<OS: SubsetOrd, AS: SubsetOrd, FSI: SubsetOrd> SubsetOrd for MetaObservationSpace<OS, AS, FSI>

Source§

fn subset_cmp(&self, other: &Self) -> Option<Ordering>

Compare using the subset relationship. This is a partial order.
Source§

fn strict_subset_of(&self, other: &Self) -> bool

Check if this is a strict subset of other.
Source§

fn subset_of(&self, other: &Self) -> bool

Check if this is a subset (strict or equal) of other.
Source§

fn strict_superset_of(&self, other: &Self) -> bool

Check if this is a strict superset of other.
Source§

fn superset_of(&self, other: &Self) -> bool

Check if this is a superset (strict or equal) of other.
Source§

impl<OS: Copy, AS: Copy, FSI: Copy> Copy for MetaObservationSpace<OS, AS, FSI>

Source§

impl<OS, AS, FSI> StructuralPartialEq for MetaObservationSpace<OS, AS, FSI>

Auto Trait Implementations§

§

impl<OS, AS, FSI> Freeze for MetaObservationSpace<OS, AS, FSI>
where OS: Freeze, AS: Freeze, FSI: Freeze,

§

impl<OS, AS, FSI> RefUnwindSafe for MetaObservationSpace<OS, AS, FSI>

§

impl<OS, AS, FSI> Send for MetaObservationSpace<OS, AS, FSI>
where OS: Send, AS: Send, FSI: Send,

§

impl<OS, AS, FSI> Sync for MetaObservationSpace<OS, AS, FSI>
where OS: Sync, AS: Sync, FSI: Sync,

§

impl<OS, AS, FSI> Unpin for MetaObservationSpace<OS, AS, FSI>
where OS: Unpin, AS: Unpin, FSI: Unpin,

§

impl<OS, AS, FSI> UnwindSafe for MetaObservationSpace<OS, AS, FSI>
where OS: UnwindSafe, AS: UnwindSafe, FSI: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsAny for T
where T: Any,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert into an Any trait reference.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> Wrap for T

Source§

fn wrap<W>(self, wrapper: W) -> Wrapped<Self, W>

Wrap in the given wrapper.