-
Notifications
You must be signed in to change notification settings - Fork 1
/
Colorized.rule
367 lines (359 loc) · 13.1 KB
/
Colorized.rule
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
@RULE Colorized
********************************
**** COMPILED FROM NUTSHELL ****
**** v0.6.3 ****
********************************
by HactarCE
0: blank
1: blue
2: green
3: cyan
4: red
5: magenta
6: yellow
7: white
8: tail
9: head
10: construction head
11: pusher head
12: puller head
13: construction marker
14: temporary
@COLORS
0 0 0 0
1 0 0 255
2 0 255 0
3 0 255 255
4 255 0 0
5 255 0 255
6 255 255 0
7 255 255 255
9 255 153 0
8 102 102 102
11 0 153 153
12 153 0 153
10 102 153 0
13 255 153 153
14 51 51 51
@TABLE
neighborhood: Moore
symmetries: rotate4reflect
n_states: 15
var any.0 = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14}
var any.1 = any.0
var any.2 = any.0
var any.3 = any.0
var any.4 = any.0
var any.5 = any.0
var any.6 = any.0
var any.7 = any.0
var rgb.0 = {1,2,3,4,5,6,7}
var rgb.1 = rgb.0
var rgb0.0 = {0,1,2,3,4,5,6,7}
var rgb0.1 = rgb0.0
var rgb0.2 = rgb0.0
var rgb0.3 = rgb0.0
var hchead.0 = {9,10}
var anyhead.0 = {9,10,11,12}
var anyhead.1 = anyhead.0
var _a0.0 = {2,4}
var _b0.0 = {0,1,2,3,4,5,6,7,8,13,14}
var _b0.1 = _b0.0
var _b0.2 = _b0.0
var _b0.3 = _b0.0
var _b0.4 = _b0.0
var _c0.0 = {9,1}
var _d0.0 = {9,3,5}
var _e0.0 = {10,3}
var _f0.0 = {1,10}
var _g0.0 = {4,5,6,7}
var _h0.0 = {2,3,6,7}
var _i0.0 = {1,3,5,7}
var _j0.0 = {1,2,4}
var _k0.0 = {0,1,2,3,4,5,6,7,9,10,11,12,13,14}
var _k0.1 = _k0.0
var _l0.0 = {11,12}
var _m0.0 = {1,2,3,4,5,7}
var _n0.0 = {0,8}
var _o0.0 = {0,1,2,3,4,5,6,7,8,9,10,11,13,14}
var _p0.0 = {0,1,2,3,4,5,6,7,8,9,10,12,13,14}
var _q0.0 = {0,1,2,3,4,5,7,8,9,10,11,12,13,14}
var _r0.0 = {10,11,12}
var _s0.0 = {9,10,12}
var _t0.0 = {9,10,11}
var _u0.0 = {9,11,12}
var _v0.0 = {11,12}
var _w0.0 = {0,6,9,10,11,12,13,14}
var _w0.1 = _w0.0
#### symmetries: rotate4reflect
# anyhead = (9, 11, 12, shift, 10)
# RAM
# Normal + normal = set zero
#### line 59: 0, N 9, NE (4, 2), E 9, SE..NW --anyhead, 9 ####
0, 9, _a0.0, 9, _b0.0, _b0.1, _b0.2, _b0.3, _b0.4, 9
#### line 59: N:14 ####
9, any.0, any.1, _a0.0, 9, 0, _b0.0, _b0.1, any.2, 14
#### line 59: NE:4 ####
_a0.0, any.0, any.1, any.2, any.3, 9, 0, 9, any.4, 4
#### line 59: E:14 ####
9, _a0.0, any.0, any.1, any.2, _b0.0, _b0.1, 0, 9, 14
# Constructor + constructor = invert
#### line 61: 0, N 10, NE (4, 2), E 10, SE..NW --anyhead, 10 ####
0, 10, _a0.0, 10, _b0.0, _b0.1, _b0.2, _b0.3, _b0.4, 10
#### line 61: N:14 ####
10, any.0, any.1, _a0.0, 10, 0, _b0.0, _b0.1, any.2, 14
#### line 61: NE[NE:(2, 4)] ####
4, any.0, any.1, any.2, any.3, 10, 0, 10, any.4, 2
2, any.0, any.1, any.2, any.3, 10, 0, 10, any.4, 4
#### line 61: E:14 ####
10, _a0.0, any.0, any.1, any.2, _b0.0, _b0.1, 0, 10, 14
# Normal + constructor = read
#### line 63: 0, N 9, NE (4, 2), E 10, SE..NW --anyhead, 9 ####
0, 9, _a0.0, 10, _b0.0, _b0.1, _b0.2, _b0.3, _b0.4, 9
#### line 63: N[NE:(8, 14)] ####
9, any.0, any.1, 4, 10, 0, _b0.0, _b0.1, any.2, 8
9, any.0, any.1, 2, 10, 0, _b0.0, _b0.1, any.2, 14
#### line 63: NE[NE] ####
_a0.0, any.0, any.1, any.2, any.3, 10, 0, 9, any.4, _a0.0
#### line 63: E:14 ####
10, _a0.0, any.0, any.1, any.2, _b0.0, _b0.1, 0, 9, 14
#############################
#region CONSTRUCTION #
#############################
# PHASE 1
# (Inner photons combine -xx-)
# --
# ignore - 00, 01, 02, 10, 20, 11, 22
# --
# red - 12 (2122)
# green - 12 (2121)
#### line 77: 0, NW 10, N 9, NE 0, E 10, SE (10, 9), S..W rgb0, [SE:(5, 3)] ####
0, 9, 0, 10, 10, rgb0.0, rgb0.1, rgb0.2, 10, 5
0, 9, 0, 10, 9, rgb0.0, rgb0.1, rgb0.2, 10, 3
# --
# 0, NW 10, N 9, NE 0, E 10, SE 9, S..W 0, 1
# --
# blue - 21 (2211)
#### line 82: 0, NW 10, N 10, NE 0, E 9, SE 9, S..W rgb0, 1 ####
0, 10, 0, 9, 9, rgb0.0, rgb0.1, rgb0.2, 10, 1
# --
# PHASE 2
# (Outer photons combine and RGB storage forms --xx)
#### line 87: 0, N 10, NE any, E hchead, SE..S 0, SW rgb0, W..NW 0, 13 ####
0, 10, any.0, hchead.0, 0, 0, rgb0.0, 0, 0, 13
#### line 88: any, N..E any, SE 8, S hchead, SW 0, W 10, NW 8, 8 ####
any.0, any.1, any.2, any.3, 8, hchead.0, 0, 10, 8, 8
# --
# red - 01
#### line 91: 9, NW 10, N any, NE 0, E 8, SE..W rgb0, 4 ####
9, any.0, 0, 8, rgb0.0, rgb0.1, rgb0.2, rgb0.3, 10, 4
# --
# cyan - 02
#### line 94: 10, NW hchead, N any, NE 0, E 8, SE..W rgb0, 3 ####
10, any.0, 0, 8, rgb0.0, rgb0.1, rgb0.2, rgb0.3, hchead.0, 3
# --
# green - 11
#### line 97: 9, NW 10, N (9, 1), NE 8, E 8, SE..W rgb0, 2 ####
9, _c0.0, 8, 8, rgb0.0, rgb0.1, rgb0.2, rgb0.3, 10, 2
# --
# yellow - 12
#### line 100: 10, NW hchead, N (9, 5, 3), NE 8, E 8, SE..W rgb0, 6 ####
10, _d0.0, 8, 8, rgb0.0, rgb0.1, rgb0.2, rgb0.3, hchead.0, 6
# --
# blue - 21
#### line 103: 9, NW 10, N (10, 3), NE 8, E 8, SE..W rgb0, 1 ####
9, _e0.0, 8, 8, rgb0.0, rgb0.1, rgb0.2, rgb0.3, 10, 1
# --
# magenta - 22
#### line 106: 10, NW hchead, N (10, 1), NE 8, E 8, SE..W rgb0, 5 ####
10, _f0.0, 8, 8, rgb0.0, rgb0.1, rgb0.2, rgb0.3, hchead.0, 5
# --
# PHASE 3
# (RGB storages moves around)
#### line 111: rgb, W 13, NW rgb, N 8, NE..SW any, 8 ####
rgb.0, 8, any.0, any.1, any.2, any.3, any.4, 13, rgb.1, 8
# rgb, W 13, NW rgb, N..SW any, 8
#### line 113: 0, N 13, NE rgb, E..NW any, [NE] ####
0, 13, rgb.0, any.0, any.1, any.2, any.3, any.4, any.5, rgb.0
# PHASE 4
# (Final application)
# --
# 2001 = cyan + red = remove
#### line 119: rgb0, N 3, NE 13, E 4, SE..NW any, 0 ####
rgb0.0, 3, 13, 4, any.0, any.1, any.2, any.3, any.4, 0
# --
# 2011 = cyan + green = invert
#### line 122: rgb0, N 3, NE 13, E 2, SE..NW any, [0:(7,6,5,4,3,2,1,0)] ####
0, 3, 13, 2, any.0, any.1, any.2, any.3, any.4, 7
1, 3, 13, 2, any.0, any.1, any.2, any.3, any.4, 6
2, 3, 13, 2, any.0, any.1, any.2, any.3, any.4, 5
3, 3, 13, 2, any.0, any.1, any.2, any.3, any.4, 4
4, 3, 13, 2, any.0, any.1, any.2, any.3, any.4, 3
5, 3, 13, 2, any.0, any.1, any.2, any.3, any.4, 2
6, 3, 13, 2, any.0, any.1, any.2, any.3, any.4, 1
7, 3, 13, 2, any.0, any.1, any.2, any.3, any.4, 0
# --
# 2021 = cyan + blue = read
#### line 125: rgb, N 3, NE 13, E 1, SE..NW any, [0] ####
rgb.0, 3, 13, 1, any.0, any.1, any.2, any.3, any.4, rgb.0
#### line 125: N:14 ####
3, any.0, any.1, 13, 1, rgb.0, any.2, any.3, any.4, 14
#### line 125: NE:9 ####
13, any.0, any.1, any.2, any.3, 1, rgb.0, 3, any.4, 9
#### line 125: E:14 ####
1, 13, any.0, any.1, any.2, any.3, any.4, rgb.0, 3, 14
#### line 126: rgb0, N 3, NE 13, E 1, SE..NW any, [0] ####
rgb0.0, 3, 13, 1, any.0, any.1, any.2, any.3, any.4, rgb0.0
#### line 126: N:14 ####
3, any.0, any.1, 13, 1, rgb0.0, any.2, any.3, any.4, 14
#### line 126: NE:9 ####
13, any.0, any.1, any.2, any.3, 1, rgb0.0, 3, any.4, 9
#### line 126: E:8 ####
1, 13, any.0, any.1, any.2, any.3, any.4, rgb0.0, 3, 8
# --
# 2101 = yellow + red = invert R
#### line 129: rgb0, N 6, NE 13, E 4, SE..NW any, [0:(4,5,6,7,0,1,2,3)] ####
0, 6, 13, 4, any.0, any.1, any.2, any.3, any.4, 4
1, 6, 13, 4, any.0, any.1, any.2, any.3, any.4, 5
2, 6, 13, 4, any.0, any.1, any.2, any.3, any.4, 6
3, 6, 13, 4, any.0, any.1, any.2, any.3, any.4, 7
4, 6, 13, 4, any.0, any.1, any.2, any.3, any.4, 0
5, 6, 13, 4, any.0, any.1, any.2, any.3, any.4, 1
6, 6, 13, 4, any.0, any.1, any.2, any.3, any.4, 2
7, 6, 13, 4, any.0, any.1, any.2, any.3, any.4, 3
# --
# 2111 = yellow + green = invert G
#### line 132: rgb0, N 6, NE 13, E 2, SE..NW any, [0:(2,3,0,1,6,7,4,5)] ####
0, 6, 13, 2, any.0, any.1, any.2, any.3, any.4, 2
1, 6, 13, 2, any.0, any.1, any.2, any.3, any.4, 3
2, 6, 13, 2, any.0, any.1, any.2, any.3, any.4, 0
3, 6, 13, 2, any.0, any.1, any.2, any.3, any.4, 1
4, 6, 13, 2, any.0, any.1, any.2, any.3, any.4, 6
5, 6, 13, 2, any.0, any.1, any.2, any.3, any.4, 7
6, 6, 13, 2, any.0, any.1, any.2, any.3, any.4, 4
7, 6, 13, 2, any.0, any.1, any.2, any.3, any.4, 5
# --
# 2121 = yellow + blue = invert B
#### line 135: rgb0, N 6, NE 13, E 1, SE..NW any, [0:(1,0,3,2,5,4,7,6)] ####
0, 6, 13, 1, any.0, any.1, any.2, any.3, any.4, 1
1, 6, 13, 1, any.0, any.1, any.2, any.3, any.4, 0
2, 6, 13, 1, any.0, any.1, any.2, any.3, any.4, 3
3, 6, 13, 1, any.0, any.1, any.2, any.3, any.4, 2
4, 6, 13, 1, any.0, any.1, any.2, any.3, any.4, 5
5, 6, 13, 1, any.0, any.1, any.2, any.3, any.4, 4
6, 6, 13, 1, any.0, any.1, any.2, any.3, any.4, 7
7, 6, 13, 1, any.0, any.1, any.2, any.3, any.4, 6
# --
# 2021 = magenta + blue = read R
#### line 138: (4,5,6,7), N 5, NE 13, E 4, SE..NW any, [0] ####
_g0.0, 5, 13, 4, any.0, any.1, any.2, any.3, any.4, _g0.0
#### line 138: E:14 ####
4, 13, any.0, any.1, any.2, any.3, any.4, _g0.0, 5, 14
# --
# 2021 = magenta + blue = read G
#### line 141: (2,3,6,7), N 5, NE 13, E 2, SE..NW any, [0] ####
_h0.0, 5, 13, 2, any.0, any.1, any.2, any.3, any.4, _h0.0
#### line 141: E:14 ####
2, 13, any.0, any.1, any.2, any.3, any.4, _h0.0, 5, 14
# --
# 2021 = magenta + blue = read B
#### line 144: (1,3,5,7), N 5, NE 13, E 1, SE..NW any, [0] ####
_i0.0, 5, 13, 1, any.0, any.1, any.2, any.3, any.4, _i0.0
#### line 144: E:14 ####
1, 13, any.0, any.1, any.2, any.3, any.4, _i0.0, 5, 14
#### line 145: rgb0, N 5, NE 13, E (4, 2, 1), SE..NW any, [0] ####
rgb0.0, 5, 13, _j0.0, any.0, any.1, any.2, any.3, any.4, rgb0.0
#### line 145: N:14 ####
5, any.0, any.1, 13, _j0.0, rgb0.0, any.2, any.3, any.4, 14
#### line 145: NE:9 ####
13, any.0, any.1, any.2, any.3, _j0.0, rgb0.0, 5, any.4, 9
#### line 145: E:8 ####
_j0.0, 13, any.0, any.1, any.2, any.3, any.4, rgb0.0, 5, 8
# --
#### line 147: 13, S rgb, SW --8, W rgb, NW..SE any, 0 ####
13, any.0, any.1, any.2, any.3, rgb.0, _k0.0, rgb.1, any.4, 0
#### line 147: S:0 ####
rgb.0, 13, any.0, any.1, any.2, any.3, any.4, _k0.0, rgb.1, 0
#### line 147: W:0 ####
rgb.0, any.0, any.1, 13, rgb.1, _k0.0, any.2, any.3, any.4, 0
#############################
#endregion CONSTRUCTION #
#############################
# # Shifter
# rgb, NW --8, N shift, NE --8, E..W any, shift
# rgb0, NW --8, N shift, NE 8, E shift, SE --8, S..W any, shift
# 0, N 8, NE any, E rgb0, SE shift, S any, SW --shift, W..NW any, [E]
# # 8, SW 8, W shift, NW any, N shift, NE any, E rgb0, SE..S any, [E]
# PUSH/PULL
#### line 161: 0, N rgb, NE..SE any, S (11, 12), SW..NW any, 0 ####
0, rgb.0, any.0, any.1, any.2, _l0.0, any.3, any.4, any.5, 0
# Push + 12 = destroy
#### line 163: (rgb-6), W 11, NW..NE any, E 12, SE..SW any, 0 ####
_m0.0, any.0, any.1, 12, any.2, any.3, any.4, 11, any.5, 0
# Push
#### line 165: (0, 8), NW --12, N rgb-6, NE 11, E 0, SE..W any, [N] ####
_n0.0, _m0.0, 11, 0, any.0, any.1, any.2, any.3, _o0.0, _m0.0
#### line 165: N:0 ####
_m0.0, any.0, any.1, 11, 0, _n0.0, any.2, _o0.0, any.3, 0
# Pull
#### line 167: (0, 8), NW --11, N rgb-6, NE 12, E 8, SE..W any, [N] ####
_n0.0, _m0.0, 12, 8, any.0, any.1, any.2, any.3, _p0.0, _m0.0
#### line 167: N:0 ####
_m0.0, any.0, any.1, 12, 8, _n0.0, any.2, _p0.0, any.3, 0
# # COLLISION SYNTHESIS
# # YCY -> pusher
# 0, E 9, SE 6, S 3, SW 6, W 9, NW..NE any, 11
# # YMY -> puller
# 0, E 9, SE 6, S 5, SW 6, W 9, NW..NE any, 12
# # YYY -> constructor
# 0, E 9, SE 6, S 6, SW 6, W 9, NW..NE any, 10
# SLIDEBY SYNTHESIS
# C + normal -> pusher
#### line 179: 0, W 6, NW 3, N 9, NE any, E --6, SE..SW any, 11 ####
0, 9, any.0, _q0.0, any.1, any.2, any.3, 6, 3, 11
# M + normal -> puller
#### line 181: 0, W 6, NW 5, N 9, NE any, E --6, SE..SW any, 12 ####
0, 9, any.0, _q0.0, any.1, any.2, any.3, 6, 5, 12
# G + normal -> constructor
#### line 183: 0, W 6, NW 2, N 9, NE any, E --6, SE..SW any, 10 ####
0, 9, any.0, _q0.0, any.1, any.2, any.3, 6, 2, 10
# Y + any -> normal
#### line 185: 0, W 6, NW 6, N anyhead-9, NE any, E --6, SE..SW any, 9 ####
0, _r0.0, any.0, _q0.0, any.1, any.2, any.3, 6, 6, 9
# Diagonal split at magenta
#### line 188: 0, N 5, NE hchead, E --8, SE..NW any, [NE] ####
0, 5, hchead.0, _k0.0, any.0, any.1, any.2, any.3, any.4, hchead.0
#### line 189: 0, NW 8, N hchead, NE 5, E..W any, 8 ####
0, hchead.0, 5, any.0, any.1, any.2, any.3, any.4, 8, 8
# Rotate at blue
#### line 192: 0, N 1, NE 8, E hchead, SE..NW any, [E] ####
0, 1, 8, hchead.0, any.0, any.1, any.2, any.3, any.4, hchead.0
# Split at cyan
#### line 195: 0, NW 8, N hchead, NE 3, E..W any, [N] ####
0, hchead.0, 3, any.0, any.1, any.2, any.3, any.4, 8, hchead.0
# Differing in-phase signals cancel
#### line 198: 0, W anyhead, NW..NE any, E anyhead-[W], SE..SW any, 0 ####
0, any.0, any.1, _r0.0, any.2, any.3, any.4, 9, any.5, 0
0, any.0, any.1, _s0.0, any.2, any.3, any.4, 11, any.5, 0
0, any.0, any.1, _t0.0, any.2, any.3, any.4, 12, any.5, 0
0, any.0, any.1, _u0.0, any.2, any.3, any.4, 10, any.5, 0
# # Signals combine out-of-phase (except "shift")
# 0, NW 8, N anyhead-shift, NE anyhead-shift, E --8, SE..W any, [N]
# Signals combine out-of-phase
#### line 203: 0, NW 8, N anyhead, NE anyhead, E --8, SE..W any, [N] ####
0, anyhead.0, anyhead.1, _k0.0, any.0, any.1, any.2, any.3, 8, anyhead.0
# Basic particles
#### line 206: 8, N..NW any, 0 ####
8, any.0, any.1, any.2, any.3, any.4, any.5, any.6, any.7, 0
#### line 207: anyhead, N..NW any, 8 ####
anyhead.0, any.0, any.1, any.2, any.3, any.4, any.5, any.6, any.7, 8
#### line 208: 0, NW --8, N anyhead-(12, 11), NE --8, E..W any, [N] ####
0, hchead.0, _k0.0, any.0, any.1, any.2, any.3, any.4, _k0.1, hchead.0
#### line 209: 0, NW --(8, rgb-6), N (12, 11), NE --(8, rgb-6), E..W any, [N] ####
0, _v0.0, _w0.0, any.0, any.1, any.2, any.3, any.4, _w0.1, _v0.0
# Signals combine in-phase
#### line 212: 0, NW 8, N anyhead, NE 8, E..W any, [N] ####
0, anyhead.0, 8, any.0, any.1, any.2, any.3, any.4, 8, anyhead.0
# Temporary cell disappears
#### line 216: 14, N..NW any, 0 ####
14, any.0, any.1, any.2, any.3, any.4, any.5, any.6, any.7, 0