/malmopy

malmopy: a Python library for working with Project Malmo

Primary LanguageHTMLMIT LicenseMIT

malmopy: a Python library for working with Project Malmo

Project Malmo comes with MalmoPython, which is a Python wrapper around a C++ library.

The C++ API is directly exposed using Boost.Python.

This library aims to provide a more Pythonic API by providing a higher level abstraction around common tasks.

Installation

Copy src/malmopy.py and put it together with MalmoPython.so.

API

Initialization

malmo = malmopy.Malmo()

Start a mission from mission xml file

malmo.start_mission('missions/cliff_walking_1.xml')

Movement

# move forward 1m
malmo.move()

# turn left
malmo.turn_left()

# turn right
malmo.turn_right()

Control loop

for obs in malmo.observations():
    # agent policy