Cross-platform simulator for a 14-color Langton's ant 2D Turing machine (or, more precisely, a turmite).
The simulator supports dynamically changing the ant's ruleset (colors and turn directions) in real time, which often results in interesting patterns and emergent behavior.
Written in C. Uses ncurses on Linux/macOS and PDCurses on Windows for character graphics.
Initially written as an assignment for the Numerical Analysis and Discreet Mathematics (SI2NAD) course at the University of Belgrade, School of Electrical Engineering (ETF). Partly inspired by this classic video.
This software was exhibited as part of the Pomeraj u kôdu: A Sandbox for Ants art project in SULUV, Novi Sad, Serbia (2024).
From the source directory LangtonsAnt, run the following commands in a shell:
# Build the project (outputs to ./LangtonsAnt by default)
scripts/build.sh
# Alternatively, output to specified path with optional feature flags
scripts/build.sh /usr/bin/lant SAVE_ENABLE=1 GALLERY_MODE=0 SERIAL_COLORS=1
# Run the project (optional: path)
# Works best with lxterminal, but any curses-capable POSIX terminal will work
scripts/run.sh #/usr/bin/lantOpen langtons-ant.sln in Visual Studio, build the solution for the desired platform (Win32, x64) and run it.
Binary distributions are output to the default VS build folders. Feature flags can be set in Project Properties ⟩ C/C++ ⟩ Preprocessor Definitions, or by editing the LangtonsAnt.vcxproj file.
In the Teensy directory, there's optional support for an external, Arduino-controlled array of TFT screens that display the ant's color rules in real time.
(Requires building the main project with SERIAL_COLORS=1.)
See Docs/README.md.
Clicking on the logo inside the program will display a controls cheat sheet.
