powered by
The classical mountain car problem for reinforcement learning.
[any] Arguments passed on to makeEnvironment.
any
An object of class R6ClassGenerator of length 24.
R6ClassGenerator
makeEnvironment("MountainCar", ...) makeEnvironment("MountainCarContinuous", ...)
makeEnvironment("MountainCar", ...)
makeEnvironment("MountainCarContinuous", ...)
$step(action) Take action in environment. Returns a list with state, reward, done.
$step(action)
state
reward
done
$reset() Resets the done flag of the environment and returns an initial state. Useful when starting a new episode.
$reset()
$visualize() Visualizes the environment (if there is a visualization function).
$visualize()
The classical Mountain Car task the action is one of 0, 1, 2, in the continuous version the action is in [-1, 1].
# NOT RUN { env = makeEnvironment("mountain.car") env$reset() env$step(1L) env = makeEnvironment("mountain.car.continuous") env$reset() env$step(0.62) # }
Run the code above in your browser using DataLab