📜  openai gym 随机动作 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:17.643000             🧑  作者: Mango

代码示例1
# load gym envirolment
import gym
env = gym.make('CartPole-v0')

env.reset()
for _ in range(300):
    env.render()
    env.step(env.action_space.sample()) # take a random action
env.close()