Rule:LangtonsAnt-LLRR
@RULE LangtonsAnt-LLRR
@TABLE
- Rule table written automatically by Langtons-Ant-gen.py
- for the move-sequence: LLRR
- A generalisation of Langton's Ant to n-colors. For each state i that the
- ant finds itself on:
- 1. turn 90 degrees R or L (depending on the i'th letter of the move sequence)
- 2. increment the state of the cell (modulo n)
- 3. move forward one square
- -----------------------------empty squares---------------------
- states 0-3
- ----------------------------------------------ant is here------
- states 4-7 : ant on a square in state 0 facing N,E,S,W
- states 8-11 : ant on a square in state 1 facing N,E,S,W
- states 12-15 : ant on a square in state 2 facing N,E,S,W
- states 16-19 : ant on a square in state 3 facing N,E,S,W
- ---------------------------------------------------------------
n_states:20 neighborhood:vonNeumann symmetries:none
- ----------- variables: -----------
- any empty square:
var a={0,1,2,3} var b={0,1,2,3} var c={0,1,2,3} var d={0,1,2,3}
- a square in state 0 with an ant on it:
var ant0={4,5,6,7}
- a square in state 1 with an ant on it:
var ant1={8,9,10,11}
- a square in state 2 with an ant on it:
var ant2={12,13,14,15}
- a square in state 3 with an ant on it:
var ant3={16,17,18,19}
- ----------- transitions: -----------
- an ant is leaving this square: increment it modulo 4
ant0,a,b,c,d,1 ant1,a,b,c,d,2 ant2,a,b,c,d,3 ant3,a,b,c,d,0
- an ant is entering this square:
0,a,4,c,d,7 # ant to the E facing N on state 0 turns L and advances one square 1,a,4,c,d,11 # ant to the E facing N on state 0 turns L and advances one square 2,a,4,c,d,15 # ant to the E facing N on state 0 turns L and advances one square 3,a,4,c,d,19 # ant to the E facing N on state 0 turns L and advances one square 0,a,b,5,d,4 # ant to the S facing E on state 0 turns L and advances one square 1,a,b,5,d,8 # ant to the S facing E on state 0 turns L and advances one square 2,a,b,5,d,12 # ant to the S facing E on state 0 turns L and advances one square 3,a,b,5,d,16 # ant to the S facing E on state 0 turns L and advances one square 0,a,b,c,6,5 # ant to the W facing S on state 0 turns L and advances one square 1,a,b,c,6,9 # ant to the W facing S on state 0 turns L and advances one square 2,a,b,c,6,13 # ant to the W facing S on state 0 turns L and advances one square 3,a,b,c,6,17 # ant to the W facing S on state 0 turns L and advances one square 0,7,b,c,d,6 # ant to the N facing W on state 0 turns L and advances one square 1,7,b,c,d,10 # ant to the N facing W on state 0 turns L and advances one square 2,7,b,c,d,14 # ant to the N facing W on state 0 turns L and advances one square 3,7,b,c,d,18 # ant to the N facing W on state 0 turns L and advances one square 0,a,8,c,d,7 # ant to the E facing N on state 1 turns L and advances one square 1,a,8,c,d,11 # ant to the E facing N on state 1 turns L and advances one square 2,a,8,c,d,15 # ant to the E facing N on state 1 turns L and advances one square 3,a,8,c,d,19 # ant to the E facing N on state 1 turns L and advances one square 0,a,b,9,d,4 # ant to the S facing E on state 1 turns L and advances one square 1,a,b,9,d,8 # ant to the S facing E on state 1 turns L and advances one square 2,a,b,9,d,12 # ant to the S facing E on state 1 turns L and advances one square 3,a,b,9,d,16 # ant to the S facing E on state 1 turns L and advances one square 0,a,b,c,10,5 # ant to the W facing S on state 1 turns L and advances one square 1,a,b,c,10,9 # ant to the W facing S on state 1 turns L and advances one square 2,a,b,c,10,13 # ant to the W facing S on state 1 turns L and advances one square 3,a,b,c,10,17 # ant to the W facing S on state 1 turns L and advances one square 0,11,b,c,d,6 # ant to the N facing W on state 1 turns L and advances one square 1,11,b,c,d,10 # ant to the N facing W on state 1 turns L and advances one square 2,11,b,c,d,14 # ant to the N facing W on state 1 turns L and advances one square 3,11,b,c,d,18 # ant to the N facing W on state 1 turns L and advances one square 0,a,b,c,12,5 # ant to the W facing N on state 2 turns R and advances one square 1,a,b,c,12,9 # ant to the W facing N on state 2 turns R and advances one square 2,a,b,c,12,13 # ant to the W facing N on state 2 turns R and advances one square 3,a,b,c,12,17 # ant to the W facing N on state 2 turns R and advances one square 0,13,b,c,d,6 # ant to the N facing E on state 2 turns R and advances one square 1,13,b,c,d,10 # ant to the N facing E on state 2 turns R and advances one square 2,13,b,c,d,14 # ant to the N facing E on state 2 turns R and advances one square 3,13,b,c,d,18 # ant to the N facing E on state 2 turns R and advances one square 0,a,14,c,d,7 # ant to the E facing S on state 2 turns R and advances one square 1,a,14,c,d,11 # ant to the E facing S on state 2 turns R and advances one square 2,a,14,c,d,15 # ant to the E facing S on state 2 turns R and advances one square 3,a,14,c,d,19 # ant to the E facing S on state 2 turns R and advances one square 0,a,b,15,d,4 # ant to the S facing W on state 2 turns R and advances one square 1,a,b,15,d,8 # ant to the S facing W on state 2 turns R and advances one square 2,a,b,15,d,12 # ant to the S facing W on state 2 turns R and advances one square 3,a,b,15,d,16 # ant to the S facing W on state 2 turns R and advances one square 0,a,b,c,16,5 # ant to the W facing N on state 3 turns R and advances one square 1,a,b,c,16,9 # ant to the W facing N on state 3 turns R and advances one square 2,a,b,c,16,13 # ant to the W facing N on state 3 turns R and advances one square 3,a,b,c,16,17 # ant to the W facing N on state 3 turns R and advances one square 0,17,b,c,d,6 # ant to the N facing E on state 3 turns R and advances one square 1,17,b,c,d,10 # ant to the N facing E on state 3 turns R and advances one square 2,17,b,c,d,14 # ant to the N facing E on state 3 turns R and advances one square 3,17,b,c,d,18 # ant to the N facing E on state 3 turns R and advances one square 0,a,18,c,d,7 # ant to the E facing S on state 3 turns R and advances one square 1,a,18,c,d,11 # ant to the E facing S on state 3 turns R and advances one square 2,a,18,c,d,15 # ant to the E facing S on state 3 turns R and advances one square 3,a,18,c,d,19 # ant to the E facing S on state 3 turns R and advances one square 0,a,b,19,d,4 # ant to the S facing W on state 3 turns R and advances one square 1,a,b,19,d,8 # ant to the S facing W on state 3 turns R and advances one square 2,a,b,19,d,12 # ant to the S facing W on state 3 turns R and advances one square 3,a,b,19,d,16 # ant to the S facing W on state 3 turns R and advances one square