All Projects → SmartTrafficIntersection → SmartTrafficIntersection

SmartTrafficIntersection / SmartTrafficIntersection

Licence: MIT License
Another AI toy project, of a traffic intersection controlled by a Reinforcement Learning AI agent to optimize traffic flow in an intersection of vehicles or pedestrians

Programming Languages

Dockerfile
14818 projects
CSS
56736 projects

Projects that are alternatives of or similar to SmartTrafficIntersection

intersection-wasm
Mesh-Mesh and Triangle-Triangle Intersection tests based on the algorithm by Tomas Akenine-Möller
Stars: ✭ 17 (-43.33%)
Mutual labels:  collision, collision-detection, intersection
Reactphysics3d
Open source C++ physics engine library in 3D
Stars: ✭ 730 (+2333.33%)
Mutual labels:  simulation, collision, collision-detection
trafficator
Traffic generator for local analytics testing
Stars: ✭ 27 (-10%)
Mutual labels:  traffic, traffic-simulation
DTA
This repository documents MATLAB implementation of a dynamic user equilibrium solver, including a dynamic network loading sub-routine
Stars: ✭ 55 (+83.33%)
Mutual labels:  traffic, traffic-simulation
evoplex
Evoplex is a fast, robust and extensible platform for developing agent-based models and multi-agent systems on networks. It's available for Windows, Linux and macOS.
Stars: ✭ 98 (+226.67%)
Mutual labels:  agent, agent-based-simulation
computational-economy
An agent-based computational economy with macroeconomic equilibria from microeconomic behaviors
Stars: ✭ 67 (+123.33%)
Mutual labels:  agent, simulation
DAABBCC
Dynamic AABB Tree native extension with Branch and Bound Algorithm for Defold Engine
Stars: ✭ 42 (+40%)
Mutual labels:  collision, collision-detection
MCM2017
MCM 2017
Stars: ✭ 17 (-43.33%)
Mutual labels:  lanes, traffic-flow
Abstreet
Transportation planning and traffic simulation software for creating cities friendlier to walking, biking, and public transit
Stars: ✭ 6,355 (+21083.33%)
Mutual labels:  simulation, traffic-simulation
mosaic
Eclipse MOSAIC is a Multi-Domain and Multi-Scale Simulation Framework for Automated and Connected Mobility Scenarios.
Stars: ✭ 51 (+70%)
Mutual labels:  simulation, traffic
GYM XPLANE ML
GYM Environment for XPlane. Reinforcement Learning and Autonomous Piloting.
Stars: ✭ 45 (+50%)
Mutual labels:  agent, simulation
reina-model
Agent-based simulation model for COVID-19 spread in society and patient outcomes
Stars: ✭ 30 (+0%)
Mutual labels:  simulation, agent-based-simulation
Bluesky
The open source air traffic simulator
Stars: ✭ 146 (+386.67%)
Mutual labels:  simulation, traffic
Sumo
Eclipse SUMO is an open source, highly portable, microscopic and continuous traffic simulation package designed to handle large networks. It allows for intermodal simulation including pedestrians and comes with a large set of tools for scenario creation.
Stars: ✭ 992 (+3206.67%)
Mutual labels:  simulation, traffic
exengine
A C99 3D game engine
Stars: ✭ 487 (+1523.33%)
Mutual labels:  collision, collision-detection
LockstepCollision
A deterministic collision lib for lockstep
Stars: ✭ 51 (+70%)
Mutual labels:  collision, collision-detection
Spatial Collision Datastructures
Benchmark of various spatial data structures for collision detection.
Stars: ✭ 96 (+220%)
Mutual labels:  collision, collision-detection
Dyn4j
Java Collision Detection and Physics Engine
Stars: ✭ 317 (+956.67%)
Mutual labels:  simulation, collision-detection
js-simulator
General-purpose discrete-event multiagent simulation library for agent-based modelling and simulation
Stars: ✭ 52 (+73.33%)
Mutual labels:  simulation, agent-based-simulation
FLAMEGPU2
FLAME GPU 2 is a GPU accelerated agent based modelling framework for C++ and Python
Stars: ✭ 25 (-16.67%)
Mutual labels:  simulation, agent-based-simulation

