Giter Club home page Giter Club logo

gengrill / malmo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gaigresearch/malmo

0.0 0.0 0.0 85.42 MB

Project Malmo is a platform for Artificial Intelligence experimentation and research built on top of Minecraft. We aim to inspire a new generation of research into challenging new problems presented by this unique environment. --- For installation instructions, scroll down to *Getting Started* below, or visit the project page for more information:

Home Page: https://www.microsoft.com/en-us/research/project/project-malmo/

License: MIT License

Shell 0.85% C++ 18.01% Python 30.89% C 0.01% Java 43.35% C# 1.05% PowerShell 0.55% CMake 2.50% GLSL 0.08% Batchfile 0.13% Dockerfile 1.32% SWIG 1.28%

malmo's Introduction

Malmö

Project Malmö is a platform for Artificial Intelligence experimentation and research built on top of Minecraft. We aim to inspire a new generation of research into challenging new problems presented by this unique environment.

Join the chat at https://gitter.im/Microsoft/malmo Build Status license

Getting Started

MalmoEnv

MalmoEnv implements an Open AI "gym"-like environment in Python without any native code (communicating directly with Java Minecraft). This repository mainly uses this version of Malmo, if you prefer to use the old version we refer you to this repository.

Recommended setup process

Note: Minecraft uses gradle to build the project and it's not compatible with newer versions of Java, so make sure that you use java version 8 for the build and make sure that $JAVA_HOME is pointing to the correct version.

  • 1, install java version 8 and python 3.
  • 2, clone this repository (git clone https://github.com/martinballa/malmo)
  • 3, upgrade pip pip install --upgrade pip
  • 4, cd malmo/ and install malmo using pip pip install -e MalmoEnv/
  • 5, Test if your installation is correct by running examples/random_agent.py

Optional to run examples (RLlib + FFMPEG installation)

  • 1, After the 4th step run pip install -e MalmoEnv/[examples]
  • 2, You can test if Malmo works correctly by running the RLlib examples in the examples/ directory.
  • 3, (Linux) To run malmo headless on a linux headless server install xvfb sudo apt-get install -y xvfb

If you have any issues with running Malmo check the FAQ as it might cover the issues.

Examples

This repository contains various improvements to the Malmo framework. This mainly involves the launcher to automatically handle the Malmo instances instead of the need to run them manually. We also updated the malmoenv python package to facilitate working with malmo. We also got some guides and examples to show how to work with Malmo in both single and multi-agent setups. The examples use RLlib, which provides a wide range of state-of-the-art Reinforcement Learning algorithms. In the examples we have created wrappers to make Malmo compatible to RLlib, but based on these examples it is easy to adapt Malmo to other frameworks.

We provide some examples with explanations in the form of IPython notebooks that are ready to run after getting the dependencies installed. The notebooks go through the basics and we recommend to check them in the following order as they explain different ideas along the way:

We also provided non-notebook versions of these guides, which contain less explanation, but might be more reusable in your projects.


Baseline results

PPO Single-agent mobchase

We trained PPO in single and multi-agent setups on the Mob chases tasks. The tensorboard learning curves are shown below from a run of 1 million agent-env interactions. The checkpoint is available in the examples/checkpoints/ package. Single Agent PPO learning curves

Evaluation

PPO Multi-agent mobchase The multi-agent setup has been trained for a bit over 500k time steps per agent with shared parameters. A checkpoint from the 120th PPO iteration can be found in examples/checkpoints including the training stats from RLlib. The learning curves from this run are shown on the figure below: Multi-Agent PPO learning curves


Problems:

We're building up a Troubleshooting page of the wiki for frequently encountered situations. If that doesn't work then please ask a question on our chat page or open a new issue.


Launching Minecraft with our Mod:

Minecraft needs to create windows and render to them with OpenGL, so the machine you do this from must have a desktop environment.

Go to the folder where you unzipped the release, then:

cd Minecraft
launchClient (On Windows)
./launchClient.sh (On Linux or MacOSX)

or, e.g. launchClient -port 10001 to launch Minecraft on a specific port.

on Linux or MacOSX: ./launchClient.sh -port 10001

NB: If you run this from a terminal, the bottom line will say something like "Building 95%" - ignore this - don't wait for 100%! As long as a Minecraft game window has opened and is displaying the main menu, you are good to go.

By default the Mod chooses port 10000 if available, and will search upwards for a free port if not, up to 11000. The port chosen is shown in the Mod config page.

To change the port while the Mod is running, use the portOverride setting in the Mod config page.

The Mod and the agents use other ports internally, and will find free ones in the range 10000-11000 so if administering a machine for network use these TCP ports should be open.


Citations

Please cite Malmo as:

Johnson M., Hofmann K., Hutton T., Bignell D. (2016) The Malmo Platform for Artificial Intelligence Experimentation. Proc. 25th International Joint Conference on Artificial Intelligence, Ed. Kambhampati S., p. 4246. AAAI Press, Palo Alto, California USA. https://github.com/Microsoft/malmo

If you use the Multi-agent scenarios then please cite it as:

Perez-Liebana D., Hofmann K., Mohanty S. P., Kuno N., Kramer A., Devlin S., Gaina R. D., Ionita D. (2018) The Multi-Agent Reinforcement Learning in MalmÖ (MARLÖ) Competition Challenges in Machine Learning (NIPS Workshop)


Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

malmo's People

Contributors

daveybiggers avatar andkram avatar timhutton avatar katja-hofmann avatar martinballa avatar jorallo avatar mballa-qmul avatar nehaljwani avatar okkhoy avatar bengioe avatar ststevens avatar rodneyp290 avatar ongzexuan avatar drtuck avatar bloodknight avatar kirillbobyrev avatar elpollouk avatar filangelos avatar cameronaavik avatar crissman avatar techdaan avatar farizrahman4u avatar gaigresearch avatar ivyay avatar choas avatar msftgits avatar phantomb avatar gitter-badger avatar okdshin 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.