MountainCar: Mountain Car

Description Arguments Format Details Usage Methods Examples

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

Examples

1
2
3
4
5
6
7
env = makeEnvironment("mountain.car")
env$reset()
env$step(1L)

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

Example output

          [,1] [,2]
[1,] -0.531152    0
$state
           [,1]         [,2]
[1,] -0.5310953 5.664406e-05

$reward
[1] -1

$done
[1] FALSE

           [,1] [,2]
[1,] -0.4113621    0
$state
           [,1]         [,2]
[1,] -0.4112581 0.0001040411

$reward
[1] -1

$done
[1] FALSE

reinforcelearn documentation built on May 2, 2019, 9:20 a.m.