Given, in any way and order,
dimensions (in whichever order you want)
a probability (in whatever format you want)
number of iterations (you may choose whether to count the initial state or not)
do one of the following:
animate, or
output each step of, or
return a list of states of
a spaces-filled sky of those dimensions.
For each iteration:
every sky character has the given probability of becoming a
*
the eight characters that surround any
*
become
\
|
/
-
-
/
|
\
, if they don't become stars, however,if a character is within range of two
*
s, make it anX
Example
The 7×22 sky (frame for clarity only – don't output the frame)
┌──────────────────────┐
│ │
│ │
│ │
│ │
│ │
│ │
│ │
└──────────────────────┘
could with 1% probability become
┌──────────────────────┐
│ * │
│ │
│ │
│ │
│ │
│ * │
│ │
└──────────────────────┘
and the next step
┌──────────────────────┐
│ - - * │
│ /|\ │
│ * │
│ │
│ \|/ │
│ - - │
│ /|\ │
└──────────────────────┘
and then
┌──────────────────────┐
│ - - │
│ /|\ \|/ │
│ - - │
│ /|\ │
│ │
│ * * │
│ │
└──────────────────────┘
and
┌──────────────────────┐
│ │
│ │
│ │
│ │
│ \|X|/ │
│ - X - │
│ /|X|\ * │
└──────────────────────┘
and so on
┌──────────────────────┐
│ │
│ │
│ │
│ * │
│ │
│ \|/│
│ - -│
└──────────────────────┘