Skip to main content

# MalmoEnv #

MalmoEnv is an OpenAI “gym” Python Environment for Malmo/Minecraft, directly implemented Python to Java Minecraft.

A Python “gym env” can be created and used to run an agent in a Malmo mission. Each such env has a remote Minecraft instance associated to it (by DNS name or IP and Port). For multi-agent missions, the first agent’s (role 0) Minecraft client instance is used as a coordinator to allow all agents to rendezvous on mission starts (i.e. on env resets).

As it’s pure Python, you just need this one package, its direct dependencies and (Java) Minecraft! Example missions, including some from the 2018 MarLo competition can be found in the “missions” directory.

## Examples of use: ##

Install dependencies:

Java8 JDK ([AdoptOpenJDK](https://adoptopenjdk.net/)), python3, git

pip3 install gym lxml numpy pillow

To prepare Minecraft (after cloning this repository with git clone https://github.com/Microsoft/malmo.git):

cd malmo/Minecraft

(echo -n “malmomod.version=” && cat ../VERSION) > ./src/main/resources/version.properties

Running a single agent example mission (run each command in different cmd prompt/shells - use launchClient.bat on Windows):

./launchClient.sh -port 9000 -env or (On Windows) launchClient.bat -port 9000 -env

(In another shell) cd malmo/MalmoEnv optionally run python3 setup.py install

python3 run.py –mission missions/mobchase_single_agent.xml –port 9000 –episodes 10

A two agent example mission (run each command in different cmd prompt/shells):

./launchClient.sh -port 9000 -env

./launchClient.sh -port 9001 -env

In the two agent case, running each agent in it’s own shell, the run script (for agents other than the first) is given two ports - the first for the mission coordinator and a second (port2) for the other agent’s Minecraft:

python3 run.py –mission missions/mobchase_two_agents.xml –port 9000 –role 0 –experimentUniqueId “test1”

python3 run.py –mission missions/mobchase_two_agents.xml –port 9000 –port2 9001 –role 1 –experimentUniqueId “test1”

## Running multi-agent examples using multiple Python threads: ##

python3 runmultiagent.py –mission missions/mobchase_two_agents.xml

## Installing with pip ##

MalmoEnv is available as a pip wheel.

If you install with pip3 install malmoenv then you can download the Minecraft mod (assuming you have git available from the command line) with:

python3 -c “import malmoenv.bootstrap; malmoenv.bootstrap.download()”

The sample missions will be downloaded to ./MalmoPlatform/MalmoEnv/missions.

python3 -c “import malmoenv.bootstrap; malmoenv.bootstrap.launch_minecraft(9000)” can be used to start up the Malmo Minecraft Mod listening for MalmoEnv connections on port 9000 after downloading Malmo.

To test: cd MalmoPlatform/MalmoEnv; python3 runmultiagent.py –mission missions/mobchase_single_agent.xml

Metadata

Release files for malmoenv 0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for malmoenv 0.0.8
File Size Uploaded Provenance Actions
malmoenv-0.0.8.tar.gz 17.1 kB Without provenance Details for malmoenv-0.0.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for malmoenv 0.0.8
File Interpreter ABI Platform Actions
malmoenv-0.0.8-py3-none-any.whl Python 3 none any Details for malmoenv-0.0.8-py3-none-any.whl

Total release size: 47.8 kB

Release files / malmoenv-0.0.8.tar.gz

Download URL malmoenv-0.0.8.tar.gz
Size 17.1 kB
Tags Source
SHA-256 checksum
How to use checksums
69fa0d4e6ce3a13a390c0c4d5b3e2257c1af46288d466971f1c64944ffd0d4a1
BLAKE2b-256 checksum
How to use checksums
e07ff86d196b485ecb29befe1c39457fc1ebf572bf4cbea4254b12af175b52bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/20.7.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.5.2

Release files / malmoenv-0.0.8-py3-none-any.whl

Download URL malmoenv-0.0.8-py3-none-any.whl
Size 30.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4c65b8052274b480773b0d87e089a3d16945f67073d6987541fb65655e17cc2b
BLAKE2b-256 checksum
How to use checksums
cacc78423b811083ae56dd8d3a46f3a3bcacdf8b8f5c1ff36650ea9413092722
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/20.7.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.5.2

Security for malmoenv 0.0.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.8 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page