| GymEnvironment | R Documentation |
Reinforcement learning environment from OpenAI Gym.
gym.name |
[ |
... |
[ |
For available gym environments take a look at https://gym.openai.com/envs.
makeEnvironment("gym", gym.name, ...)
For installation of the python package gym see
https://github.com/openai/gym#installation.
Then install the R package reticulate.
$close()
Close visualization window.
$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).
## Not run:
# Create an OpenAI Gym environment.
# Make sure you have Python, gym and reticulate installed.
env = makeEnvironment("gym", gym.name = "MountainCar-v0")
env$reset()
env$close()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.