Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/corentinth/langtonsant
A very simple cellular automaton and Turing machine.
https://github.com/corentinth/langtonsant
ant langton-ant turing-machine
Last synced: 3 days ago
JSON representation
A very simple cellular automaton and Turing machine.
- Host: GitHub
- URL: https://github.com/corentinth/langtonsant
- Owner: CorentinTh
- License: mit
- Created: 2017-08-15T08:57:06.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-04T08:39:20.000Z (about 7 years ago)
- Last Synced: 2024-11-02T13:42:17.374Z (about 2 months ago)
- Topics: ant, langton-ant, turing-machine
- Language: JavaScript
- Homepage: http://divers.corentin-thomasset.fr/langton-ant/index.html
- Size: 4.88 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Langton's ant
Try it: [Live demo](http://divers.corentin-thomasset.fr/langton-ant/index.html).
## What is it ?
### Desciption
Langton's ant is a two-dimensional universal Turing machine with a very simple set of rules but complex emergent behavior. It was invented by Chris Langton in 1986 and runs on a square lattice of black and white cells.### Set of rules
Squares on a plane are colored variously either black or white. We arbitrarily identify one square as the "ant". The ant can travel in any of the four cardinal directions at each step it takes. The "ant" moves according to the rules below:* At a white square, turn 90° right, flip the color of the square, move forward one unit
* At a black square, turn 90° left, flip the color of the square, move forward one unitLangton's ant can also be described as s cellular automaton, where the grid is colored black or white and the “ant” square has one of eight different colors assigned to encode the combination of black/white state and the current direction of motion of the ant. and change the state of a case just by clicking on it.
## How it works ?
### Set up
To set up my "Langton's ant" just download my repository and launch ```index.html``` in your default web browser (Chrome is recommanded).### Interaction
You can zoom in and out using the scroll wheel and change the state of a case just by clicking on it.