Few questions about the environment
Hi team! I'm thinking about doing some reinforcement learning on Obstacle Tower, so I played a bit with the environment, and have a few questions. Note that my OS is Ubuntu 18.04.1 LTS, so I'm using Obstacle Tower for Linux.
Playing manually:
- I noticed that player can see through walls if it moves the camera and is close enough, just a question is that behavior here to stay?
- I can advance through floors, but always start at floor 1? Can I select the floor to play manually?
Running environment from code:
- Looking at the environment code, it starts UnityEnvironment with
no_graphics=False. Trying to change that breaks the execution. Seems that GPU is needed for the environment run? - Running one environment, the environment is using ~250mb of RAM and ~57mb of VRAM, I get ~80 samples per second and few percents of GPU and CPU. Running 24 environments in parallel (I have 24 logical CPUs), each environment is using mentioned amounts of memory (combined ~6gb of RAM and 1,3gb of VRAM), I get ~27 samples per second from each environment (much worse than for 1 environment), CPU is 100% used and GPU is 80% used (GeForce 1080ti). This is a very big resource usage, I can't seem to fit many environments on my machine, which is very powerful, and environments are using the same GPU I should use to learn/infer the network. Are there any settings or knobs to change resource management?
In general, Obstacle Tower looks like a really interesting environment and a really interesting challenge! Hope that I will manage to make it learn.
Hi @bjg2,
Thanks for the feedback, and your interest in Obstacle Tower! It is nice to hear people are already benchmarking it like this.
- When it comes to the camera clipping, I agree that it isn't perfect, but we made a trade-off between the clipping and the alternative which would be to move the character outside of the center of the field of view of the camera. We felt the former was more acceptable, as the latter makes for a much more complicated learning problem for an agent.
- While in "player mode" the episode always resets to the first floor, it is possible to reset to any of the 25 floors from the python API. Just use
env.floor(number)to set the starting floor. - Unity environments currently require a graphics device (either physical or virtual) in order to render frames. You can run in a headless linux instance using either xvfb or a virtual X11 desktop.
- We have done a fair amount of work to optimize the performance of the environment. There are a few additional improvements which may be made in the future, but they require changes to the Unity engine itself, and may not arrive during the contest.
I hope this information is helpful!
Hey, @awjuliani, thanks for the reply. All comments make sense. Regarding xvfb, I installed it and would like to try it out, but it seems I can't google how to do it.
Tried to start it via:
xvfb-run --auto-servernum --server-args='-screen 0 640x480x24:32' ./obstacletower.x86_64 -batchmode
and got this output:
Set current directory to /media/bjg/storage/code/obstacle-tower-env/examples/ObstacleTower
Found path: /media/bjg/storage/code/obstacle-tower-env/examples/ObstacleTower/obstacletower.x86_64
Mono path[0] = '/media/bjg/storage/code/obstacle-tower-env/examples/ObstacleTower/obstacletower_Data/Managed'
Mono config path = '/media/bjg/storage/code/obstacle-tower-env/examples/ObstacleTower/obstacletower_Data/MonoBleedingEdge/etc'
Preloaded 'ScreenSelector.so'
Preloaded 'libgrpc_csharp_ext.x64.so'
Display 0 'screen': 640x480 (primary device).
Logging to /home/bjg/.config/unity3d/Unity Technologies/ObstacleTower/Player.log
Xlib: extension "NV-GLX" missing on display ":99".
Someone on the internet suggested nographics flag, so I tried that as well:
xvfb-run --auto-servernum --server-args='-screen 0 640x480x24:32' ./obstacletower.x86_64 -batchmode -nographics
but I got the same error as when trying to use nographics from the environment code, huge stack trace ending with:
=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
=================================================================
If you have experience in how to use xvfb, can you point me to the right direction? Thanks!
I have the same problem to run Unity in cloud pc. extension "NV-GLX" missing on display.
I'm having a lot of xvfb related problems, main issue is here. If you're ok with it, you might train in ubuntu 16 docker.