devtools::install_github("smilesun/rlR")
or
devtools::install_github("smilesun/rlR", dependencies = TRUE)
rlR use keras with tensorflow as its backend for neural network as functional approximator and OpenAI gym.
see Python Dependencies Installation and Configuration
library(rlR) env = makeGymEnv("CartPole-v0") env
If you have R package "imager" installed, you could get a snapshot of the environment by
env$snapshot(preprocess = F)
agent = initAgent("AgentDQN", env) agent$learn(200L)
agent$plotPerf(F)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.