Trait gym_rs::GymEnv [−][src]
The trait which defines the needed methods an environment needs to provide
Required methods
fn step(&mut self, action: ActionType) -> (Vec<f64>, f64, bool, Option<String>)
[src]
Run one timestep of the environment’s dynamics. When end of episode is reached, you you are responsible for calling ‘reset()’ to reset this environment’s state
Accepts an action and returns a tuple (observation, reward, done, info)
Returns: observation: agent’s observation of the current environment reward: amount of reward returned after previous action done: whether the episode has ended info: optional information string *
fn reset(&mut self) -> Vec<f64>
[src]
Reset the environment to an initial state This function should not reset reset the environment’s random number generator(s) Returns the environments initial state
fn render(&self, viewer: &mut GifRender<'_>)
[src]
Render the environment
fn seed(&mut self, seed: u64)
[src]
Set the seed for this environments random number generator
Implementors
impl GymEnv for CartPoleEnv
[src]
fn step(&mut self, action: ActionType) -> (Vec<f64>, f64, bool, Option<String>)
[src]
fn reset(&mut self) -> Vec<f64>
[src]
fn render(&self, render: &mut GifRender<'_>)
[src]
fn seed(&mut self, seed: u64)
[src]
impl GymEnv for MountainCarEnv
[src]
fn step(&mut self, action: ActionType) -> (Vec<f64>, f64, bool, Option<String>)
[src]
fn reset(&mut self) -> Vec<f64>
[src]
fn render(&self, render: &mut GifRender<'_>)
[src]
render the environment using 30 frames per second