Trait relearn::envs::EnvDistribution
source · [−]pub trait EnvDistribution {
type State;
type Observation;
type Action;
type Feedback;
type Environment: Environment<State = Self::State, Observation = Self::Observation, Action = Self::Action, Feedback = Self::Feedback>;
fn sample_environment(&self, rng: &mut Prng) -> Self::Environment;
}
Expand description
A distribution of Environment
sharing the same external structure.
The EnvStructure
of each sampled environment must be a subset of the EnvStructure
of the
distribution as a whole. The discount factors must be identical.
The transition dynamics of the individual environment samples may differ.
Required Associated Types
type Observation
type Environment: Environment<State = Self::State, Observation = Self::Observation, Action = Self::Action, Feedback = Self::Feedback>
Required Methods
fn sample_environment(&self, rng: &mut Prng) -> Self::Environment
fn sample_environment(&self, rng: &mut Prng) -> Self::Environment
Sample an environment from the distribution.
Args
rng
- Random number generator used for sampling the environment structure.