Trait EnvStructure

Source
pub trait EnvStructure {
    type ObservationSpace: Space;
    type ActionSpace: Space;
    type FeedbackSpace: Space;

    // Required methods
    fn observation_space(&self) -> Self::ObservationSpace;
    fn action_space(&self) -> Self::ActionSpace;
    fn feedback_space(&self) -> Self::FeedbackSpace;
    fn discount_factor(&self) -> f64;
}
Expand description

The external structure of a reinforcement learning environment.

Required Associated Types§

Required Methods§

Source

fn observation_space(&self) -> Self::ObservationSpace

Space containing all possible observations.

This is not required to be tight: the space may contain elements that can never be produced as a state observation.

Source

fn action_space(&self) -> Self::ActionSpace

The space of all possible actions.

Every element in this space must be a valid action in all environment states (although immediately ending the episode with negative reward is a possible outcome). The environment may misbehave or panic for actions outside of this action space.

Source

fn feedback_space(&self) -> Self::FeedbackSpace

The space of all possible feedback.

This is not required to be tight: the space may contain elements that can never be produced as a feedback signal.

Source

fn discount_factor(&self) -> f64

A discount factor applied to future feedback.

A value between 0 and 1, inclusive.

Implementations on Foreign Types§

Source§

impl<T: EnvStructure + ?Sized> EnvStructure for &T

Source§

impl<T: EnvStructure + ?Sized> EnvStructure for Box<T>

Implementors§

Source§

impl EnvStructure for CartPole

Source§

impl EnvStructure for Chain

Source§

impl EnvStructure for DirichletRandomMdps

Source§

impl EnvStructure for MemoryGame

Source§

impl EnvStructure for OneHotBandits

Source§

impl EnvStructure for PartitionGame

Source§

impl EnvStructure for UniformBernoulliBandits

Source§

impl<D: Bounded<f64>> EnvStructure for Bandit<D>

Source§

impl<E> EnvStructure for MetaEnv<E>

Source§

impl<E, OS1, OS2, AS1, AS2, FS1, FS2> EnvStructure for FirstPlayerView<E>
where E: EnvStructure<ObservationSpace = TupleSpace2<OS1, OS2>, ActionSpace = TupleSpace2<AS1, AS2>, FeedbackSpace = TupleSpace2<FS1, FS2>>, OS1: Space, AS1: Space, FS1: Space,

Source§

impl<E, OS1, OS2, AS1, AS2, FS1, FS2> EnvStructure for SecondPlayerView<E>
where E: EnvStructure<ObservationSpace = TupleSpace2<OS1, OS2>, ActionSpace = TupleSpace2<AS1, AS2>, FeedbackSpace = TupleSpace2<FS1, FS2>>, OS2: Space, AS2: Space, FS2: Space,

Source§

impl<E, W> EnvStructure for Wrapped<E, W>

Source§

impl<OS, AS, FS> EnvStructure for StoredEnvStructure<OS, AS, FS>
where OS: Space + Clone, AS: Space + Clone, FS: Space + Clone,

Source§

impl<T, OS, AS, FS> EnvStructure for InnerEnvStructure<T>
where T: EnvStructure<ObservationSpace = MetaObservationSpace<OS, AS, FS>, ActionSpace = AS, FeedbackSpace = FS>, OS: Space, AS: Space, FS: Space,

Source§

impl<T: EnvStructure> EnvStructure for Wrapped<T, VisibleStepLimit>

Source§

impl<const W: usize, const H: usize, const VW: usize, const VH: usize> EnvStructure for FruitGame<W, H, VW, VH>