Langton's Ant
On your display
Two rules, ten thousand steps of chaos, and then it builds a road and leaves.
- Topic
- Animations
- Includes
- Script
Runs on
- Runs on 32×8 (TC001 & DIY)
- Runs on 52×16 (TC002) 52×16 (TC002) version
- Does not run on 32×8 with AWTRIX 3 (TC001 & DIY) Made for AWTRIX NG.
Choose your display in the next step.
Script description
Langton's Ant
Two rules, ten thousand steps of chaos, and then it suddenly builds a road.
Panels: 52x16 and 32x8
What it is
The whole program is two rules. On a white square, turn right, flip the square,
move forward. On a black square, turn left, flip it, move forward. That is all.
For about ten thousand steps the result is an expanding mess with no structure
anybody has been able to find in it. And then, with no change to the rules and
nothing triggering it, the ant starts building a perfectly straight diagonal
highway — and never stops.
What to watch for
The wait is the feature. If you leave it running and come back, the highway
is the thing you will notice. Getting there takes a few minutes at the default
speed.
Settings
- Steps per frame (40, from 5 to 200) — how fast it works. Lower to watch
the chaos; raise it to get to the highway sooner. - Colour (190, any hue) — the trail colour
Sign in to view and copy the code of this script.
Discussion 0
Ask a question, suggest a change or share how you use it.
No comments yet. Start the conversation.
More scripts in Animations
Something wrong with this script? Report it.
Have an idea?
Sign in to ask questions and join the conversation.