Skip to main content

Flatland Baselines

Main

🚂 This repo provides baselines for Flatland environments, i.e. controllers/agents that drive trains through such grid worlds. Technically, a baselines implements flatland.envs.RailEnvPolicy.RailEnvPolicy interface.

📊 Flatland Benchmarks (FAB) is an open-source web-based platform for running Benchmarks to foster Open Research. Flatland baselines can be used for the Flatland Benchmarks hosted at fab.flatland.cloud and the scenarios in the Flatland scenario repository flatland-scenarios.

Baselines provided:

TL;DR;

Generate a trajectory from deadlock avoidance baseline:

conda env update -f environment.yml
conda activate flatland-baselines
mkdir output
PYTHONPATH=$PWD flatland-trajectory-generate-from-policy \
  --policy-pkg flatland_baselines.deadlock_avoidance_heuristic.policy.deadlock_avoidance_policy --policy-cls DeadLockAvoidancePolicy \
  --obs-builder-pkg flatland_baselines.deadlock_avoidance_heuristic.observation.full_env_observation --obs-builder-cls FullEnvObservation \
  --seed 42 \
  --callbacks-pkg flatland.callbacks.generate_movie_callbacks --callbacks-cls GenerateMovieCallbacks \
  --data-dir $PWD/output 

Output:

 99%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▌   | 466/471 [00:14<00:00, 35.00it/s]
Generating Thumbnail...
Generating Normal Video...
Videos :  ........../flatland-baselines/output/outputs/out.mp4 ........../flatland-baselines/output/outputs/out_thumb.mp4
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▎| 470/471 [00:17<00:00, 27.18it/s]

N.B. movie generation requires ffmpeg installed - drop the --callbacks-* options to skip.

Further CLI options

See the options for number of agents, grid size etc.:

flatland-trajectory-generate-from-policy --help
flatland-trajectory-generate-from-metadata --help

Releases

Metadata

Release files for flatland-baselines 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-baselines 4.3.0
File Size Uploaded
flatland_baselines-4.3.0.tar.gz 513.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flatland-baselines 4.3.0
File Interpreter ABI Platform
flatland_baselines-4.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.0 MB

Release files / flatland_baselines-4.3.0.tar.gz

Download URL flatland_baselines-4.3.0.tar.gz
Size 513.5 kB
Tags Source
SHA-256 checksum
How to use checksums
71bd576bc099caf7c4e6d61a0b1201e7d385ec2000453e5abafa35f8c22bf96a
BLAKE2b-256 checksum
How to use checksums
e18f0d83ced47cc73493e80f80e24707dceadbe4df9edca88689451521e12edf
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 17, 2026.

Transparency log

Release files / flatland_baselines-4.3.0-py3-none-any.whl

Download URL flatland_baselines-4.3.0-py3-none-any.whl
Size 517.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd3c3cf3d3eab3430723fb8ce8278550e2188dfa4cf2a9046b337c9a3ed0ec9d
BLAKE2b-256 checksum
How to use checksums
75ba582fee2c391b1717a9fd2ca2ec40720c2dc8cf7e875ad7682cb739c64aca
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 17, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

4.3.0 This release

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