README.md 1.56 KB
Newer Older
metataro's avatar
metataro committed
1 2
# NeurIPS 2020 Flatland Challenge baselines

MasterScrat's avatar
MasterScrat committed
3
📈 [**Results**](https://app.wandb.ai/masterscrat/flatland/reports/Flatland-Baselines--Vmlldzo4OTc5NA) 
metataro's avatar
metataro committed
4

MasterScrat's avatar
Typo  
MasterScrat committed
5 6 7 8 9 10 11 12 13 14
Experiments
---

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/<env-name>/<experiment-name>`.

- [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)

MasterScrat's avatar
MasterScrat committed
15 16
Setup
---
MasterScrat's avatar
MasterScrat committed
17

18
Using conda (recommended):
MasterScrat's avatar
MasterScrat committed
19 20

```
21 22 23 24 25 26 27 28
# with GPU support:
conda env create -f environment-gpu.yml

# or, without GPU support:
#conda env create -f environment-cpu.yml

conda activate flatland-env
pip install -r requirements.txt
MasterScrat's avatar
MasterScrat committed
29 30
```

31
Using pip:
MasterScrat's avatar
MasterScrat committed
32

metataro's avatar
metataro committed
33
```
34
# no GPU support:
metataro's avatar
metataro committed
35 36 37
pip install -r requirements.txt
```

38 39
You may need to install/update bazel: [Ubuntu guide](https://docs.bazel.build/versions/master/install-ubuntu.html)

metataro's avatar
metataro committed
40
## Usage
41

metataro's avatar
metataro committed
42
Training example:
MasterScrat's avatar
MasterScrat committed
43 44

`python ./train.py -f experiments/flatland_random_sparse_small/global_obs_conv_net/ppo.yaml`
metataro's avatar
metataro committed
45

46
Evaluation example:
MasterScrat's avatar
MasterScrat committed
47 48 49

`python ./rollout.py /tmp/ray/checkpoint_dir/checkpoint-0 --run PPO --no-render
        --config '{"env_config": {"test": true}}' --episodes 1000 --out rollouts.pkl`
metataro's avatar
metataro committed
50 51 52

Note that -f overrides all other trial-specific command-line options.

MasterScrat's avatar
MasterScrat committed
53 54
Notes
---
metataro's avatar
metataro committed
55

MasterScrat's avatar
MasterScrat committed
56
- The basic structure of this repository is adopted from [https://github.com/spMohanty/rl-experiments/](https://github.com/spMohanty/rl-experiments/)