An implementation of Langton's Ant in Python for fun.
pip install lant
Requires Python>=3.8
. For faster video writing, consider installing the
conda environment, using environment.yml
from the root of the git repo:
conda env create -f environment.yml
or installing opencv=4.6.0
into your existing virtual environment.
The package shipped with PyPI does not use GPU acceleration.
To get started, you may invoke the program with:
ant-walk 100000 output.mp4
This produces the evolution of the ant on the grid until it walks over the edge, or the maximum number of steps is met, in this case 100k.
For more advanced usage, see the helptext:
ant-walk --help