ContinuousEnvironment

Trait ContinuousEnvironment 

Source
pub trait ContinuousEnvironment {
    // Required methods
    fn state(&self) -> Array1<f64>;
    fn action_bounds(&self) -> Vec<(f64, f64)>;
    fn step(&mut self, action: Array1<f64>) -> Result<(Array1<f64>, f64, bool)>;
    fn reset(&mut self) -> Array1<f64>;
    fn state_dim(&self) -> usize;
    fn action_dim(&self) -> usize;
}
Expand description

Continuous action environment trait

Required Methods§

Source

fn state(&self) -> Array1<f64>

Gets the current state

Source

fn action_bounds(&self) -> Vec<(f64, f64)>

Gets the action space bounds (min, max) for each dimension

Source

fn step(&mut self, action: Array1<f64>) -> Result<(Array1<f64>, f64, bool)>

Takes a continuous action and returns reward and next state

Source

fn reset(&mut self) -> Array1<f64>

Resets the environment

Source

fn state_dim(&self) -> usize

Get state dimension

Source

fn action_dim(&self) -> usize

Get action dimension

Implementors§