Giter Site home page Giter Site logo

yossidoctor / ai-traffic-lights-controller Goto Github PK

View Code? Open in Web Editor NEW
8.0 3.0 5.0 19.8 MB

Using reinforcement learning and genetic algorithms to improve traffic flow and reduce vehicle waiting times in a single-lane two-way junction simulator by coordinating traffic signal schedules.

Python 100.00%
ai genetic-algorithm mdp-framework q-learning traffic-control traffic-flow genetic-algorithms mdp traffic-light-system artificial-intelligence

ai-traffic-lights-controller's Introduction

AI-Traffic-Lights-Controller

The project uses reinforcement learning and genetic algorithms to improve traffic flow and reduce vehicle waiting times in a single-lane two-way junction simulator by coordinating traffic signal schedules.

A complete 7-page project report is available here.

Installation

git clone https://github.com/yossidoctor/AI-Traffic-Lights-Controller.git
cd AI-Traffic-Lights-Controller
pip install -r requirements.txt

Usage

python main.py -m [method] -e [number of episodes] -r
  • -m or --method: specifies which method to use for the traffic light controller. The available methods are 'fc', 'lqf', 'qlearning', and 'search'.
  • -e or --episodes: specifies the number of evaluation episodes to run.
  • -r or --render: optional flag - displays the simulation window if included.

For example, this will run the default cycle method for 10 episodes and display the simulation window:

python main.py -m fc -e 10 -r

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.