🚂 Flatland
Flatland is an open-source toolkit for developing and comparing Multi-Agent Reinforcement Learning algorithms in little (or ridiculously large!) gridworlds.
The official documentation contains full details about the environment and problem statement.
Flatland is tested with Python 3.10, 3.11, 3.12, 3.13 and 3.14 on modern versions of macOS, Linux and Windows. You may encounter problems with graphical rendering if you use WSL.
🏆 Challenges
This library was developed specifically for the AIcrowd Flatland challenges in which we strongly encourage you to take part in!
- ECML 2026 Challenge (documentation | starterkit)
- Flatland 3 Challenge 2021 (documentation)
- AMLD 2021 Challenge (documentation)
- NeurIPS 2020 Challenge (documentation)
- 2019 Challenge
📦 Setup
Setup virtual environment
Set up a virtual environment using your preferred method (we suggest the built-in venv) and activate it.
You can use your IDE to do this or by using the command line:
python -m venv .venv
source .venv/bin/activate
Stable release
Install Flatland using pip:
python -m pip install flatland-rl
This is the preferred method to install Flatland, as it will always install the most recent stable release.
Cython-accelerated build
A few hot-path modules are compiled with Cython for extra performance automatically,
as part of the normal install above, whenever a working C compiler is available - no extra flags needed.
Cython itself doesn't need to be installed manually either: it's a [build-system] requires entry in
pyproject.toml, so pip provisions it automatically as part of the build.
Requirement: a working C compiler (e.g. gcc/clang on Linux/macOS, or the Microsoft C++ Build Tools on
Windows). Compilation is optional and best-effort: if a compiler is missing, the build falls back to the
plain-Python sources instead of failing, printing a warning for each module it could not compile. Pass -v to
pip (python -m pip install -v flatland-rl) to see it - by default pip hides the underlying build output on
success. The install still succeeds either way - you get the plain-Python modules, just without the Cython
speed-up.
Forcing a plain-Python build: there's no dedicated flag for this - make the build think no C compiler is available instead, the same mechanism this repo's own CI relies on to test the fallback path:
CC=/nonexistent-cc CXX=/nonexistent-cxx python -m pip install flatland-rl
(or CC=/nonexistent-cc CXX=/nonexistent-cxx pip install -e . from a checkout). This produces the same
per-module warning output as a genuinely missing compiler - expected and harmless, the install still succeeds
as pure-Python.
Only a source distribution (sdist) is published to PyPI - there's no prebuilt wheel - so this always builds
from source on your own machine. That's deliberate: a wheel with a
Cython extension gets tagged to one specific Python version/platform/ABI the moment Cython even attempts to
compile it, regardless of whether the compile actually succeeds - publishing one would mean every other Python
version or OS gets no matching wheel at all. Building from source sidesteps that, at the cost of needing
Python's standard packaging tools, and failing outright in environments that categorically refuse to build from
source (e.g. pip install --only-binary=:all:, some locked-down/air-gapped setups).
🚀 Releases
- Release PRs are automatically opened by release-please/release-please-action based on Conventional Commit Messages
- How do I change the version number?
👥 Credits
This library was initially developed by SBB, Deutsche Bahn, SNCF, AIcrowd and numerous contributors from the flatland community. It is now developed by the Flatland Association and the Flatland Community.
➕ Contributions
Please follow the Contribution Guidelines for more details on how you can successfully contribute to the project. We enthusiastically look forward to your contributions!
💬 Communication
🔗 Partners
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file flatland_rl-4.3.0.tar.gz.
File metadata
- Download URL: flatland_rl-4.3.0.tar.gz
- Upload date:
- Size: 20.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90253da5b0822a7c0ffee864188c69ab8588dfb45cb3fb8dfc09fec0e365b11b
|
|
| MD5 |
1c14c0faa5ffc4113cc4ad2be7fb4082
|
|
| BLAKE2b-256 |
20c81837871495fb873c6ecbbacd28d83137b0d1e759d746d52ca86d4f1a405c
|
Provenance
The following attestation bundles were made for flatland_rl-4.3.0.tar.gz:
Publisher:
publish.yml on flatland-association/flatland-rl
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flatland_rl-4.3.0.tar.gz -
Subject digest:
90253da5b0822a7c0ffee864188c69ab8588dfb45cb3fb8dfc09fec0e365b11b - Sigstore transparency entry: 2407538984
- Sigstore integration time:
-
Permalink:
flatland-association/flatland-rl@381dc7eca8952978dc85548f9cf9c02052c080a4 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/flatland-association
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@381dc7eca8952978dc85548f9cf9c02052c080a4 -
Trigger Event:
push
-
Statement type: