Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tariqksoliman/bml-traffic-model

A Biham–Middleton–Levine Traffic Model
https://github.com/tariqksoliman/bml-traffic-model

biham-middleton-levine cellular-automata javascript js model online traffic

Last synced: about 1 month ago
JSON representation

A Biham–Middleton–Levine Traffic Model

Awesome Lists containing this project

README

        

# BML-Traffic-Model

The [Biham–Middleton–Levine traffic model](https://en.wikipedia.org/wiki/Biham%E2%80%93Middleton%E2%80%93Levine_traffic_model) is a cellular automaton that represents a flow of traffic.

## [Live Demo!](http://tariqksoliman.github.io/BML-Traffic-Model)

The concept is simple:
   Pixels represent cars
   They are two types of cars:
      Cars that move downward
      Cars that move rightward
   Car types take turns:
      All downward cars move
      Then all rightward cars move
      Then all downwards cars move again
      And so on...
   Cars only move if their future spot is vacant
   Cars of their type only move all at once