Skip to content

This repo provides baselines for the Flatland Benchmarks hosted at benchmarks.flatland.cloud and the scenarios in the Flatland scenario repository flatland-scenarios.

License

Notifications You must be signed in to change notification settings

flatland-association/flatland-baselines

Repository files navigation

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

About

This repo provides baselines for the Flatland Benchmarks hosted at benchmarks.flatland.cloud and the scenarios in the Flatland scenario repository flatland-scenarios.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 3

  •  
  •  
  •