.

Langton's ant


Reading time: less than 1 minute

Langton’s ant is a 2D Cellular Automaton with simple rules.


Notes from 2022-02-03

I wrote a graphical Langton’s ant simulator in C using the SDL library. It is able to run the simulation at configurable speeds and board sizes.

If you read about Langton’s Ant, you might read that after a certain number of steps, it goes into a very short and repetitive cycle. This is because those simulations are on an infinite grid that expands as the ant moves. If you make a rectangular grid and make the edges wrap around (going off the left edge teleports the ant to the right etc.) you will find the behaviour much more chaotic.

While very slow and inefficient, I think it should be possible to make a PRNG algorithm that uses Langton’s Ant as the state and mixer.

The following pages link here

Citation

If you find this work useful, please cite it as:
@article{yaltirakli,
  title   = "Langton's ant",
  author  = "Yaltirakli, Gokberk",
  journal = "gkbrk.com",
  year    = "2025",
  url     = "https://www.gkbrk.com/langtons-ant"
}
Not using BibTeX? Click here for more citation styles.
IEEE Citation
Gokberk Yaltirakli, "Langton's ant", July, 2025. [Online]. Available: https://www.gkbrk.com/langtons-ant. [Accessed Jul. 14, 2025].
APA Style
Yaltirakli, G. (2025, July 14). Langton's ant. https://www.gkbrk.com/langtons-ant
Bluebook Style
Gokberk Yaltirakli, Langton's ant, GKBRK.COM (Jul. 14, 2025), https://www.gkbrk.com/langtons-ant

Comments

© 2025 Gokberk Yaltirakli