在本地设置体育馆环境

时间:2020-04-05 14:13:47

标签: r openai-gym

我尝试运行健身包示例

以下是直到出现问题的那一行:

library(gym)

remote_base <- "http://127.0.0.1:5000"
client <- create_GymClient(remote_base)

# Create environment
env_id <- "CartPole-v0"
instance_id <- env_create(client, env_id)

错误是这样的:

Error in curl::curl_fetch_memory(url, handle = handle) : 
  Failed to connect to 127.0.0.1 port 5000: Connection refused

如何解决?

我没有任何问题地安装了健身包

1 个答案:

答案 0 :(得分:1)

我认为您需要在单独的终端中启动服务器。尝试

python gym_http_server.py

documentation on GitHub中所述。