Implementation of Langton's Ant cellular automata in Python.
The software is based on some configuration parameters to be set as environmental variables (or directly in the code):
WIDTH
: the width of the grid - default is 1280HEIGHT
: the height of the grid - default is 720RESOLUTION
: the resolution of the grid cells - default is 5RULE
: the rule to be applied to the ant - default is RL
The RULE parameter is a string of N parameters describing the behaviour of the ant. The first two colors are black and white respectively, and the following N-2 colors are randomly generated.
Install the dependencies:
pip install -r requirements.txt
run the script:
python ant.py