Several self-organizing cellular automatons inspired by the Biham-Middleton-Levin Traffic Model
I wrote an implementation of the Biham-Middleton-Levine traffic model cellular automaton in Processing, and then made several modifications to make it different:
biham_middleton_levine
- original implementationbiham_fail
- early version that would always jam up for some reasonbiham_diagonal
- experiment to make the cells move diagonallybiham_4direction
- 4 different colors that move in all 4 directions... not super interesting
Then I wondered if a similar rule could be applied to two colors going in opposite directions. If they hit eachother, one cell moves off to the side. I decided to call this rule the "Hallway traffic model", and it is self-organizing because the cells naturally migrate to their respective sides of the hallway. The left and right sides are connected in a loop, but the top and bottom are not.
hallway_traffic_CA
- original, not very interestinghallway_traffic_CA_2
- slightly better, still not very interestinghallway_traffic_CA_3
- the best, creates interesting jams and organizes the fastesthallway_4direction
- yet again, 4 directional movement. not very interestinghallway_4direction_2
- cells can move to both sides and creates very interesting jams
The controls for all programs are the same:
- space - random fill with the current precentage
- - - slows down the simulation
- = - speeds up the simulation
- [ - increases fill precentage
- ] - decreases fill precentage
All programs lisences under GNU GPL v2