Code: Select all
@RULE ReversibleLife
@TABLE
n_states:4
neighborhood:Moore
symmetries:permute
#These states are treated as ‘on’.
var on_a = {1,3}
var on_b = {1,3}
var on_c = {1,3}
var on_d = {1,3}
#These states are treated as ‘off’.
var of_a = {0,2}
var of_b = {0,2}
var of_c = {0,2}
var of_d = {0,2}
var of_e = {0,2}
#These states indicate ‘any’.
var an_a = {0,1,2,3}
var an_b = {0,1,2,3}
var an_c = {0,1,2,3}
var an_d = {0,1,2,3}
var an_e = {0,1,2,3}
var an_f = {0,1,2,3}
var an_g = {0,1,2,3}
var an_h = {0,1,2,3}
#The birth rule: B3. Note that two states are considered as off: 0 and 2.
0,on_a,on_b,on_c,of_a,of_b,of_c,of_d,of_e,1
2,on_a,on_b,on_c,of_a,of_b,of_c,of_d,of_e,0
#The survival rule: S23. Note that two states are considered as on: 1 and 3.
1,on_a,on_b,an_a,of_a,of_b,of_c,of_d,of_e,3
3,on_a,on_b,an_a,of_a,of_b,of_c,of_d,of_e,2
#The scenario in which a cell dies, or a dead cell continues to be dead.
1,an_a,an_b,an_c,an_d,an_e,an_f,an_g,an_h,2
2,an_a,an_b,an_c,an_d,an_e,an_f,an_g,an_h,1
3,an_a,an_b,an_c,an_d,an_e,an_f,an_g,an_h,3
#The final line can be omitted as, in unspecified situations, Golly retains cell state.