Portfolio website of Zachary Bell.
(WIP More content coming soon)



Categories
Games, Web
Date Posted
Apr 13th, 2016



I created this Langton's Ant simulation in JavaScript using the Pixi.js framework which uses WebGL. You can see the simulation by clicking the Play button above.

About Langton's Ant

Langton's Ant is an example of a cellular automaton, similar to that of Conway's Game of Life. The key difference is that in the Game of Life, the entire space is controlled by a ruleset, whereas in Langton's Ant, there is a single ant on the grid moving around, and where it moves is defined by the ruleset. Although the ruleset is very simple, the outcome is actually and incredibly complex.

The ant starts on a grid, where all of the "squares" are light brown. As the ant moves from square to square, the color of the square changes to dark brown, or vice versa.

After that, the simulation follows two simple rules:

1) If the square is light brown, the ant will turn 90 degrees to it's right and step forward.
2) If the square is dark brown, the ant will turn 90 degrees to it's left and step forward.

The simulation at first makes it seem as though the ant were following some specific pattern, but after a while it's movements become completely chaotic. However, after roughly 10000 steps, the ant enters into a simple and repeating pattern for eternity.