Simulates turmites on a torus. See https://en.wikipedia.org/wiki/Turmite.
Uses the SFML library.
-
executable accepts command-line parameters:
- turmite ruleset or name (currently supporting relative and listed below turmites)
- number of turmites to run simultaneously
- steps between renders, small numbers = slow
Example:
$ ./turmites Turmite_Pulsing 100 1000
will simulate 100 turmites of the typeTurmite_Pulsing
and update the window every 1000 steps. -
color table automatically switches from black/white to multi-color
Turmite_Biotope
: simulating competing species (default turmite)Turmite_Pulsing
: alternating between creating and destroying every 10k stepsTurmite_Fibonacci
: building a fibonacci spiralTurmite_Qrcode
: buiding a distinctive growing square patternTurmite_Foo
: buiding a chaotic distinctive patternAnt_RL
: Langton's ant, building a highway after ~10000 stepsAnt_RRLL
: building a growing symmetrical patternAnt_RRLRR
: building a growing square
From TwoDimensionalTuringMachines
Run the executable with the first parameter set to the movement specification string, e.g.: $ ./turmites {{{1,2,0},{0,8,0}}}
Each machine is specified as a table of n_states
rows by n_colors
columns, written in (Western) reading order: the first row first, then then other rows.
Each triple is {A,B,C}
where A
is the new color to write: [0,1,2,...,(n_colors-1)]
, B
is the direction to turn/move (see below) or 0
to halt, C
is the new state to adopt: [0,1,2,...,(n_states-1)]
.
The direction is specified like this:
1
= forward2
= right4
= u-turn (180 degrees)8
= left0
= halt
This notation will allow turmites to split, e.g. 2+8
= 10
= turn left and right. This is not implemented yet, but will be included in a later version.
For example, the triple {1,2,3}
means: change cell to '1'
, turn right (and move forward), and adopt state 3
.