Randomness distribution

For scripts to aid with computation or simulation in cellular automata.
Post Reply
User avatar
Posts: 125
Joined: June 4th, 2010, 9:43 pm

Randomness distribution

Post by ssaamm » May 1st, 2011, 1:46 pm

I was thinking about the way that patterns tend to grow, and I came up with an idea:

Rather than having a completely random distribution, what about making it randomly random; like this:

The selection is divided into a grid of squares, 4x4 or larger
Each square has a random number (With a potentially limited range) chosen for it, that number represents the density of the square
The squares are filled randomly with the density chosen by the number (non-statistically)

Another way would be for every cell to gradually, using bilinear filtering, have a probability of being on.

This would make for much more interesting patterns, because if certain densities of patterns grow more, patterns would be more complex generally. Also, if the density was set to be only very rarely other than zero, it would get rid of the debris that stops larger patterns from growing in the very large simulations.

This would also be the first script I make, so I might need some help.

Posts: 343
Joined: June 18th, 2010, 8:18 pm

Re: Randomness distribution

Post by 137ben » August 25th, 2011, 6:37 pm

I'm more interested in being able to adjust the probabilities of each state. Right now, if I want to fill 10% off, 20% state 2, and 70% state 5, I can't do it efficiently.

User avatar
Posts: 769
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia

Re: Randomness distribution

Post by Andrew » August 25th, 2011, 7:58 pm

The above ideas should be reasonably easy to implement by making appropriate changes to the random-fill.py script available at the Golly Scripts Database.

Python is an easy language to learn, and you don't need to learn a lot of its advanced features to be able to write scripts for Golly because a lot of the time you are simply calling Golly commands (documented in Help > Python Scripting).

Post Reply