Skip to content
forked from GAIPS/ILU-RL

Traffic Light Control using Reinforcement Learning.

License

Notifications You must be signed in to change notification settings

PPSantos/ILU-RL-1

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ILU - (I)ntegrative (L)earning from (U)rban Data: Reinforcement Learning-based Adaptive Traffic Signal Control

This experimental project researches the development of RL-based adaptive traffic signal controllers.

Installation

This project requires the installation of the computational framework for reinforcement learning (RL) in traffic control FLOW and the RL framework acme.

1) Flow

Locally install the flow package. An installation guide can be found here.

  1. Create a python 3 virtual environment for flow installation (tested with python 3.6.10)

    virtualenv -p python3 env_flow
    source env_flow/bin/activate
  2. Clone the FLOW-Project repository

    git clone https://github.com/flow-project/flow
  3. Install FLOW (checkout to 50be2d074027fb465fc4a9103b3cc09fb1123ede)

    pip install -e flow/

    Depending on the operating system run:

    • For Ubuntu 14.04: flow/scripts/setup_sumo_ubuntu1404.sh
    • For Ubuntu 16.04: flow/scripts/setup_sumo_ubuntu1604.sh
    • For Ubuntu 18.04: flow/scripts/setup_sumo_ubuntu1804.sh
    • For Mac: flow/scripts/setup_sumo_osx.sh
  4. Test installation

    which sumo
    sumo --version
    sumo-gui
    python flow/examples/simulate.py ring

    Note that, if the above commands did not work, you may need to run source ~/.bashrc or open a new terminal to update your $PATH variable.

  5. Exit virtual env

    deactivate

Troubleshooting

2) ILU-RL project

Locally install the ILU-RL package.

  1. Create a python 3 virtual environment for flow installation (tested with python 3.6.10)
    virtualenv -p python3 env_ILU-RL
    source env_ILU-RL/bin/activate
  2. Clone the ILU-RL repository
    git clone https://github.com/GAIPS/ILU-RL
  3. Install packages
    pip install -r ILU-RL/requirements.txt
    pip install -e flow/
    pip install -e ILU-RL/
  4. Install acme framework (checkout to b7340da4fbd1bde7d39a99e7379d1f2ce5e70965)
    git clone https://github.com/deepmind/acme.git
    pip install -e acme/
    pip install dm-acme[reverb]
    pip install dm-acme[tf]
    pip install dm-acme[jax]
  5. Export root ILU-RL directory enviroment variable (configure .bashrc file)
    export ILURL_HOME=path/to/ILU-RL/root/dir
  6. Test installation
    python ILU-RL/models/train.py 

About

Traffic Light Control using Reinforcement Learning.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.4%
  • Shell 0.6%