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§
Sourcefn action_bounds(&self) -> Vec<(f64, f64)>
fn action_bounds(&self) -> Vec<(f64, f64)>
Gets the action space bounds (min, max) for each dimension
Sourcefn step(&mut self, action: Array1<f64>) -> Result<(Array1<f64>, f64, bool)>
fn step(&mut self, action: Array1<f64>) -> Result<(Array1<f64>, f64, bool)>
Takes a continuous action and returns reward and next state
Sourcefn action_dim(&self) -> usize
fn action_dim(&self) -> usize
Get action dimension