markusdumke/reinforcelearn

sarsa on mountaincar leads to uninformative error - because we have no func approx

berndbischl opened this issue · 0 comments

MRE:

package.path = system.file(package = "reinforcelearn")
path2pythonfile = paste0(package.path, "/gym_http_server.py")
system2("python", args = path2pythonfile, stdout = NULL,
  wait = FALSE, invisible = FALSE)

env = makeEnvironment("MountainCar-v0")

res = sarsa(env, n.episodes = 50)

Error in matrix(0, nrow = n.states, ncol = envir$n.actions) :
non-numeric matrix extent