ConwayLife.com - A community for Conway's Game of Life and related cellular automata
Home  •  LifeWiki  •  Forums  •  Download Golly

[Golly] Random Fill probability < 1%

For scripts to aid with computation or simulation in cellular automata.

[Golly] Random Fill probability < 1%

Postby DivusIulius » July 30th, 2013, 2:24 pm

Just a quick question: Is there a way in Golly to get Random Fill probabilities inferior to 1% with/without scripting?.

Thanks in advance. :wink:
User avatar
DivusIulius
 
Posts: 89
Joined: April 1st, 2009, 11:23 am

Re: [Golly] Random Fill probability < 1%

Postby Andrew » July 30th, 2013, 6:55 pm

Here's a (clumsy) way without scripting:

- Create an empty selection and randomly fill it at 50%.
- Use Prefs > Edit to change the percentage to 1%.
- Randomly fill the selection again (now at 1%).
- Copy this 1% selection to the clipboard.
- Undo back to the 50% selection.
- Edit > Paste Mode > And.
- Edit > Paste to Selection.
- Now the selection density should be about 0.5%.

Clearly if you want to do this a lot it would be better to write a custom script. A good place to start would be random-fill.py in the scripts database (Help > Online Archives > Golly Scripts Database, then ctrl-click on that script).
User avatar
Andrew
Moderator
 
Posts: 748
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia

Re: [Golly] Random Fill probability < 1%

Postby DivusIulius » August 1st, 2013, 6:08 pm

Andrew wrote:Here's a (clumsy) way without scripting.


Hey, such a sweet idea! Thank you!
User avatar
DivusIulius
 
Posts: 89
Joined: April 1st, 2009, 11:23 am


Return to Scripts

Who is online

Users browsing this forum: No registered users and 1 guest