wingsweihua / colight

CoLight: Learning Network-level Cooperation for Traffic Signal Control
http://personal.psu.edu/hzw77/publications.html
159 stars 58 forks source link

CoLight

This repository is provided as-is, further updates are included in LibSignal, which supports flexible and cross-platform (CityFlow and SUMO) training and testing in PyTorch. We also actively looking for contributions for LibSignal, feel free to reach out if you would love to contribute to the project!

CoLight is a reinforcement learning agent for network-level traffic signal control.

@inproceedings{colight,
 author = {Wei, Hua and Xu, Nan and Zhang, Huichu and Zheng, Guanjie and Zang, Xinshi and Chen, Chacha and Zhang, Weinan and Zhu, Yamin and Xu, Kai and Li, Zhenhui},
 title = {CoLight: Learning Network-level Cooperation for Traffic Signal Control},
 booktitle = {Proceedings of the 28th ACM International Conference on Information and Knowledge Management},
 series = {CIKM '19},
 year = {2019},
 location = {Beijing, China}
} 

It shares the similar code structure with PressLight (PressLight: Learning Max Pressure Control to Coordinate Traffic Signals in Arterial Network) from KDD 2019.

Usage and more information can be found below.

Usage

How to run the code:

We recommend to run the code through docker. Some brief documentation can be found at https://docs.docker.com/.

  1. Please build a docker image using the dockerfile provided.

sudo docker pull hzw77/colight:v0.1

  1. Pull the codes for CoLight. git clone https://github.com/wingsweihua/colight.git

  2. Please run the built docker image to initiate a docker container. Please remember to mount the code directory.

sudo docker run -it -v /path/to/your/workspace/colight/:/colight/ --shm-size=8gb --name hua_colight hzw77/colight:v0.1 /bin/bash

cd colight

(Alternatively, you can install the packages (included in the dockerfile) on your linux system)

Start an experiment by:

python -O runexp.py

Here, -O option cannot be omitted unless debug is necessary. In the file runexp.py, the args can be changed.

For most cases, you might only modify traffic files and config parameters in runexp.py.

Dataset

Agent

Others

More details about this project are demonstrated in this part.