我正在尝试运行 OpenAI-gym 官方文档中提供的基本 OpenAI-gym 程序:
import gym
env = gym.make("CartPole-v1")
observation = env.reset()
for _ in range(1000):
env.render()
action = env.action_space.sample() # your agent here (this takes random actions)
observation, reward, done, info = env.step(action)
if done:
observation = env.reset()
env.close()
Run Code Online (Sandbox Code Playgroud)
但程序输出如下错误:
AttributeError: module 'gym' has no attribute 'make'。