Code: Select all
@RULE DayNight16
@TABLE
n_states:16
neighborhood:Moore
symmetries:permute
var a={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}
var b=a
var c=a
var d=a
var e=a
var f=a
var g=a
var h=a
a,a,a,a,a,a,a,b,c,a
a,a,a,a,a,a,b,b,c,b
a,a,a,a,b,c,d,e,f,a
a,b,b,b,b,b,c,d,e,b
a,b,b,b,b,c,c,c,c,a
a,b,b,b,b,c,d,e,f,b
a,b,b,b,c,c,c,d,e,a
a,b,b,b,c,d,e,f,g,b
a,b,b,c,c,d,e,f,g,a
a,b,b,c,d,e,f,g,h,b
@COLORS
0 0 0 0 black
1 0 0 170 dark blue
2 0 170 0 dark green
3 0 170 170 dark aqua
4 170 0 0 dark red
5 170 0 170 dark purple
6 250 170 0 gold
7 170 170 170 gray
8 85 85 85 dark gray
9 85 85 255 blue
10 85 255 85 green
11 85 255 255 aqua
12 255 85 85 red
13 255 85 255 light purple
14 255 255 85 yellow
15 255 255 255 white
It works as follows:
- The central cell counts how many neighbors have a different state than its own.
- If the number is 3, 6, 7, or 8, it changes to the state represented by the most of those neighbors.
- If there's a tie, it keeps its current state.
Watch out if you're starting with a random grid of multiple states; it runs really slowly. By the way, in case you don't know about it, I'm using random-fill.py from the Golly Scripts Database to fill grids with an equal distribution.