A customisable 3D platform for agent-based AI research
DeepMind Lab provides a suite of challenging 3D navigation and puzzle-solving tasks for learning agents. Its primary purpose is to act as a testbed for research in artificial intelligence, especially deep reinforcement learning.
Disclaimer: This is not an official Google product.
If you use DeepMind Lab in your research and would like to cite the DeepMind Lab environment, we suggest you cite the DeepMind Lab paper.
You can reach us at [email protected].
Get Bazel from bazel.io.
Clone DeepMind Lab, e.g. by running
$ git clone https://github.com/deepmind/lab $ cd lab
For a live example of a random agent, run
lab$ bazel run :python_random_agent --define graphics=sdl -- \ --length=10000 --width=640 --height=480
Here is some more detailed build documentation, including how to install dependencies if you don't have them.
To enable compiler optimizations, pass the flag
-c optfor short, to each
bazel runcommand. The flag is omitted from the examples here for brevity, but it should be used for real training and evaluation where performance matters.
To test the game using human input controls, run
lab$ bazel run :game -- --level_script=tests/empty_room_test --level_setting=logToStdErr=true # or: lab$ bazel run :game -- -l tests/empty_room_test -s logToStdErr=true
logToStdErrsetting off to disable most log output.
The values of observations that the environment exposes can be printed at every step by adding a flag
--observation OBSERVATION_NAMEfor each observation of interest.
lab$ bazel run :game -- --level_script=lt_chasm --observation VEL.TRANS --observation VEL.ROT
lab$ bazel run :python_random_agent
The Python API is used for agent-environment interactions. We also provide bindings to DeepMind's "dm_env" general API for reinforcement learning, as well as a way to build a self-contained PIP package; see the separate documentation for details.
DeepMind Lab is built from the ioquake3 game engine, and it uses the tools q3map2 and bspc for map creation. Bug fixes and cleanups that originate with those projects are best fixed upstream and then merged into DeepMind Lab.
bspc is taken from github.com/TTimo/bspc, revision d9a372db3fb6163bc49ead41c76c801a3d14cf80. There are virtually no local modifications, although we integrate this code with the main ioq3 code and do not use their copy in the
depsdirectory. We expect this code to be stable.
q3map2 is taken from github.com/TTimo/GtkRadiant, revision d3d00345c542c8d7cc74e2e8a577bdf76f79c701. A few minor local modifications add synchronization. We also expect this code to be stable.
ioquake3 is taken from github.com/ioquake/ioq3, revision 29db64070aa0bae49953bddbedbed5e317af48ba. The code contains extensive modifications and additions. We aim to merge upstream changes occasionally.
We are very grateful to the maintainers of these repositories for all their hard work on maintaining high-quality code bases.
DeepMind Lab currently ships as source code only. It depends on a few external software libraries, which we ship in several different ways:
pnglibraries are referenced as external Bazel sources, and Bazel BUILD files are provided. The dependent code itself should be fairly portable, but the BUILD rules we ship are specific to Linux on x86. To build on a different platform you will most likely have to edit those BUILD files.
//third_party/rl_api, which has also been created by the DeepMind Lab authors. This code is portable.
EGL headers are included in this package (in
}), taken from the Khronos OpenGL/OpenGL ES XML API Registry at www.khronos.org/registry/EGL. The headers have been modified slightly to remove the dependency of EGL on X.
Several additional libraries are required but are not shipped in any form; they must be present on your system:
--define headless=...build setting.
The build rules are using a few compiler settings that are specific to GCC. If some flags are not recognized by your compiler (typically those would be specific warning suppressions), you may have to edit those flags. The warnings should be noisy but harmless.