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

A simulator with support for randomness

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

A simulator with support for randomness

Postby groovy354 » October 28th, 2013, 12:59 pm

I find it very interesting how cellular automata would behave if there was a certain degree of randomness applied to them, that is, if some random cells would change states every now and then. I an thinking of having a specified "mutability factor", that would determine how much/how often should cells change states. Does any cellular automata simulator currently support such functionality?
groovy354
 
Posts: 5
Joined: October 28th, 2013, 12:55 pm

Re: A simulator with support for randomness

Postby 137ben » October 28th, 2013, 6:46 pm

I know the CellularAutomaton command in Mathematica supports arbitrary transition functions, including pseudorandom rules. It seems to be optimized for one-dimensional rules, and doesn't do very well displaying animations of 2d rules the way Golly can. You also can't get it for free.
137ben
 
Posts: 343
Joined: June 18th, 2010, 8:18 pm

Re: A simulator with support for randomness

Postby groovy354 » October 29th, 2013, 1:42 am

Hm... I think I might be able to achieve that using some sort of external script, then. I think I would need a simulator that can read a saved state from a file, run a set amount of iterations and then save the new state to that file. It would be grand if such simulator supported command-line, so I can automate it with a scripting language of my choice. Does anyone happen to know such simulator?
groovy354
 
Posts: 5
Joined: October 28th, 2013, 12:55 pm

Re: A simulator with support for randomness

Postby bprentice » October 29th, 2013, 9:59 am

groovy354,

Can you read and write Java?

Brian Prentice
bprentice
 
Posts: 553
Joined: September 10th, 2009, 6:20 pm
Location: Coos Bay, Oregon

Re: A simulator with support for randomness

Postby groovy354 » October 30th, 2013, 6:34 am

Yes, I have written some programs for my personal use in Java. It's not my language of preference, but I'll settle on anything that can give me aforementioned functionality :)
groovy354
 
Posts: 5
Joined: October 28th, 2013, 12:55 pm

Re: A simulator with support for randomness

Postby bprentice » October 30th, 2013, 12:24 pm

Groovy354,

Download "Square Cell.zip" from here:

http://bprentice.webenet.net/Java%20Square%20Cell/

and unzip it. You will find three directories and an html file. Of particular interest to you is the directory "Base Square Cell" which contains the Java source code of a program designed to enable the exploration of CA rule families. To add a new rule family requires the coding of an extension to the rule class and of classes to display and obtain rule parameters and options. Directory "square Cell" contains the Java source code of the program I use. It is the result of adding 15 rule families to "Base Square Cell".

Each of the rule families is implemented with a triplet of classes. An example triplet being RuleTableRule.java, RuleTableDialog.java and RuleTableOptionsDialog.java. A careful study of these triplets will provide you with examples of how to implement your own rule.

"Java Square Cell.html", which is also included, briefly tells how to use the program.

All of my Java CA Programs together with a large collection of patterns are archived in "Java CA Programs.zip" which can also be downloaded here:

http://bprentice.webenet.net/Java%20Square%20Cell/

Brian Prentice
bprentice
 
Posts: 553
Joined: September 10th, 2009, 6:20 pm
Location: Coos Bay, Oregon

Re: A simulator with support for randomness

Postby groovy354 » October 31st, 2013, 1:50 pm

Thank you for your response!
I am also willing to run such script for a long time on the server, with ability to see the current state at any time. I think that a piece of software that can take a file with saved state, run a set amount of generations on it, and then save the new state to the same file would fit my needs best. It would be optimal if the notation for the file containing the state of the board would be easy to read and modify by an external script :)
groovy354
 
Posts: 5
Joined: October 28th, 2013, 12:55 pm

Re: A simulator with support for randomness

Postby Andrew » October 31st, 2013, 5:55 pm

groovy354 wrote:I think that a piece of software that can take a file with saved state, run a set amount of generations on it, and then save the new state to the same file would fit my needs best. It would be optimal if the notation for the file containing the state of the board would be easy to read and modify by an external script

There is a command line version of Golly called bgolly that should be suitable. There's not much documentation on how to use it other than running it without any parameters to see some usage notes, but basically you just want to do something like "bgolly -m 1000 -o output.rle input.rle". The .rle format is well documented (see Help > File Formats in Golly) and should be easy to modify.
User avatar
Andrew
Moderator
 
Posts: 748
Joined: June 2nd, 2009, 2:08 am
Location: Melbourne, Australia

Re: A simulator with support for randomness

Postby groovy354 » November 1st, 2013, 7:44 am

Thank you very much!
I'll try to get started with that and see where I can go from there :)
groovy354
 
Posts: 5
Joined: October 28th, 2013, 12:55 pm


Return to Scripts

Who is online

Users browsing this forum: No registered users and 1 guest