Open YunqiuXu opened 5 years ago
There currently is no headless mode. You might want to check out Minerl (http://www.minerl.io/) which is interested in pursuing that. Resets are very slow if the world (i.e. the mission XML) changes so should try to avoid that.
You should also look into the PrioritiseOffscreenRendering
setting - eg see the render speed test sample.
This doesn't prevent generating the frame, but it does stop it from being rendered to the screen (except once per second), which should speed things up a fair bit.
You can also increase frame rate by requesting a smaller sized frame.
Out of interest, what frame rates are you getting, and what are you hoping for?
Note that Minecraft's frame rate is a separate thing to its game tick rate - the game as a whole can be overclocked if you want to increase the game tick.
As for slow resetting, are you forcing Malmo to re-load the world each time you reset? This is extremely slow (but the safest way to start each episode with an exact known state). There are some details here: https://github.com/microsoft/malmo/wiki/FAQ#why-do-stale-mission-elements-persist-into-later-missions
Again, what sort of reset time are you seeing, and what would you consider acceptable?
Hi @DaveyBiggers, I actually compared the speed between running minerl env on Windows and Ubuntu (headless), and I'm quite surprised as on windows it has 100+ fps while on Linux it only has 20~50 fps. I've tested the simple example described in the minerl document on several headless machines and they all had similar results. I'm wondering whether the speed in headless environment can be further improved? Thanks (To launch Minecraft in headless environments, I'm using xvfb-run and xpra.)
@alexlimh I remember when I tried playing plain minecraft on linux, I found it was not using gpu rendering at all with default setting. I had to configure it to use gpu rendering, so I think the fps issue on linux implies that it is not using gpu rendering at all.
The frame rate is so slow, is there anyway to speed it up, just like "not to render in openai's gym"? btw, the reset process is slow as well, how can I reset the env immediately if "done" is reached?