hp
toc

Langton’s Ant

2015-11-01, post № 78

mathematics, programming, Pygame, Python, #ant, #black, #black and white, #crawling, #highway, #Langton, #white

This program is a simulation of Langton’s Ant. The following image shows the ant on its highway.

Controls

  • ‘F1’ takes a screenshot,
  • ‘Space’ stops and resumes the ant’s movement.
langtons-ant.png
Source code: langtons-ant.py
Jonathan Frech's blog; built 2024/11/02 16:03:59 CET