MountainCar: Mountain Car

MountainCarR Documentation

Mountain Car

Description

The classical mountain car problem for reinforcement learning.

Arguments

...

[any]
Arguments passed on to makeEnvironment.

Format

An object of class R6ClassGenerator of length 24.

Details

The classical Mountain Car task the action is one of 0, 1, 2, in the continuous version the action is in [-1, 1].

Usage

makeEnvironment("MountainCar", ...)
makeEnvironment("MountainCarContinuous", ...)

Methods

  • $step(action)
    Take action in environment. Returns a list with state, reward, done.

  • $reset()
    Resets the done flag of the environment and returns an initial state. Useful when starting a new episode.

  • $visualize()
    Visualizes the environment (if there is a visualization function).

Examples

env = makeEnvironment("mountain.car")
env$reset()
env$step(1L)

env = makeEnvironment("mountain.car.continuous")
env$reset()
env$step(0.62)

markusdumke/reinforcelearn documentation built on Nov. 20, 2022, 8:09 p.m.