Home

Awesome

DeepMind Lab2D

A learning environment written in C++ and Lua for the creation of grid worlds.

<div align="center"> <img src="docs/screenshot.png" alt="DeepMind Lab2D screenshot"> </div>

About

DeepMind Lab2D is a system for the creation of 2D environments for machine learning. The main goals of the system are ease of use and performance: The environments are "grid worlds", which are defined with a combination of simple text-based maps for the layout of the world, and Lua code for its behaviour. Machine learning agents interact with these environments through one of two APIs, the Python dm_env API or a custom C API (which is also used by DeepMind Lab). Multiple agents are supported.

If you use DeepMind Lab2D in your research and would like to cite it, we suggest you cite the accompanying whitepaper.

Installation

PyPI version

DeepMind Lab2d is available on PyPI and can be installed using:

pip install dmlab2d

dmlab2d is distributed as pre-built wheels for Linux and macOS. If there is no appropriate wheel for your platform, you will need to build it from source. See install.sh for an example installation script that can be adapted to your setup.

Getting started

We provide an example "random" agent in python/random_agent, which performs random actions. This can be used as a base for creating your own agents, and as a simple tool to preview an environment.

bazel run -c opt dmlab2d/random_agent -- --level_name=clean_up

External dependencies, prerequisites and porting notes

DeepMind Lab2D depends on a few external software libraries, which we ship in several different ways:

The build rules are using a few compiler settings that are specific to GCC/Clang. If some flags are not recognized by your compiler (typically those would be specific warning suppressions), you may have to edit those flags.

Disclaimer

This is not an official Google product.