Rule:LangtonsAnt-LLRR: Difference between revisions
from https://github.com/gollygang/ruletablerepository |
@COLORS |
||
| Line 113: | Line 113: | ||
2,a,b,19,d,12 # 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 | 3,a,b,19,d,16 # ant to the S facing W on state 3 turns R and advances one square | ||
@COLORS | |||
0 48 48 48 | |||
1 0 255 127 | |||
2 127 0 255 | |||
3 148 148 148 | |||
4 128 255 0 | |||
5 255 0 128 | |||
6 0 128 255 | |||
7 1 159 0 | |||
8 159 0 1 | |||
9 255 254 96 | |||
10 0 1 159 | |||
11 96 255 254 | |||
12 254 96 255 | |||
13 126 125 21 | |||
14 21 126 125 | |||
15 125 21 126 | |||
16 255 116 116 | |||
17 116 255 116 | |||
18 116 116 255 | |||
19 228 227 0 | |||
20 28 255 27 | |||
21 255 27 28 | |||
22 0 228 227 | |||
23 227 0 228 | |||
24 27 28 255 | |||
25 59 59 59 | |||
26 234 195 176 | |||
27 175 196 255 | |||
28 171 194 68 | |||
29 194 68 171 | |||
30 68 171 194 | |||
31 72 184 71 | |||
32 184 71 72 | |||
33 71 72 184 | |||
34 169 255 188 | |||
35 252 179 63 | |||
36 63 252 179 | |||
37 179 63 252 | |||
38 80 9 0 | |||
39 0 80 9 | |||
40 9 0 80 | |||
41 255 175 250 | |||
42 199 134 213 | |||
43 115 100 95 | |||
44 188 163 0 | |||
45 0 188 163 | |||
46 163 0 188 | |||
47 203 73 0 | |||
48 0 203 73 | |||
49 73 0 203 | |||
50 94 189 0 | |||
51 189 0 94 | |||
Latest revision as of 16:07, 20 January 2020
@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
@COLORS
0 48 48 48 1 0 255 127 2 127 0 255 3 148 148 148 4 128 255 0 5 255 0 128 6 0 128 255 7 1 159 0 8 159 0 1 9 255 254 96 10 0 1 159 11 96 255 254 12 254 96 255 13 126 125 21 14 21 126 125 15 125 21 126 16 255 116 116 17 116 255 116 18 116 116 255 19 228 227 0 20 28 255 27 21 255 27 28 22 0 228 227 23 227 0 228 24 27 28 255 25 59 59 59 26 234 195 176 27 175 196 255 28 171 194 68 29 194 68 171 30 68 171 194 31 72 184 71 32 184 71 72 33 71 72 184 34 169 255 188 35 252 179 63 36 63 252 179 37 179 63 252 38 80 9 0 39 0 80 9 40 9 0 80 41 255 175 250 42 199 134 213 43 115 100 95 44 188 163 0 45 0 188 163 46 163 0 188 47 203 73 0 48 0 203 73 49 73 0 203 50 94 189 0 51 189 0 94