Closed vruss closed 6 years ago
I'm new to openai and I'm currently just try to get example projects to run but so far it's not working.
I want the game to render so I can see what's happening. CODE
import gym import universe env = gym.make('flashgames.CoasterRacer-v0') env.configure(remotes=1) observation_n = env.reset() while (True): action_n = [[('KeyEvent', 'ArrowUp', True)] for ob in observation_n] observation_n, reward_n, done_n, info = env.step(action_n) env.render()
The program won't launch. TERMINAL
python bot3.py [2017-12-17 13:47:08,181] Making new env: flashgames.CoasterRacer-v0 [2017-12-17 13:47:08,185] Writing logs to file: /tmp/universe-10334.log [2017-12-17 13:47:08,192] Ports used: [15904, 5900, 5901, 5902, 5903, 5904, 15900, 15901, 15902, 15903] [2017-12-17 13:47:08,192] [0] Creating container: image=quay.io/openai/universe.flashgames:0.20.28. Run the same thing by hand as: docker run -p 5905:5900 -p 15905:15900 --cap-add SYS_ADMIN --ipc host --privileged quay.io/openai/universe.flashgames:0.20.28 [2017-12-17 13:47:09,644] Remote closed: address=localhost:15905 [2017-12-17 13:47:09,644] Remote closed: address=localhost:5905 [2017-12-17 13:47:09,644] At least one sockets was closed by the remote. Sleeping 1s... universe-oe08aY-0 | Setting VNC and rewarder password: openai universe-oe08aY-0 | [Sun Dec 17 12:47:09 UTC 2017] Waiting for /tmp/.X11-unix/X0 to be created (try 1/10) universe-oe08aY-0 | [tigervnc] universe-oe08aY-0 | [tigervnc] Xvnc TigerVNC 1.7.0 - built Sep 8 2016 10:39:22 universe-oe08aY-0 | [tigervnc] Copyright (C) 1999-2016 TigerVNC Team and many others (see README.txt) universe-oe08aY-0 | [tigervnc] See http://www.tigervnc.org for information on TigerVNC. universe-oe08aY-0 | [tigervnc] Underlying X server release 11400000, The X.Org Foundation universe-oe08aY-0 | [tigervnc] universe-oe08aY-0 | [tigervnc] Initializing built-in extension VNC-EXTENSION universe-oe08aY-0 | [tigervnc] Initializing built-in extension Generic Event Extension universe-oe08aY-0 | [tigervnc] Initializing built-in extension SHAPE universe-oe08aY-0 | [tigervnc] Initializing built-in extension MIT-SHM universe-oe08aY-0 | [tigervnc] Initializing built-in extension XInputExtension universe-oe08aY-0 | [tigervnc] Initializing built-in extension XTEST universe-oe08aY-0 | [tigervnc] Initializing built-in extension BIG-REQUESTS universe-oe08aY-0 | [tigervnc] Initializing built-in extension SYNC universe-oe08aY-0 | [tigervnc] Initializing built-in extension XKEYBOARD universe-oe08aY-0 | [tigervnc] Initializing built-in extension XC-MISC universe-oe08aY-0 | [tigervnc] Initializing built-in extension XINERAMA universe-oe08aY-0 | [tigervnc] Initializing built-in extension XFIXES universe-oe08aY-0 | [tigervnc] Initializing built-in extension RENDER universe-oe08aY-0 | [tigervnc] Initializing built-in extension RANDR universe-oe08aY-0 | [tigervnc] Initializing built-in extension COMPOSITE universe-oe08aY-0 | [tigervnc] Initializing built-in extension DAMAGE universe-oe08aY-0 | [tigervnc] Initializing built-in extension MIT-SCREEN-SAVER universe-oe08aY-0 | [tigervnc] Initializing built-in extension DOUBLE-BUFFER universe-oe08aY-0 | [tigervnc] Initializing built-in extension RECORD universe-oe08aY-0 | [tigervnc] Initializing built-in extension DPMS universe-oe08aY-0 | [tigervnc] Initializing built-in extension X-Resource universe-oe08aY-0 | [tigervnc] Initializing built-in extension XVideo universe-oe08aY-0 | [tigervnc] Initializing built-in extension XVideo-MotionCompensation universe-oe08aY-0 | [tigervnc] Initializing built-in extension GLX universe-oe08aY-0 | [tigervnc] universe-oe08aY-0 | [tigervnc] Sun Dec 17 12:47:09 2017 universe-oe08aY-0 | [tigervnc] vncext: VNC extension running! universe-oe08aY-0 | [tigervnc] vncext: Listening for VNC connections on all interface(s), port 5900 universe-oe08aY-0 | [tigervnc] vncext: created VNC server for screen 0 universe-oe08aY-0 | [tigervnc] [dix] Could not init font path element /usr/share/fonts/X11/Type1/, removing from list! universe-oe08aY-0 | [tigervnc] [dix] Could not init font path element /usr/share/fonts/X11/75dpi/, removing from list! universe-oe08aY-0 | [tigervnc] [dix] Could not init font path element /usr/share/fonts/X11/100dpi/, removing from list! universe-oe08aY-0 | [Sun Dec 17 12:47:10 UTC 2017] [/usr/local/bin/sudoable-env-setup] Disabling outbound network traffic for none universe-oe08aY-0 | [init] [2017-12-17 12:47:10,056] Launching system_diagnostics_logger.py, recorder_logdir=/tmp/demo universe-oe08aY-0 | [init] [2017-12-17 12:47:10,070] Launching reward_recorder.py, recorder_logdir=/tmp/demo universe-oe08aY-0 | [init] [2017-12-17 12:47:10,071] Launching vnc_recorder.py, recorder_logdir=/tmp/demo universe-oe08aY-0 | [init] [2017-12-17 12:47:10,074] PID 55 launched with command ['sudo', '-H', '-u', 'nobody', 'DISPLAY=:0', 'DBUS_SESSION_BUS_ADDRESS=/dev/null', '/app/universe-envs/controlplane/bin/controlplane.py', '--rewarder-port=15901'] universe-oe08aY-0 | [init] [2017-12-17 12:47:10,145] init detected end of child process 58 with exit code 0, not killed by signal universe-oe08aY-0 | WebSocket server settings: universe-oe08aY-0 | - Listen on :5898 universe-oe08aY-0 | - Flash security policy server universe-oe08aY-0 | - No SSL/TLS support (no cert file) universe-oe08aY-0 | - proxying from :5898 to localhost:5900 [2017-12-17 13:47:10,645] Remote closed: address=localhost:5905 [2017-12-17 13:47:10,646] Remote closed: address=localhost:15905 [2017-12-17 13:47:10,646] At least one sockets was closed by the remote. Sleeping 1s... universe-oe08aY-0 | [nginx] 2017/12/17 12:47:10 [error] 65#65: *1 connect() failed (111: Connection refused) while connecting to upstream, client: 172.17.0.1, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:15901/", host: "127.0.0.1:10003" universe-oe08aY-0 | [nginx] 172.17.0.1 - openai [17/Dec/2017:12:47:10 +0000] "GET / HTTP/1.1" 502 182 "-" "-" universe-oe08aY-0 | [tigervnc] universe-oe08aY-0 | [tigervnc] Sun Dec 17 12:47:10 2017 universe-oe08aY-0 | [tigervnc] Connections: accepted: 172.17.0.1::39334 universe-oe08aY-0 | [init] [2017-12-17 12:47:10,890] init detected end of child process 16 with exit code 0, not killed by signal universe-oe08aY-0 | [vnc_recorder] [2017-12-17 12:47:11,342] Listening on 0.0.0.0:5899 universe-oe08aY-0 | [reward_recorder] [2017-12-17 12:47:11,386] Listening on 0.0.0.0:15898 [2017-12-17 13:47:11,647] Using the golang VNC implementation [2017-12-17 13:47:11,647] Using VNCSession arguments: {'subsample_level': 2, 'start_timeout': 7, 'fine_quality_level': 50, 'encoding': 'tight'}. (Customize by running "env.configure(vnc_kwargs={...})" universe-oe08aY-0 | [tigervnc] universe-oe08aY-0 | [tigervnc] Sun Dec 17 12:47:11 2017 universe-oe08aY-0 | [tigervnc] Connections: closed: 172.17.0.1::39334 (Clean disconnection) universe-oe08aY-0 | [tigervnc] EncodeManager: Framebuffer updates: 0 universe-oe08aY-0 | [tigervnc] EncodeManager: Total: 0 rects, 0 pixels universe-oe08aY-0 | [tigervnc] EncodeManager: 0 B (1:-nan ratio) universe-oe08aY-0 | [nginx] 2017/12/17 12:47:11 [info] 65#65: *1 client 172.17.0.1 closed keepalive connection [2017-12-17 13:47:11,653] [0] Connecting to environment: vnc://localhost:5905 password=openai. If desired, you can manually connect a VNC viewer, such as TurboVNC. Most environments provide a convenient in-browser VNC client: http://localhost:15905/viewer/?password=openai 2017/12/17 13:47:11 I1217 13:47:11.653738 10334 gymvnc.go:417] [0:localhost:5905] opening connection to VNC server universe-oe08aY-0 | [tigervnc] Connections: accepted: 172.17.0.1::39354 2017/12/17 13:47:11 I1217 13:47:11.659805 10334 gymvnc.go:550] [0:localhost:5905] connection established universe-oe08aY-0 | [tigervnc] SConnection: Client needs protocol version 3.8 universe-oe08aY-0 | [tigervnc] SConnection: Client requests security type VncAuth(2) universe-oe08aY-0 | [tigervnc] VNCSConnST: Server default pixel format depth 24 (32bpp) little-endian rgb888 universe-oe08aY-0 | [tigervnc] VNCSConnST: Client pixel format depth 24 (32bpp) little-endian bgr888 Traceback (most recent call last): File "bot3.py", line 11, in <module> env.render() File "/home/viktor/gym/gym/core.py", line 150, in render return self._render(mode=mode, close=close) File "/home/viktor/gym/gym/core.py", line 286, in _render return self.env.render(mode, close) File "/home/viktor/gym/gym/core.py", line 150, in render return self._render(mode=mode, close=close) File "/home/viktor/universe/universe/wrappers/render.py", line 52, in _render return self.env.render(mode=mode, *args, **kwargs) File "/home/viktor/gym/gym/core.py", line 150, in render return self._render(mode=mode, close=close) File "/home/viktor/gym/gym/core.py", line 286, in _render return self.env.render(mode, close) File "/home/viktor/gym/gym/core.py", line 150, in render return self._render(mode=mode, close=close) File "/home/viktor/universe/universe/envs/vnc_env.py", line 552, in _render self.vnc_session.render(self.connection_names[0]) go_vncdriver.Error: /tmp/pip-build-f9nV2f/go-vncdriver/.build/src/github.com/openai/go-vncdriver/main.go:387: go_vncdriver was installed without OpenGL support. See https://github.com/openai/go-vncdriver for details on how debug. [2017-12-17 13:47:11,675] Killing and removing container: id=7cfab68a8072ea022ee675590972a41a8293025a1a215d0398ccd5895883e54e [2017-12-17 13:47:11,687] [0:localhost:5905] Waiting on rewarder: failed to complete WebSocket handshake. Retry in 1s (slept 0s/7s): connection was closed uncleanly (peer dropped the TCP connection without previous WebSocket closing handshake) [2017-12-17 13:47:12,689] [0:localhost:5905] Waiting on rewarder: failed to establish rewarder TCP connection. Retry in 3s (slept 1s/7s): Connection was refused by other side: 111: Connection refused.
$ uname -a ; python --version; pip show universe gym tensorflow numpy go-vncdriver Pillow Linux viktor 4.10.0-42-generic #46~16.04.1-Ubuntu SMP Mon Dec 4 15:57:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux Python 2.7.12 Name: universe Version: 0.21.5 Summary: Universe: a software platform for measuring and training an AI's general intelligence across the world's supply of games, websites and other applications. Home-page: https://github.com/openai/universe Author: OpenAI Author-email: universe@openai.com License: UNKNOWN Location: /home/viktor/universe Requires: autobahn, docker-py, docker-pycreds, fastzbarlight, go-vncdriver, gym, Pillow, PyYAML, six, twisted, ujson --- Name: gym Version: 0.9.3 Summary: The OpenAI Gym: A toolkit for developing and comparing your reinforcement learning agents. Home-page: https://github.com/openai/gym Author: OpenAI Author-email: gym@openai.com License: UNKNOWN Location: /home/viktor/gym Requires: numpy, requests, six, pyglet --- Name: tensorflow Version: 1.4.1 Summary: TensorFlow helps the tensors flow Home-page: https://www.tensorflow.org/ Author: Google Inc. Author-email: opensource@google.com License: Apache 2.0 Location: /home/viktor/.local/lib/python2.7/site-packages Requires: mock, tensorflow-tensorboard, numpy, backports.weakref, wheel, six, protobuf, enum34 --- Name: numpy Version: 1.13.3 Summary: NumPy: array processing for numbers, strings, records, and objects. Home-page: http://www.numpy.org Author: NumPy Developers Author-email: numpy-discussion@python.org License: BSD Location: /home/viktor/.local/lib/python2.7/site-packages Requires: --- Name: go-vncdriver Version: 0.4.19 Summary: UNKNOWN Home-page: UNKNOWN Author: UNKNOWN Author-email: UNKNOWN License: UNKNOWN Location: /home/viktor/.local/lib/python2.7/site-packages Requires: numpy --- Name: Pillow Version: 4.3.0 Summary: Python Imaging Library (Fork) Home-page: https://python-pillow.org Author: Alex Clark (Fork Author) Author-email: aclark@aclark.net License: Standard PIL License Location: /home/viktor/.local/lib/python2.7/site-packages Requires: olefile
SOLUTION I didn't build the go-vncdriver. If anyone else has this issue just follow these instructions go-vncdriver
DISCLAIMER
I'm new to openai and I'm currently just try to get example projects to run but so far it's not working.
Expected behavior
I want the game to render so I can see what's happening. CODE
Actual behavior
The program won't launch. TERMINAL
Versions