lab2d
Basic Information
DeepMind Lab2D is a C++ and Lua based system for creating 2D grid-world environments intended for machine learning research and agent development. It is designed for ease of use and runtime performance and supports defining world layouts with simple text-based maps and behavior with Lua code. Agents interact with environments through a Python dm_env API or a custom C API, and multiple agents are supported. The project is distributed as a Python package named dmlab2d with pre-built wheels for Linux and macOS and can be built from source when needed. The repository includes example agents, build scripts, and a suggested citation via an accompanying whitepaper for research use.
Links
Stars
432
Github Repository
App Details
Features
Environment core implemented in C++ with behavior scripting via Lua to create customizable grid-worlds. Layouts are text-based maps paired with Lua for dynamic behavior. Dual APIs are provided: a Python dm_env API for common ML integration and a custom C API compatible with other DeepMind Lab tooling. Supports multiple agents and ships a simple random agent example for testing and previewing environments. Distributed as a pip-installable package with pre-built wheels for Linux and macOS and an install.sh sample build script for source compilation. Bazel build rules and third_party/rl_api are included. External dependencies and prerequisites are documented, including Lua/LuaJIT variants, eigen, png, zlib, and Python 3.8+ with NumPy, PyGame, and packaging.
Use Cases
Lab2D provides a performant, extensible platform for prototyping and running reinforcement learning experiments in 2D grid worlds. Researchers can rapidly define map layouts and agent behaviors using readable text maps and Lua scripting, enabling quick iteration of environment designs. The Python dm_env API eases integration with existing ML toolchains and training code, while the C API allows lower-level integration and reuse of DeepMind Lab tooling. Pre-built Python wheels simplify setup on common platforms and an example random agent demonstrates basic usage. Documentation of external dependencies and build notes helps teams port or rebuild for unsupported platforms. Overall, it reduces engineering overhead for constructing reproducible multi-agent research environments.