pub trait RLEnv: Send + Sync {
// Required methods
fn step(&mut self, action: &Action) -> Result<Transition, RloxError>;
fn reset(&mut self, seed: Option<u64>) -> Result<Observation, RloxError>;
fn action_space(&self) -> &ActionSpace;
fn obs_space(&self) -> &ObsSpace;
// Provided method
fn render(&self) -> Option<String> { ... }
}Expand description
The core environment trait.
All built-in environments implement this. The Send + Sync bounds
enable safe parallel stepping with Rayon.