16
4
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
┌──────────────────────┐
│ │
│ │
│ │
│ * │
│ │
│ \|/│
│ - -│
└──────────────────────┘
5If someone viewing this is not familiar at all about the USA culture, they might be confused to why you are launching fireworks on 4th July. – Okx – 2017-07-04T17:56:24.250
@Okx to destroy all who oppose, of course! – Magic Octopus Urn – 2017-07-17T21:29:21.727
1Obligatory xkcd – caird coinheringaahing – 2017-07-19T14:22:48.083