rndcell: Random Cellular Automaton
Alain Brobecker, 10 may 2009

Above you can see a 1D cellular automaton using probabilities to determine life and death of cells. Choose the probabilities p1,p2 and p3 (in percents) and see some nice patterns arose.

Here's the principle: We compute one line after another, and to know the new living/dead state of a cell, we check the previous state of it and both its neighbours. Let's mark * a living cell and . a dead one. Then we have 8 possibilities (with a lot so symmetries though) according to neighbours:
     *** : center cell will live with probability p1
     *.* : center cell will live with probability p2
     **. : center cell will live with probability p3
     .** : center cell will live with probability p3
     ..* : center cell will live with probability 1-p3
     *.. : center cell will live with probability 1-p3
     .*. : center cell will live with probability 1-p2
     ... : center cell will live with probability 1-p1

Some values to try for (p1;p2;p3):
(90;70;60) which is default
(95;10;90) vertical raindrops
(100;70;35) kind of triangles appearing
(0;100;100) funny and small arches but no need for randomness here ;)
(100;0;0) another non random 1D cellular automaton