Trait gym_core::GymEnv[][src]

pub trait GymEnv<ActionDtype> {
    fn state_size(&self) -> Vec<usize>;
fn action_space(&self) -> ActionSpace<ActionDtype>;
fn state(&self, out: ArrayViewMut<'_, f32, IxDyn>) -> Result<()>;
fn step(&mut self, action: ArrayD<ActionDtype>) -> Result<i32>;
fn is_over(&self) -> bool;
fn reset(&mut self); }

Required methods

fn state_size(&self) -> Vec<usize>[src]

fn action_space(&self) -> ActionSpace<ActionDtype>[src]

it’s hard to cover all types of action_space: discrete/continuous, box, hierarchical, etc Supported action types:

  • Single Discrete Integer (n)
  • N-dim discrete integers (n, num_action for each dim)
  • Single Continuous (low, high)
  • N-dim continuous (shape, n-dim low, n-dim high)

fn state(&self, out: ArrayViewMut<'_, f32, IxDyn>) -> Result<()>[src]

fn step(&mut self, action: ArrayD<ActionDtype>) -> Result<i32>[src]

fn is_over(&self) -> bool[src]

fn reset(&mut self)[src]

Loading content...

Implementors

Loading content...