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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flatland_rl-4.3.0.tar.gz (20.4 MB view details)

Uploaded Source

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

Hashes for flatland_rl-4.3.0.tar.gz
Algorithm Hash digest
SHA256 90253da5b0822a7c0ffee864188c69ab8588dfb45cb3fb8dfc09fec0e365b11b
MD5 1c14c0faa5ffc4113cc4ad2be7fb4082
BLAKE2b-256 20c81837871495fb873c6ecbbacd28d83137b0d1e759d746d52ca86d4f1a405c

See more details on using hashes here.

Provenance

The following attestation bundles were made for flatland_rl-4.3.0.tar.gz:

Publisher: publish.yml on flatland-association/flatland-rl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

4.3.0 This release

1 file

4.2.6

2 files

4.2.5

2 files

4.2.4

2 files

4.2.3

2 files

4.2.2

2 files

4.2.1

2 files

4.2.0

2 files

4.1.4

2 files

4.1.3

2 files

4.1.2

2 files

4.1.1

2 files

4.1.0

2 files

4.0.6

2 files

4.0.5

2 files

4.0.4

2 files

4.0.3

2 files

4.0.2

2 files

4.0.1

2 files

4.0.0

2 files

3.0.15

1 file

3.0.14

1 file

3.0.13

1 file

3.0.12

1 file

3.0.11

1 file

3.0.10

1 file

3.0.9

1 file

3.0.8

1 file

3.0.7

1 file

3.0.6

1 file

3.0.5

1 file

3.0.4

1 file

3.0.3

1 file

3.0.2

1 file

3.0.1

1 file

3.0.0

1 file

2.2.2

1 file

2.2.1

1 file

2.2.0

1 file

2.1.10

1 file

2.1.9

1 file

2.1.8

1 file

2.1.7

1 file

2.1.6

1 file

2.1.5

1 file

2.1.4

1 file

2.1.3

1 file

2.1.2

1 file

2.1.1

1 file

2.1.0

1 file

2.0.0

1 file

0.3.10

1 file

0.3.9

1 file

0.3.8

1 file

0.3.6

1 file

0.3.5

1 file

0.3.4

1 file

0.3.3

1 file

0.3.2

1 file

0.3.1

1 file

0.3.0

1 file

0.2.0

1 file

0.1.2

1 file

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page