Trait Environment
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§
fn 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.
fn reset(&mut self)
fn reset(&mut self)
Reset the environment to an initial state.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".