# 🚂 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 ### RL Methods - Double Dueling DQN - Ape-X - PPO - CCPPO - Pure Imitation Learning: MARWIL - Mixed IL/RL: DQfD ### Custom observations - Density observations - Local conflict observations ### Tricks - Action skipping - Action masking ## Organisation Experiments consist of one or many RLlib YAML config files alongside a MARKDOWN file containing results, plots and a detailed description of the methodology. All files are stored in a experiment folder under `experiments//`. - [Tree observations w/ fully connected network](experiments/flatland_random_sparse_small/tree_obs_fc_net) - [Global observations w/ convnet](experiments/flatland_random_sparse_small/global_obs_conv_net) ## 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/)