cellular automaton schoen ; /* Activation-Inhibition CA */ type celltype = boolean; const dimension = 2; distance = 1; group neighbors2 = {*[0,1],*[0,-1],*[1,0],*[-1,0]}; group neighbors3 = {*[1,1],*[-1,1],*[1,-1],*[-1,-1]}; initial [true] ~ x = lx/2 and ( y = ly/2 or y = ly/2+1 or y = ly/2-1); [true] ~ y = ly/2 and ( x = lx/2+1 or x = lx/2-1 ); [true] ~ prob(0.5) and option = 1; [false] ~ true; color [255,0,0] ~ *[0,0]; var c: celltype; rule begin if (prob(0.1)) then *[0,0] := num ( c in neighbors2 : c ) >= 2 and num (c in neighbors3 :c ) <= 2; end;