# 🚂 Flatland Baselines This repository contains reinforcement learning baselines for the [NeurIPS 2020 Flatland Challenge](https://www.aicrowd.com/challenges/neurips-2020-flatland-challenge/). ## Provided baselines >>> **Note:** looking for something simpler to start? We also provide a simpler Dueling Double DQN method implemented using PyTorch without relying on RLlib: **https://gitlab.aicrowd.com/flatland/flatland-examples** >>> Read the [baseline documentation](https://flatland.aicrowd.com/research/baselines.html) to see how the methods work in details. ### RL Methods - Ape-X - PPO - CCPPO - Pure Imitation Learning: MARWIL - Mixed IL/RL: DQfD ### Custom observations - Density observations - Combined observations ### Other approaches - Action skipping - Action masking ## Setup The setup uses conda, [install it](https://www.anaconda.com/products/individual) if necessary. ``` # with GPU support: conda env create -f environment-gpu.yml conda activate flatland-baseline-gpu-env # or, without GPU support: conda env create -f environment-cpu.yml conda activate flatland-baseline-cpu-env ``` ## Usage Training example: `python ./train.py -f experiments/flatland_random_sparse_small/global_obs_conv_net/ppo.yaml` Evaluation example: `python ./rollout.py /tmp/ray/checkpoint_dir/checkpoint-0 --run PPO --no-render --config '{"env_config": {"test": true}}' --episodes 1000 --out rollouts.pkl` Note that `-f` overrides all other trial-specific command-line options. ## Notes - The basic structure of this repository is adapted from [https://github.com/spMohanty/rl-experiments/](https://github.com/spMohanty/rl-experiments/)