-
Notifications
You must be signed in to change notification settings - Fork 608
Conversation
...k/malmo into elpollouk/MultiAgentEnv
martinballa
commented
Oct 2, 2020
Is it possible to add a new bash file for running the Malmo instances headless?
It should be in 'Minecraft/launchClient_headless.sh' and it should contain the following 2 lines:
#! /bin/bash
xvfb-run -a -e /dev/stdout -s '-screen 0 640x480x16' ./launchClient.sh -port 1ドル -env > ../out.txt 2>&1
martinballa
commented
Dec 5, 2020
I have been working with Adrian's updates for a while and it is much easier to run Malmo, especially on clusters. Unfortunately, when Malmo crashes the launcher keeps hanging and only says "Waiting for N instances..." instead of throwing an exception with an error message. The problem is that each Malmo instance runs on their own process and do not send their output back to the main thread.
martinballa
commented
Dec 5, 2020
Another minor issue I had with the launcher is when my run crashes the Malmo instances keep running and I have to manually kill the java processes. Or in some cases it would be great to keep the instances as it takes a few minutes per instance to do a full start-up. If somebody would continue working on this I think these features would be great additions to Malmo. I wanted to make them as issues, but this PR has not been approved yet.
Added a new
TurnBasedRllibMultiAgentEnvenvironment implementation that is compatible with RLlib's multi-agent environment. This environment wraps multipleMalmoEnvenvironment instances and sends steps to them in turn based sequence to work with multiple Minecraft agents operating in a single gameplay session.In addition to the
TurnBasedRllibMultiAgentEnvenvironment, I've also addedSyncRllibMultiAgentEnvto sync Malmo's actions with their resultant observations. This is managed by sending an idle step request to each Minecraft instance after each real step request to query the resultant state of the environment.Finally, I've included a new
launcher.pyscript that can be used either directly or by importing into training scripts to launch multiple Minecraft instances. The script clones the Malmo directory into a new temporary directory and launches Minecraft from the new copy. This avoids issues with running multiple instances of Minecraft from the same directory causing conflicts as they try to update the same files.