Skip to content

tambetm/minecraft-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minecraft_py

This project is outdated, please use MalmoEnv instead.

Python wrapper for Malmö, a platform for Artificial Intelligence experimentation and research built on top of Minecraft.

Installation

  1. Install the dependencies for your OS: Windows, Linux, MacOSX. You can skip Torch, Mono and ALE parts.

  2. Install the package itself:

git clone https://github.com/tambetm/minecraft-py.git
cd minecraft-py
pip install -e .

Installation automatically downloads the appropriate Malmo version and unzips it to package directory.

  1. To precompile Minecraft classes so that subsequent starts will be faster run following snippet:
import logging
logging.basicConfig(level=logging.DEBUG)

import minecraft_py

proc, port = minecraft_py.start()
minecraft_py.stop(proc)

Basically Minecraft downloads and compiles everything on first start, this snippet just starts it in debug mode, so you can see if it gets stuck. You can use similar snippet later to start and stop the Minecraft process.

Usage

minecraft_py module exposes following functions:

  • proc, port = start(port=None) - start a new Minecraft process. If port argument is given, it determines the port that Malmo is going to listen, otherwise the first free port starting from 10000 is used. Returns process object and port.
  • stop(proc) - stops Minecraft started previously with start(). Sends SIGTERM to entire process group.

In addition it adds MalmoPython module to PYTHONPATH that can be used to communicate with Minecraft process. MalmoPython API follows the Malmo C++ API. You can also check the tutorial and examples.

Known issues

  • Python 3 is not supported as Microsoft doesn't provide precompiled binaries for Python 3. If you happen to be using Ubuntu, you can try installing precompiled Ubuntu 14.04 or Ubuntu 16.04 version.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages