Metadata-Version: 2.4
Name: flatland-rl
Version: 4.3.0
Summary: Multi Agent Reinforcement Learning on Trains
Author-email: Flatland Association <contact@flatland-association.org>
License: MIT License
        
        Copyright (c) 2019 SBB AG
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://www.flatland-association.org
Project-URL: Github Repository, https://github.com/flatland-association/flatland-rl
Project-URL: Issue Tracker, https://github.com/flatland-association/flatland-rl/issues
Keywords: flatland
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: AUTHORS.md
Requires-Dist: attrs
Requires-Dist: boto3
Requires-Dist: click
Requires-Dist: crowdai_api
Requires-Dist: cython>=3.2.9
Requires-Dist: fastenum
Requires-Dist: importlib_resources
Requires-Dist: ipycanvas
Requires-Dist: ipyevents
Requires-Dist: ipython<9.0.0
Requires-Dist: ipywidgets
Requires-Dist: matplotlib<3.11
Requires-Dist: msgpack_numpy
Requires-Dist: msgpack
Requires-Dist: networkx<3.5
Requires-Dist: numpy<2
Requires-Dist: pandas<3
Requires-Dist: Pillow
Requires-Dist: pyglet
Requires-Dist: pydantic
Requires-Dist: python-dateutil
Requires-Dist: PyYAML
Requires-Dist: redis<8
Requires-Dist: requests
Requires-Dist: recordtype
Requires-Dist: redis
Requires-Dist: urllib3
Requires-Dist: typing_extensions
Requires-Dist: tqdm
Requires-Dist: svgutils
Requires-Dist: timeout_decorator
Requires-Dist: versions==1.6.1
Requires-Dist: contourpy<=1.3.2
Requires-Dist: rpds-py<2026.5.1
Provides-Extra: dev
Requires-Dist: coverage; extra == "dev"
Requires-Dist: opencv-python; extra == "dev"
Requires-Dist: deptry; extra == "dev"
Requires-Dist: folium; extra == "dev"
Requires-Dist: flake8; extra == "dev"
Requires-Dist: flake8-eradicate; extra == "dev"
Requires-Dist: ipyplot; extra == "dev"
Requires-Dist: jupyter; extra == "dev"
Requires-Dist: nbmake; extra == "dev"
Requires-Dist: pip-tools; extra == "dev"
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pytest-retry; extra == "dev"
Requires-Dist: pytest-xdist; extra == "dev"
Requires-Dist: seaborn; extra == "dev"
Requires-Dist: snakeviz; extra == "dev"
Requires-Dist: testcontainers; extra == "dev"
Requires-Dist: tox; extra == "dev"
Requires-Dist: tox-current-env; extra == "dev"
Provides-Extra: ml
Requires-Dist: dm-tree!=0.1.9,<0.1.11; extra == "ml"
Requires-Dist: pettingzoo; extra == "ml"
Requires-Dist: ray[default,rllib]; extra == "ml"
Requires-Dist: stable_baselines3; extra == "ml"
Requires-Dist: supersuit<3.10.0; extra == "ml"
Requires-Dist: scipy<1.16.0; extra == "ml"
Requires-Dist: torch; extra == "ml"
Requires-Dist: wandb; extra == "ml"
Dynamic: license-file

🚂 Flatland
========

![Flatland](https://i.imgur.com/0rnbSLY.gif)

[![Main](https://github.com/flatland-association/flatland-rl/actions/workflows/checks.yml/badge.svg)](https://github.com/flatland-association/flatland-rl/actions/workflows/checks.yml)

Flatland is an open-source toolkit for developing and comparing Multi-Agent Reinforcement Learning algorithms in little
(or ridiculously large!) gridworlds.

[The official documentation](https://flatland-association.github.io/flatland-book/intro.html) 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](http://flatland.aicrowd.com/research/top-challenge-solutions.html) in which we strongly
encourage you to take part in!

- [ECML 2026 Challenge](https://competition.flatland.cloud/suites/6240c685-0fb4-481e-9404-47a570632227) ([documentation](https://flatland-association.github.io/flatland-book/challenges/ecml2026.html) | [starterkit](https://github.com/flatland-association/ecml2026-starterkit))
- [Flatland 3 Challenge 2021](https://www.aicrowd.com/challenges/flatland-3) ([documentation](https://flatland-association.github.io/flatland-book/challenges/flatland3.html))
- [AMLD 2021 Challenge](https://www.aicrowd.com/challenges/flatland) ([documentation](https://flatland-association.github.io/flatland-book/challenges/amld2021.html))
- [NeurIPS 2020 Challenge](https://www.aicrowd.com/challenges/neurips-2020-flatland-challenge/) ([documentation](https://flatland-association.github.io/flatland-book/challenges/neurips2020-challenge.html))
- [2019 Challenge](https://www.aicrowd.com/challenges/flatland-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:

```shell
python -m venv .venv
source .venv/bin/activate
```

### Stable release

Install Flatland using pip:

```shell
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](https://cython.org/) 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:

```shell
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](https://github.com/googleapis/release-please)/[release-please-action](https://github.com/marketplace/actions/release-please-action) based
  on [Conventional Commit Messages](https://www.conventionalcommits.org/en/v1.0.0/)
* [How do I change the version number?](https://github.com/googleapis/release-please?tab=readme-ov-file#how-do-i-change-the-version-number)

👥 Credits
---

This library was initially developed
by [SBB](https://www.sbb.ch/en/), [Deutsche Bahn](https://www.deutschebahn.com/), [SNCF](https://www.sncf.com/en),
[AIcrowd](https://www.aicrowd.com/) and [numerous contributors](https://flatland-association.github.io/flatland-book/misc/credits.html) from the
flatland community. It is now developed by the [Flatland Association](https://flatland-association.org) and the [Flatland Community](https://flatland.cloud).

➕ Contributions
---
Please follow the [Contribution Guidelines](./CONTRIBUTING.md) for more details on how you can successfully contribute
to the project. We enthusiastically look forward to your contributions!

💬 Communication
---

* [Issue Tracker](https://github.com/flatland-association/flatland-rl/issues/)

🔗 Partners
---
<a href="https://sbb.ch" target="_blank" style="margin-right:30px"><img src="https://flatland-association.org/members/sbb-cff-ffs-logo.svg" alt="SBB" height="60"/></a>
&nbsp;
<a href="https://www.deutschebahn.com/" target="_blank" style="margin-right:30px"><img src="https://i.imgur.com/pjTki15.png" alt="DB"  height="60"/></a>
&nbsp;
<a href="https://www.sncf.com/en" target="_blank" style="margin-right:30px"><img src="https://iconape.com/wp-content/png_logo_vector/logo-sncf.png" alt="SNCF"  height="60"/></a>
&nbsp;
<a href="https://www.aicrowd.com" target="_blank"><img src="https://i.imgur.com/kBZQGI9.png" alt="AIcrowd"  height="60"/></a>
&nbsp;
<a href="https://flatland.cloud" target="_blank"><img src="https://flatland-association.org/members/flatland-community-logo.svg" alt="Flatland Community"  height="60"/></a>
