2016-10-14 8 views
1

Google Compute Engine VMでCartPole-v0の例を実行しようとしていました。 https://gym.openai.com/docsgoogle計算エンジンでopenai gymを実行

import gym 
env = gym.make('CartPole-v0') 
env.reset() 
for _ in range(1000): 
    env.render() 
    env.step(env.action_space.sample()) # take a random action 

私はXQuartzがインストールされている、および-Xとのssh。

まず、私は pyglet.canvas.xlib.NoSuchDisplayExceptionを得ていた:接続できません "None" に

その後http://www.gitterforum.com/discussion/openai-gym?page=28によると、私が使用して「XVFB・ラン-s "-screen 0 1400x900x24"/binに/ bashの」

そして、それが結果と細かい走っ:

Making new env: CartPole-v0 
You are calling 'step()' even though this environment has already returned done = True. You should always call 'reset()' once you receive 'done = True' -- any further steps are undefined behavior 

しかし、レンダリングされたものは何もありません...

答えて

関連する問題