This is an implementation in C++ language with several simulation options of Langton's Ant two-dimensional universal Turing machine invented by Chris Langton in 1986. Check more documentation of this work here.
- C++ language.
- olcConsoleGameEngine.
When running the program the user can select in between different simulation options, these include:
-
Console Dimension: This refers to the size in pixels of the console where the simulation will be displayed.
-
How close ants should be: This means how conglomerated the ants will be, the greater the number the closer the range.
-
Number of ants.
-
Queen life steps.
-
Soldier life steps.
-
Worker life steps.
-
Percentage of queens at start.
-
Percentage of soldiers at start.
-
Percentage of workers at start.
By playing around with all these options one can find interesting behaviours in the colony. The program also generates a density histogram of the ants over the space.
In order to run the program you need to:
- Download the code.
- Run in a Linux distribution (Ubuntu recommended).
- Having SDL2 and C++ installed on your computer.
- Compile with:
g++ langton.cpp -DUNICODE -I/usr/include/SDL2 -lSDL2 -lpthread -o langton.out
- Run:
./langton.out