Code: Select all

```
#Circle of Life, a Cellular Atomaton by Ben Cluck (Batmanifestdestiny)
# 4-state, 9-neighbor CA for life of a typical animal
#Format: C,N,NE,E,SE,S,SW,W,NW,C'
#
n_states:4
neighborhood:Moore
symmetries:rotate8
var a={0,1,2,3}
var b={0,1,2,3}
var c={0,1,2,3}
var d={0,1,2,3}
var e={0,1,2,3}
var f={0,1,2,3}
var g={0,1,2,3}
var h={0,1,2,3}
#0, is empty, 1 is young, 2 is mature, 3 is old
#
#if at least three youngs are touching, they will kill each other
1,1,1,c,d,e,f,g,h,0
1,1,b,1,d,e,f,g,h,0
1,1,b,c,1,e,f,g,h,0
1,1,b,c,d,1,f,g,h,0
1,1,b,c,d,e,1,g,h,0
1,1,b,c,d,e,f,1,h,0
1,1,b,c,d,e,f,g,1,0
#young -> mature
1,a,b,c,d,e,f,g,h,2
#if at least two matures are touching, they will kill each other
2,2,b,c,d,e,f,g,h,0
#mature -> old
2,a,b,c,d,e,f,g,h,3
#if at least two olds are touching, they will kill each other
3,3,b,c,d,e,f,g,h,0
#old -> empty
3,a,b,c,d,e,f,g,h,0
#if empty has 2 or more neighbors that are mature, than empty -> young
0,2,b,2,d,e,f,g,h,1
0,2,b,c,2,e,f,g,h,1
0,2,b,c,d,2,f,g,h,1
0,2,b,c,d,e,2,g,h,1
0,2,b,c,d,e,f,2,h,1
0,2,b,c,d,e,f,g,2,1
```

Here's an oscillator:

Code: Select all

```
x = 3, y = 1, rule = circleoflife
B.B!
```

Code: Select all

```
x = 3, y = 3, rule = circleoflife
B$2.B$2.B!
```

Code: Select all

```
x = 2, y = 1, rule = circleoflife
2B!
```