I am currently porting the original C# Code to Node.js 12. I would LOVE to have your contributions and proposed ideas

SmartTrafficIntersection

Travis Badge Codacy Badge BCH compliance CodeFactor

Open Issues

Another AI toy project; Of a traffic intersection controlled by an AI agent to optimize traffic flow and avoid collission.

Sample 8 lanes intersection

I would love to hear your feedback, especially bugs found in the code and suggested features.

Alpha release is scheduled at the end of September 2017, while the Beta is scheduled at End of October. I would love to stuff in as much as possible before moving on to the next project.

Also, if someone can help me out in the visualization part, that would be awsome!

Thanks

How to use it

on Linux

upcoming, I will port this code from mono to .NET Core 2.1

Install .NET Core 2.1 on your machine

Download/Clone the project at your Machine

Create a directory where you want to have your code

mkdir Traffic

go to that location

cd Traffic

Clone repo onyour machine

git clone https://github.com/aawadall/SmartTrafficIntersection.git

Compile and Run

Go to Code Location

cd SmartTrafficIntersection

Restore

dotnet restore

Build

dotnet build

Run

dotnet run

Theoritical Model

Current Model is designed that a single agent controls an Intersection

made of one or more directoins

Lanes

and Traffic Controllers

Directions

The direction is a conceptual entity used to identify where the traffic flows. It can be considered a vector in the traffic space listing all possible traffic flows.

It is used to:

  • link lanes to traffic controllers
  • detect potential collision

Lanes

A lane is the physical lane, where traffic lines up. It contains a queue simulator with two parameters

In addition, each lane has a direction as a property.

When traffic is allowed,

i.e. Traffic Controller associated with this lane allows traffic flowing out, it will dequeue using the rate parameter, and in both cases it will enqueue using the rate parameter.

And in all situations, the lane is capable of measuring total wait time for all clients queued in the lane

where v are all vehicles or a pedistrians, currently linedup in this lane.

Such wait time is used as a cost function used by the agent to minimize.

Traffic Controllers

Traffic Controllers are general case of a traffic light in an intersection. A traffic controller can be thought of as a pair boolean vectors; each vector has an element for direction, such that

First vector , is the set of directions allowed to have non risky traffic flowwing, e.g. northbound and southbound traffic are allowed to flow freely. While the second vector is the secondary traffic allowed as per this controller. It means that the traffic of this direction can flow after yielding for incoming traffic from other primary directions, if collision is detected. e.g. left turn wen no dedicated controller for left is green, or right turn, when pedistrians are allowed to cross.

Current model is considering a simple binary traffic light only, with two states; true for green and false for red;

Components

This project is planned to have the following components:

Simulation Component

Lanes, Traffic Controllers, and Intersections, This should simulate traffic in a given intersection configuration, with the optoin to manually control the controller behaviour if dynamic (i.e. not a stop sign or a roundabout)

AI Component

This is a Reinforcement Learning AI agent controlling traffic controller to optimize metrics

Visualiztion Component

Visualize intersection in terms of lanes, controller status and traffic accumilation

Future Work

Collision detection

for a direction to detect if incoming traffic is floowing, and hence detect potential collision and simulate a collision in the future for an unconstrained ystem

Bad driver simulator

Simulate a driver driving slowly, too fast, or running a red light

Include Pedestrians to the simulated model

an extra lane, with a dedicated direction

Unconstrained State/Action Space

Alow the controller to pick wahtever actions, even if the result might end up in a simulated collision. this will allow the system to come up with creative solutions

TD(lambda)

TD(λ) policy

Web Application

port the solution to a web application and allow users to play with it

Message to Students

I appreciate your visit to this repo, and I feel proud that you landed here. I have a request.. PLEASE do NOT copy code from this repo and paste it into your coursework assignment.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].