Giter VIP home page Giter VIP logo

minecraft-py's Introduction

minecraft_py

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.

minecraft-py's People

Contributors

tambetm avatar yet-another-account avatar evhub avatar keisukefukuda avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.