pub trait Environment {
type State;
type Action;
const MAX_STEPS: usize;
// Required methods
fn state(&self) -> Self::State;
fn step(&mut self, action: Self::Action) -> StepResult<Self::State>;
fn reset(&mut self);
}Expand description
Trait to be implemented for a RL environment.
Required Associated Constants§
Required Associated Types§
Required Methods§
Sourcefn step(&mut self, action: Self::Action) -> StepResult<Self::State>
fn step(&mut self, action: Self::Action) -> StepResult<Self::State>
Take a step in the environment given an action.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.