RLEnv

Trait RLEnv 

Source
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.

Required Methods§

Source

fn step(&mut self, action: &Action) -> Result<Transition, RloxError>

Source

fn reset(&mut self, seed: Option<u64>) -> Result<Observation, RloxError>

Source

fn action_space(&self) -> &ActionSpace

Source

fn obs_space(&self) -> &ObsSpace

Provided Methods§

Source

fn render(&self) -> Option<String>

Implementors§