Official code for article DataLight: Offline Data-Driven Traffic Signal Control
python=3.6
, tensorflow=2.4
, cityflow
Refer to ./memory/readme.md
to prepare the offline dataset.
random10.pkl
, medium10.pkl
, and expert10.pkl
are the default offline datsets.
Configure the used memory at line 28
and run run_DataLight.py
For online RL baselines, utilize AttentionLight
For offline RL baselines:
- For BC, configure the used memory and run
run_BC.py
- For BCQ, configure the used memory and run
run_BCQ.py
- For CQL, configure the used memory and run
run_CQL.py
- For DTL, configure the used memory and run
run_DT.py
Configure the save directory and run run_test.py
, run_test_BC.py
, and run_test_DT.py
to test the model on other datasets.
- For low data scenario, configure the data percent at
line 41
and runrun_data_perccent.py
- For state study, configure the state representations at
line 60
and runrun_ablation1.py
- For reward study, configure the reward at
line 61
and runrun_DataLight.py
- For network w/o sequential encoding, configure the state
line 60
and runrun_ablation1.py
- For training with cyclical offline dataset, configure the used memory as
cycle20.pkl
and runrun_DataLight.py
This project is licensed under the GNU General Public License version 3 (GPLv3) - see the LICENSE file for details.