Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

🚥 An Artificial Neural Network based Traffic Light Controller for intersections. Computational Intelligence class final project.

License

NotificationsYou must be signed in to change notification settings

raymelon/TrafficLightNeuralNetwork

Repository files navigation

An Artificial Neural Network based Traffic Light Transition Controller for intersections.

See TensorFlow implementationhere.

AppVeyorBuild status
LicenseLicense: MIT
For the Badgeforthebadge

ANN Architecture

Overviewforthebadgeforthebadge

Given the previous and current light pair, the controller must predict the next light pair.

The controller must receive two inputs,

  • Previous light pair att - 1

  • Current light pair att.

                   +-----------+ TL(t - 1) -------->|           |                   |    ANN    |-------> TL(t + 1)TL(t)     -------->|           |                   +-----------+

And outputs the next pair att + 1.

Transitions will be implemented for a pair of traffic lights with the following sequence of pairs:

Light Sequence Pair
Traffic Light 1Traffic Light 2Time
REDGREENt1
REDAMBERt2
REDREDt3
GREENREDt4
AMBERREDt5
REDREDt6

Neural Network

Design

Having two inputs and one output, the Neural Network architecture will be based on the typical logic gate Neural Network architecture:

  • Two input neuronsI1,I2
  • Two hidden layer neuronsH1,H2
  • One output neuronO1

ANN Architecture

The neural network will be a Feedforward neural network, havingthe Logistic Sigmoid equation as its activation function.

             1S(t) =  __________               -t          1 + e

Training will be done using Gradient Descent Backpropagation.

Training

In order to simplify training, numerical values are mapped with each pair, just like how an index is associated for each row in an array.We made sure that these numerical values assigned are in the Logistic Sigmoid's curve ranges (0 to1).

Light Sequence Pair
Traffic Light 1Traffic Light 2Numerical Value
REDGREEN0.1
REDAMBER0.2
REDRED0.3
GREENRED0.4
AMBERRED0.5
REDRED0.6

The training data are as follows:

Inputs atinput.csvOutputs attarget.csv
t - 1tt + 1
0.10.20.3
0.20.30.4
0.30.40.5
0.40.50.6
0.50.60.1
0.60.10.2

Using 50 training sets (or repetitions of these in a file) in 1000 epochs is enough for the network to learn.

Miscforthebadge

Usage

  • To re-train, runNeuralNetwork.exe.

    • parameters are optional, in case nothing is provided, the defaults aredata/input.csv,data/target.csv,1000
> .\TrafficLightNeuralNetwork\bin> NeuralNetwork.exe <string:input_path> <string:target_path> <int:max_epochs>
  • weights.csv has its weights updated after re-train, with the following format:
I1 to H1I2 to H1Bias to H1I1 to H2I2 to H2Bias to H2
H1 to O1H2 to O2Bias to O2nonenonenone

Timeline

  • March 19-22, 2017 (Initial Development)
  • March 23, 2017 onwards (Maintenance)
  • March 26, 2017 (GitHub debut)

Authorsforthebadge

Developers
Raymel Francisco
Emilson Olaño
Contributors
John Paul Magturo
Denzel Rañada
Kaiser Sternberg
Christian Bisnar

License

This project is licensed underMIT License.

MIT License

Copyright (c) 2017 Raymel Francisco, Emilson Olaño, John Paul Magturo, Denzel Rañada, Kaiser Sternberg, and Christian Bisnar

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Releases

No releases published

Sponsor this project

    Packages

    No packages published

    [8]ページ先頭

    ©2009-2025 Movatter.jp