Skip to main content

🚂 Flatland

Flatland

Main

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!

📦 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

👥 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

SBB   DB   SNCF   AIcrowd   Flatland Community

Metadata

Release files for flatland-rl 4.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flatland-rl 4.3.0
File Size Uploaded
flatland_rl-4.3.0.tar.gz 20.4 MB Details

Release files / flatland_rl-4.3.0.tar.gz

Download URL flatland_rl-4.3.0.tar.gz
Size 20.4 MB
Tags Source
SHA-256 checksum
How to use checksums
90253da5b0822a7c0ffee864188c69ab8588dfb45cb3fb8dfc09fec0e365b11b
BLAKE2b-256 checksum
How to use checksums
20c81837871495fb873c6ecbbacd28d83137b0d1e759d746d52ca86d4f1a405c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 10, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

4.3.0 This release

1 release file

4.2.6

2 release files

4.2.5

2 release files

4.2.4

2 release files

4.2.3

2 release files

4.2.2

2 release files

4.2.1

2 release files

4.2.0

2 release files

4.1.4

2 release files

4.1.3

2 release files

4.1.2

2 release files

4.1.1

2 release files

4.1.0

2 release files

4.0.6

2 release files

4.0.5

2 release files

4.0.4

2 release files

4.0.3

2 release files

4.0.2

2 release files

4.0.1

2 release files

4.0.0

2 release files

3.0.15

1 release file

3.0.14

1 release file

3.0.13

1 release file

3.0.12

1 release file

3.0.11

1 release file

3.0.10

1 release file

3.0.9

1 release file

3.0.8

1 release file

3.0.7

1 release file

3.0.6

1 release file

3.0.5

1 release file

3.0.4

1 release file

3.0.3

1 release file

3.0.2

1 release file

3.0.1

1 release file

3.0.0

1 release file

2.2.2

1 release file

2.2.1

1 release file

2.2.0

1 release file

2.1.10

1 release file

2.1.9

1 release file

2.1.8

1 release file

2.1.7

1 release file

2.1.6

1 release file

2.1.5

1 release file

2.1.4

1 release file

2.1.3

1 release file

2.1.2

1 release file

2.1.1

1 release file

2.1.0

1 release file

2.0.0

1 release file

0.3.10

1 release file

0.3.9

1 release file

0.3.8

1 release file

0.3.6

1 release file

0.3.5

1 release file

0.3.4

1 release file

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.2

1 release file

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page