Hello, I'm trying to launch a malmo gym environment from a headless server. I've tried to install various xorg packages and currently are trying to instantiate a monitor emulator (I think) with the command
Xvfb :1 -screen 0 800x600x16 & but when trying to instantiate a gym environment (MineRLNavigateDense-v0) I get the following error
java.lang.ExceptionInInitializerError at net.minecraft.client.Minecraft.setWindowIcon(Minecraft.java:670) at net.minecraft.client.Minecraft.init(Minecraft.java:467) at net.minecraft.client.Minecraft.run(Minecraft.java:387) at net.minecraft.client.main.Main.main(Main.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:26) Caused by: java.lang.RuntimeException: org.lwjgl.LWJGLException: Could not open X display connection
After this, the python throws an error and says
RuntimeError: ERROR! MineRL could not detect an X Server, Monitor, or Virtual Monitor! In order to run minerl environments WITHOUT A HEAD use a software renderer such as 'xvfb': xvfb-run python3 <your_script.py> ! NOTE: xvfb conflicts with NVIDIA-drivers! ! To run headless MineRL on a system with NVIDIA-drivers, please start a ! vnc server of your choosing and then `export DISPLAY=:<insert ur vnc server #> If you're receiving this error and there is a monitor attached, make sure your current displayvariable is set correctly: DISPLAY=:0 python3 <your_script.py> ! NOTE: For this to work your account must be logged on the physical monitor. If none of these steps work, please complain in the discord! If all else fails, JUST PUT THIS IN A DOCKER CONTAINER! :)
But I'm trying to get this to work through a docker image which serves a jupyter notebook (since we are doing a tutorial on RL). Does anyone have any idea on how to make the docker image start an x-server correctly?
I'm a bit over my head with this, so sorry if the solution is simple.
python3 tutorial_1.pyand see the agent "doing nothing". Then, I followed "3 Get moving" from Tutorial.pdf, the agent does move but, there is an error: "Error: AgentHost::sendCommand : commands connection is not open. Is the mission running?", is it normal?
What's the deal with Malmo vs MalmoEnv? The github readme suggests that MalmoEnv " will most likely be the preferred way to develop with Malmo Minecraft going forward." So I should follow on from MalmoEnv examples when starting new? Is MalmoEnv like Malmo v2.0? I'm want to do a more rules based AI, not reinforcement OpenAI. So if I use Malmo I can get an observation grid using something like
msg = world_state.observations[-1].text
observations = json.loads(msg)
grid = observations.get(u'floor3x3', 0)
But in MalmoEnv it uses obs = comms.recv_message(self.client_socket) and then obs = obs.reshape((self.height, self.width, self.depth)).astype(np.uint8) to return a long array as the observations, I can't find any examples of how to parse this array so that my agent can know what blocks are around it. I feel like I might be missing something fundamental about how Malmo and MalmoEnv work together.
Hi everyone! I ran into the issue with bedrock being destroyed by discrete movement commands, as mentioned in David Bignell's post from Jan. 2018:
To get back to your original question - making certain blocks indestructible - in theory, players in survival mode can't break bedrock blocks, so you could use bedrock for your indestructible blocks...
Just wondering: Have there been any updates on this behavior? Maybe a flag I could set rather than the continuous-attack workaround he mentioned?
comms.pyto the SAX XML Parser. I replied to an existing issue on the topic here: https://github.com/microsoft/malmo/issues/848#issuecomment-554037484. I would definitely appreciate some help on the matter, though it seems like the devs have pretty much abandoned this.