Rule:C
@RULE C
Short version of LifeSuper's name for putting in a signature
@TABLE
n_states:26 neighborhood:Moore symmetries:permute
var a={0,2,4,6,8,10,12,14,16,18,20,22,24} var b=a var c=a var d=a var e=a var f=a var g={3,5} var h1={13,15,17,19,21,23,25} # all movable no-trail ON states var h2={9,11} # all alternate ON-with-trail states var h3={9,11,13,15,17,19,21,23,25} # all movable ON states var i={0,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} var j=i var k=i var l=i var m=i var n=i var o=i var p=i var q={1,3,5,7,9,11,13,15,17,19,21,23,25} var R=q var S=q var T=q var u={3,4,5} var v={7,8,13,14,15,16,17,18,19,20,21,22,23,24,25} # all no-trail var w1={7,13,15,17,19,21,23,25} # all ON no-trail var w2=w1 var w3=w1 var nplabel={14,16,18,20,22,24}
- don't really have to exclude grey cells in 'x' -- they're also excluded by higher-priority rules
var x={0,2,4,8,10,12,14,16,18,20,22,24} var y1={1,3,5,9,11} # all ON with trail var y2=y1 var y3=y1 var z={1,3,5,7,9,11,13,14,15,17,19,21,23,25} # all cell types that can trigger a label action
- boundary cell always stays a boundary cell
6,i,j,k,l,m,n,o,p,6
- anything else from LifeHistory that touches a boundary cell dies
- (using 'u' instead of 'g' below lets gliders survive as blocks)
v,6,i,j,k,l,m,n,o,0 # no-trail and labels leave no history 1,6,i,j,k,l,m,n,o,2 g,6,i,j,k,l,m,n,o,4 9,6,i,j,k,l,m,n,o,10 11,6,i,j,k,l,m,n,o,12
- marked 3-neighbour birth
- (the '4' case has to be separate from the next section
- only to handle the extra 'start' state 5)
4,R,S,T,a,b,c,d,e,3 8,R,S,T,a,b,c,d,e,7
- normal 3-neighbour birth
x,h3,h3,h3,a,b,c,d,e,h3
- avoid switching trail types when encountering trail-ON boundary
x,h1,h1,3,a,b,c,d,e,h1 x,h1,3,3,a,b,c,d,e,h1
- otherwise, any mix of no-trail means lowest no-trail state is born
x,w1,w2,w3,a,b,c,d,e,13
- avoid switching trail types when encountering no-trail boundary
x,h2,h2,7,a,b,c,d,e,h2 x,h2,7,7,a,b,c,d,e,h2
- otherwise, any mix of ON with trail goes to lowest state with history
x,y1,y2,y3,a,b,c,d,e,1
- catch-all for any birth with mixed-type or standard parents
x,R,S,T,a,b,c,d,e,1
- normal 3-neighbour survival
q,R,S,T,a,b,c,d,e,q # keep current state if there's a mix of ON states
- 2-neighbour survival
q,R,S,a,b,c,d,e,f,q # keep current state if there's a mix of ON states
- ON states 3 and 5 go to marked state 4 if they don't survive
- ON state 7 goes to marked state 8 if it doesn't survive
g,i,j,k,l,m,n,o,p,4 7,i,j,k,l,m,n,o,p,8
- special label action states
16,z,i,j,k,l,m,n,o,14 # convert to vanishing label 14,i,j,k,l,m,n,o,p,0 # vanishing label 18,22,i,j,k,l,m,n,o,22 # cycling labels #1 20,18,i,j,k,l,m,n,o,18 # cycling labels #2 22,20,i,j,k,l,m,n,o,20 # cycling labels #3 24,z,i,j,k,l,m,n,o,18 # pop-up label 24,18,i,j,k,l,m,n,o,18 # pop-up contagion
- otherwise labels stay the same unless they get run over
nplabel,i,j,k,l,m,n,o,p,nplabel
- new trail states go to their history color if they don't survive
9,i,j,k,l,m,n,o,p,10 11,i,j,k,l,m,n,o,p,12
- no-trail states go back to state 0 if they don't survive
w1,i,j,k,l,m,n,o,p,0
- Otherwise ON states die and become the history state
q,i,j,k,l,m,n,o,p,2
@COLORS 1 0 255 0 # standard ON (green) 2 0 0 160 # history state OFF (blue) 3 255 216 255 # marked ON with trail (pink) 4 255 0 0 # marked OFF with trail (red) 5 255 255 0 # marked ON alternate (yellow) 6 96 96 96 # boundary cell (dark gray) 7 255 0 255 # marked ON no-trail filter (magenta) 8 128 0 128 # marked OFF no-trail filter (purple) 9 0 191 255 # ON with trail alt#1 (deep sky blue) 10 0 64 128 # OFF trail alt#1 (dark cerulean) 11 64 224 208 # ON with trail (turquoise) 12 0 128 64 # OFF trail alt#2 (bluish green) 13 255 255 255 # ON no-trail #1 (white) 14 255 99 71 # OFF disappearing label (tomato) 15 250 128 114 # ON no-trail #2 (salmon) 16 219 112 147 # OFF vanishing label (pale violet red) 17 255 165 0 # ON no-trail #3 (orange) 18 245 222 179 # OFF cycling label #1 (wheat) 19 0 255 255 # ON no-trail #4 (cyan) 20 192 192 192 # OFF cycling label #2 (silver) 21 192 255 128 # ON no-trail #5 (yellow green) 22 255 182 193 # OFF cycling label #3 (light pink) 23 0 255 127 # ON no-trail #6 (brighter green) 24 1 1 1 # hidden label (stealthy near-black) 25 255 0 127 # ON no-trail #7 (red magenta)