1. 程式人生 > >win10下安裝openai gym[atari]

win10下安裝openai gym[atari]

命令列

pip install --no-index -f https://github.com/Kojoley/atari-py/releases atari_py

裝完後測試

import gym
env = gym.make('Pong-v0')

for i_episode in range(100):
    env.reset()
    for t in range(100):
        env.render()
        action = env.action_space.sample()
        observation, reward, done, info = env.step(action)
        if done:
            print("Episode finished after {} timesteps".format(t+1))
            break
執行後即可顯示