Struct gym_rs::MountainCarEnv[][src]

pub struct MountainCarEnv { /* fields omitted */ }

Description: The agent (a car) is started at the bottom of a valley. For any given state, the agent may choose to accelerate to the left, right or cease any acceleration.

Source: The environment appeared first in Andrew Moore’s PhD Thesis (1990). the source code in python: https://www.github.com/openai/gym

Observation: Num Observation Min Max 0 Car Position -1.2 0.6 1 Car Velocity -0.07 0.07

Actions: In case of discrete action: Num Action 0 Accelerate to the left 1 Don’t accelerate 2 Accelerate to the right

In case of continuous action, apply a force in range [-1.0, 1.0],
1.0 being maximum acceleration to the right,
-1.0 being maximum acceleration to the left

Note: This does not affect the amount of velocity affected by the gravitational pull acting on the cart.

Reward: Reward of 0 is awarded if the agent reached the flag (position = 0.5) on top of the mountain. Reward of -1 is awarded if the position of the agent is less than 0.5.

Starting State: The position of the car is assigned a uniform random value in [-0.6, -0.4]. The starting velocity of the car is always assigned to 0.

Episode Termination: The car position is more than 0.5 Episode length is greater than 200

Implementations

impl MountainCarEnv[src]

pub fn episode_length(&self) -> usize[src]

Return the current length of the episode, which increases with each step

Trait Implementations

impl Debug for MountainCarEnv[src]

impl Default for MountainCarEnv[src]

impl GymEnv for MountainCarEnv[src]

fn render(&self, render: &mut GifRender<'_>)[src]

render the environment using 30 frames per second

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,