Cellular Automata Simulator

A sketch called RuleTable that implements a cellular automata simulator can be obtained from here:

http://bprentice.webenet.net/RuleTable/RuleTable.zip

The simulator supports 2, 3, 4, 5, 6 and 7 state rules. The simulator is controlled by a button bar and uses editable rule tables. Pattern editing, pattern analysis and pattern input and output are supported. The ability to generate new interesting rules and to edit old rules is provided. A short tutorial is included in directory …/data. A pattern collection organized into specific rules is in directory …/data/Patterns. It is my intention to add to this pattern collection periodically.

Brian Prentice

4 Likes

Hi bprentice,

Really nice work! t is quite fun to see that little world evolved with random rules :slight_smile:

I tried the analyzer also and I think there might be little issues. I had an oscillator of period 2 and when it is being analyzed, it finds an oscillator of period 24.

I would have liked to give you the rules and the pattern that trigger the issue but I can’t manage to get rid of the analyzer result in the middle of the screen. So the rule is hidden by it when I display it :confused:

jb4a,

To close the analyzer results display, simply click on it. Try analyzing some other oscillators. But this time save the pattern to a file before you analyze. You can then send me the pattern file so that I can attempt to reproduce the problem and perhaps fix it.

Brian Prentice

Nice work, looks really amazing! :slight_smile:

Here you go:

The rule:
Rules

The pattern and analyzer result:
Analyzer

It should be period 2.
The funny thing is that if I empty the board and draw the pattern myself, the analyzer gives me the right period. Weird :crazy_face:

I tried saving the pattern but it did not saved properly. It loaded another one.
What I did was select the pattern like in the screenshot above, and hit the save icon.
Then I clicked on the folder icon to load the pattern and got that result:
SavedPattern

jb4x,

You seem to be analyzing the entire world. This is the correct procedure. Run your rule. Set the world to a random state. Stop the simulation. Select the oscillator of interest. Clear the world outside your selection. Do ‘control click’ to clear the selection. Now all that is left is the oscillator of interest. Run the analyzer.

The analyzer will consider all unselected cells in the world as the pattern of interest.

I was not able to reproduce your Save and Load problem. Saving your oscillator to a file named O001.sqc produced this:

#States = 2
#Counts = 9
#RT 0,0,0,1,0,1,0,0,1
#RT 0,1,0,0,1,0,1,1,0
#Rows = 2
#Columns = 4
#L .A.A$A.A

which loads correctly.

When saving a pattern, make sure that the file name has an extension ‘.sqc’. I’ll add that requirement to my tutorial.

Brian Prentice

1 Like

Hooo ! That’s it! I thought it was analyzing just the selection.

I should have messed up something when saving loading…