Page 1 of 1

Random Three-State Rules

Posted: July 4th, 2013, 6:45 pm
by Extrementhusiast
Inspired by the "random rule" function in the SquareCell applet, but disappointed in its rule table functionality, I decided to make a template for which to paste random rules on. To keep the search space reasonably wide, while at the same time keeping the template at least fairly short, I decided to use three states. Without further ado, here is the template:

Code: Select all

n_states:3
neighborhood:Moore
symmetries:permute

0,0,0,0,0,0,0,0,1,0
0,0,0,0,0,0,0,0,2,0
0,0,0,0,0,0,0,1,1,2
0,0,0,0,0,0,0,1,2,0
0,0,0,0,0,0,0,2,2,1
0,0,0,0,0,0,1,1,1,2
0,0,0,0,0,0,1,1,2,1
0,0,0,0,0,0,1,2,2,1
0,0,0,0,0,0,2,2,2,0
0,0,0,0,0,1,1,1,1,0
0,0,0,0,0,1,1,1,2,2
0,0,0,0,0,1,1,2,2,0
0,0,0,0,0,1,2,2,2,2
0,0,0,0,0,2,2,2,2,0
0,0,0,0,1,1,1,1,1,0
0,0,0,0,1,1,1,1,2,0
0,0,0,0,1,1,1,2,2,0
0,0,0,0,1,1,2,2,2,1
0,0,0,0,1,2,2,2,2,1
0,0,0,0,2,2,2,2,2,0
0,0,0,1,1,1,1,1,1,0
0,0,0,1,1,1,1,1,2,1
0,0,0,1,1,1,1,2,2,0
0,0,0,1,1,1,2,2,2,2
0,0,0,1,1,2,2,2,2,1
0,0,0,1,2,2,2,2,2,0
0,0,0,2,2,2,2,2,2,1
0,0,1,1,1,1,1,1,1,2
0,0,1,1,1,1,1,1,2,0
0,0,1,1,1,1,1,2,2,1
0,0,1,1,1,1,2,2,2,0
0,0,1,1,1,2,2,2,2,1
0,0,1,1,2,2,2,2,2,0
0,0,1,2,2,2,2,2,2,2
0,0,2,2,2,2,2,2,2,0
0,1,1,1,1,1,1,1,1,2
0,1,1,1,1,1,1,1,2,1
0,1,1,1,1,1,1,2,2,0
0,1,1,1,1,1,2,2,2,1
0,1,1,1,1,2,2,2,2,1
0,1,1,1,2,2,2,2,2,0
0,1,1,2,2,2,2,2,2,0
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0,0,0,0,0,1,2,0
2,0,0,0,0,0,0,2,2,0
2,0,0,0,0,0,1,1,1,2
2,0,0,0,0,0,1,1,2,1
2,0,0,0,0,0,1,2,2,0
2,0,0,0,0,0,2,2,2,0
2,0,0,0,0,1,1,1,1,2
2,0,0,0,0,1,1,1,2,1
2,0,0,0,0,1,1,2,2,0
2,0,0,0,0,1,2,2,2,0
2,0,0,0,0,2,2,2,2,1
2,0,0,0,1,1,1,1,1,1
2,0,0,0,1,1,1,1,2,2
2,0,0,0,1,1,1,2,2,0
2,0,0,0,1,1,2,2,2,0
2,0,0,0,1,2,2,2,2,0
2,0,0,0,2,2,2,2,2,1
2,0,0,1,1,1,1,1,1,2
2,0,0,1,1,1,1,1,2,1
2,0,0,1,1,1,1,2,2,1
2,0,0,1,1,1,2,2,2,0
2,0,0,1,1,2,2,2,2,0
2,0,0,1,2,2,2,2,2,0
2,0,0,2,2,2,2,2,2,1
2,0,1,1,1,1,1,1,1,0
2,0,1,1,1,1,1,1,2,1
2,0,1,1,1,1,1,2,2,1
2,0,1,1,1,1,2,2,2,0
2,0,1,1,1,2,2,2,2,1
2,0,1,1,2,2,2,2,2,2
2,0,1,2,2,2,2,2,2,0
2,0,2,2,2,2,2,2,2,2
2,1,1,1,1,1,1,1,1,1
2,1,1,1,1,1,1,1,2,2
2,1,1,1,1,1,1,2,2,2
2,1,1,1,1,1,2,2,2,1
2,1,1,1,1,2,2,2,2,0
2,1,1,1,2,2,2,2,2,0
2,1,1,2,2,2,2,2,2,0
2,1,2,2,2,2,2,2,2,1
2,2,2,2,2,2,2,2,2,1
Change the rightmost column into a random assortment of 134 zeroes, ones, and twos. (I find that the best rules come from arrangements with about 50-70% zeroes.)

As for how I do it, I use random.org to generate the numbers, and then Multi-Edit to put them into the template. Once I find an interesting pattern I want to keep, I set the rules that are necessary to form that object aside, and re-randomize the rest, in a sort of pruning procedure.

Feel free to post any interesting rules that you come up with in this way!

(I apologize in advance for the old formatting. It's the way I'm accustomed to.)

Re: Random Three-State Rules

Posted: July 4th, 2013, 11:25 pm
by Extrementhusiast
And I already have results! I found a debris-laying two-dimensional fractal replicator, which would bring to mind something completely different from what I found. Rulestring:

Code: Select all

01000012100100100122211002120120002210011120002101020201100000202220222111102222201121000020010011202000000020001002002000000012000211
(Fill those in in order, so the first entry gets a zero result, the second entry gets a one result, and so on.)
I'll leave you to find the four-cell 2x3 pattern that generates what I'm talking about. (And this is an incredible find. On average, if the whole population of the Earth did one new table per second per person, and instantly knew whether it contained this object after plugging in the new table, it would take over forty-eight billion times the age of the universe to find this. And I found this in a couple of months, at most.)

Re: Random Three-State Rules

Posted: July 5th, 2013, 12:46 am
by bprentice
Extrementhusiast wrote:As for how I do it, I use random.org to generate the numbers, and then Multi-Edit to put them into the template.
Surely it would be preferable to extend Square Cell by adding a new rule family incorporating your ideas, use that extension to find interesting rules and then convert those rule tables to a form suitable for Golly.

Or, even better, write a python script to generate a random rule, set a rectangular area to random states and run the rule.

In your last post, why not publish the rule table rather than just the rule string?

Brian Prentice

Re: Random Three-State Rules

Posted: July 5th, 2013, 12:09 pm
by Extrementhusiast
Full table:

Code: Select all

n_states:3
neighborhood:Moore
symmetries:permute

0,0,0,0,0,0,0,0,1,0
0,0,0,0,0,0,0,0,2,1
0,0,0,0,0,0,0,1,1,0
0,0,0,0,0,0,0,1,2,0
0,0,0,0,0,0,0,2,2,0
0,0,0,0,0,0,1,1,1,0
0,0,0,0,0,0,1,1,2,1
0,0,0,0,0,0,1,2,2,2
0,0,0,0,0,0,2,2,2,1
0,0,0,0,0,1,1,1,1,0
0,0,0,0,0,1,1,1,2,0
0,0,0,0,0,1,1,2,2,1
0,0,0,0,0,1,2,2,2,0
0,0,0,0,0,2,2,2,2,0
0,0,0,0,1,1,1,1,1,1
0,0,0,0,1,1,1,1,2,0
0,0,0,0,1,1,1,2,2,0
0,0,0,0,1,1,2,2,2,1
0,0,0,0,1,2,2,2,2,2
0,0,0,0,2,2,2,2,2,2
0,0,0,1,1,1,1,1,1,2
0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,2,2,2,2,0
2,0,2,2,2,2,2,2,2,0
2,1,1,1,1,1,1,1,1,0
2,1,1,1,1,1,1,1,2,1
2,1,1,1,1,1,1,2,2,2
2,1,1,1,1,1,2,2,2,0
2,1,1,1,1,2,2,2,2,0
2,1,1,1,2,2,2,2,2,0
2,1,1,2,2,2,2,2,2,2
2,1,2,2,2,2,2,2,2,1
2,2,2,2,2,2,2,2,2,1
As for the SquareCell implementation, it would most likely have to remain three-state. (134 for three-state, 659 for four-state, 2474 for five-state, 7721 for six-state, and then it just gets impractical.)

Code: Select all

= (n+7)
=n(   )-1
= (n-1)

Re: Random Three-State Rules

Posted: July 7th, 2013, 6:01 pm
by bprentice
Here is a Python script that generates and tests these 3 state rules:

Code: Select all

from random import randint
import golly as g

def f(n):
  line = [0, 0, 0, 0, 0, 0, 0, 0, n]
  i = 0
  while i < 8:
    j = 0
    while j <= i:
      line[j] = 1
      j += 1
    file.write('%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n' % (line[8], line[7], line[6], line[5], line[4], line[3], line[2], line[1], line[0], r()))
    j = 0
    while j <= i:
      line[j] = 2
      file.write('%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n' % (line[8], line[7], line[6], line[5], line[4], line[3], line[2], line[1], line[0], r()))
      j += 1
    i += 1

def r():
  if randint(0, 2) == 2:
    return randint(0, 2)
  else:
    return 0

file = open(g.getdir('rules') + 'test.table', 'w')
file.write('n_states:3\n')
file.write('neighborhood:Moore\n')
file.write('symmetries:permute\n\n')
f(0)
file.write('%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n' % (1, 0, 0, 0, 0, 0, 0, 0, 0, r()))
f(1)
file.write('%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n' % (2, 0, 0, 0, 0, 0, 0, 0, 0, r()))
f(2)
file.close()
g.new('testing rule')
g.setalgo('RuleLoader')
g.setrule('test')
g.select([0, 0, 100, 100])
g.randfill(33)
g.select([])
g.fit()
Place the script in your Scripts directory and connect it to the N key using the Keyboard option of the Preferences dialog. Then repeatedly press N followed by Return until an interesting rule shows up. When one does, simply rename file test.table in your Rules directory to save it.

Here is an example rule that I found in just a few minutes:

Code: Select all

n_states:3
neighborhood:Moore
symmetries:permute

0,0,0,0,0,0,0,0,1,0
0,0,0,0,0,0,0,0,2,0
0,0,0,0,0,0,0,1,1,0
0,0,0,0,0,0,0,1,2,0
0,0,0,0,0,0,0,2,2,2
0,0,0,0,0,0,1,1,1,0
0,0,0,0,0,0,1,1,2,0
0,0,0,0,0,0,1,2,2,1
0,0,0,0,0,0,2,2,2,0
0,0,0,0,0,1,1,1,1,0
0,0,0,0,0,1,1,1,2,0
0,0,0,0,0,1,1,2,2,0
0,0,0,0,0,1,2,2,2,0
0,0,0,0,0,2,2,2,2,0
0,0,0,0,1,1,1,1,1,0
0,0,0,0,1,1,1,1,2,0
0,0,0,0,1,1,1,2,2,0
0,0,0,0,1,1,2,2,2,0
0,0,0,0,1,2,2,2,2,1
0,0,0,0,2,2,2,2,2,0
0,0,0,1,1,1,1,1,1,2
0,0,0,1,1,1,1,1,2,0
0,0,0,1,1,1,1,2,2,0
0,0,0,1,1,1,2,2,2,0
0,0,0,1,1,2,2,2,2,0
0,0,0,1,2,2,2,2,2,0
0,0,0,2,2,2,2,2,2,0
0,0,1,1,1,1,1,1,1,0
0,0,1,1,1,1,1,1,2,1
0,0,1,1,1,1,1,2,2,2
0,0,1,1,1,1,2,2,2,0
0,0,1,1,1,2,2,2,2,0
0,0,1,1,2,2,2,2,2,0
0,0,1,2,2,2,2,2,2,1
0,0,2,2,2,2,2,2,2,0
0,1,1,1,1,1,1,1,1,1
0,1,1,1,1,1,1,1,2,0
0,1,1,1,1,1,1,2,2,0
0,1,1,1,1,1,2,2,2,2
0,1,1,1,1,2,2,2,2,0
0,1,1,1,2,2,2,2,2,0
0,1,1,2,2,2,2,2,2,1
0,1,2,2,2,2,2,2,2,0
0,2,2,2,2,2,2,2,2,0
1,0,0,0,0,0,0,0,0,0
1,0,0,0,0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,1,2,2
2,0,0,0,0,0,1,2,2,0
2,0,0,0,0,0,2,2,2,0
2,0,0,0,0,1,1,1,1,0
2,0,0,0,0,1,1,1,2,2
2,0,0,0,0,1,1,2,2,0
2,0,0,0,0,1,2,2,2,0
2,0,0,0,0,2,2,2,2,0
2,0,0,0,1,1,1,1,1,0
2,0,0,0,1,1,1,1,2,0
2,0,0,0,1,1,1,2,2,0
2,0,0,0,1,1,2,2,2,0
2,0,0,0,1,2,2,2,2,0
2,0,0,0,2,2,2,2,2,0
2,0,0,1,1,1,1,1,1,0
2,0,0,1,1,1,1,1,2,0
2,0,0,1,1,1,1,2,2,0
2,0,0,1,1,1,2,2,2,0
2,0,0,1,1,2,2,2,2,0
2,0,0,1,2,2,2,2,2,0
2,0,0,2,2,2,2,2,2,0
2,0,1,1,1,1,1,1,1,0
2,0,1,1,1,1,1,1,2,0
2,0,1,1,1,1,1,2,2,0
2,0,1,1,1,1,2,2,2,0
2,0,1,1,1,2,2,2,2,0
2,0,1,1,2,2,2,2,2,0
2,0,1,2,2,2,2,2,2,0
2,0,2,2,2,2,2,2,2,0
2,1,1,1,1,1,1,1,1,0
2,1,1,1,1,1,1,1,2,0
2,1,1,1,1,1,1,2,2,0
2,1,1,1,1,1,2,2,2,0
2,1,1,1,1,2,2,2,2,0
2,1,1,1,2,2,2,2,2,0
2,1,1,2,2,2,2,2,2,0
2,1,2,2,2,2,2,2,2,0
2,2,2,2,2,2,2,2,2,0


Since this is my first Python script for Golly, please improve it. I think modifications of this script will be useful in many other threads on this forum.

Brian Prentice

Re: Random Three-State Rules

Posted: July 7th, 2013, 8:17 pm
by Sphenocorona
Using Brian Prentice's script for generating and testing random three state rules I found this one that I thought was really neat (If you have golly 2.4 or earlier, cut out the stuff for colors and everything above n_states:3, and save it as Exodus.table):

Code: Select all

@RULE Exodus

@TABLE
n_states:3
neighborhood:Moore
symmetries:permute

0,0,0,0,0,0,0,0,1,0
0,0,0,0,0,0,0,0,2,0
0,0,0,0,0,0,0,1,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0,0,1,1,1,1,2,0
2,0,0,0,1,1,1,2,2,0
2,0,0,0,1,1,2,2,2,0
2,0,0,0,1,2,2,2,2,0
2,0,0,0,2,2,2,2,2,0
2,0,0,1,1,1,1,1,1,0
2,0,0,1,1,1,1,1,2,2
2,0,0,1,1,1,1,2,2,0
2,0,0,1,1,1,2,2,2,2
2,0,0,1,1,2,2,2,2,2
2,0,0,1,2,2,2,2,2,0
2,0,0,2,2,2,2,2,2,0
2,0,1,1,1,1,1,1,1,0
2,0,1,1,1,1,1,1,2,0
2,0,1,1,1,1,1,2,2,0
2,0,1,1,1,1,2,2,2,0
2,0,1,1,1,2,2,2,2,0
2,0,1,1,2,2,2,2,2,0
2,0,1,2,2,2,2,2,2,0
2,0,2,2,2,2,2,2,2,0
2,1,1,1,1,1,1,1,1,2
2,1,1,1,1,1,1,1,2,0
2,1,1,1,1,1,1,2,2,0
2,1,1,1,1,1,2,2,2,0
2,1,1,1,1,2,2,2,2,0
2,1,1,1,2,2,2,2,2,0
2,1,1,2,2,2,2,2,2,0
2,1,2,2,2,2,2,2,2,0
2,2,2,2,2,2,2,2,2,0

@COLORS
1 255   0   0   red
2 255 255 255   white
I thought this rule was rather interesting because if you start with a random fill like that automatically created by the script, it behaves in a rather interesting way, with clouds of choas spitting out lots of c/2 diagonal spaceships. Quite a few of these spaceships will end up crashing together, creating more choatic mess, but sooner or later all of the ships are moving away from the original starting position leaving nothing behind, sort of like they are fleeing, which is what inspired the name. Here is a example collection of some patterns I found:

Code: Select all

x = 53, y = 60, rule = Exodus
2B20.2A14.2A$2.A21.B15.B$A.A18.2A.B12.2A.B$A$42.2B$26.2B16.A$5.2B21.A
13.A.A$7.A18.A.A13.A$6.A.B17.A$8.B3$10.2B$11.A$12.A$13.AB$14.B6$20.2A
$22.B$19.2A.B2$23.2B$25.A$23.A.A$23.A8$32.2A$34.B$31.2A.B3$36.2B$38.A
$36.A.A$36.A2$40.2B$42.A$40.A.A$40.A5$48.2B$50.A$51.A$48.BA2.B$49.B2.
B!
The top most objects are spaceships (along the diagonal are three basic ones) and the bottom ones are rakes. You may want to separate them out a bit or they will interact and make a mess. I wonder if any oscillators or guns actually exist in this rule. I'm fairly sure still lives are impossible.

EDIT: Rarely a rake will naturally appear, possibly shooting some spaceships back at the starting region. Ironically the first rake that I found to occur naturally out of soup had only one fleaship engine, unlike the ones I found previously:

Code: Select all

x = 8, y = 3, rule = Exodus
B.A3.AB$B4.B.B$.2A!
I also found this other tiny ship (with sparks the same size as the main body) that is very uncommon, but I don't know what to call it for now:

Code: Select all

x = 5, y = 3, rule = Exodus
.A.B$2B.A$4.B!

Re: Random Three-State Rules

Posted: July 8th, 2013, 7:44 pm
by Extrementhusiast
Now for a rule that is practically the complete opposite, which I call "Conduit":

Code: Select all

n_states:3
neighborhood:Moore
symmetries:permute

0,0,0,0,0,0,0,0,1,2
0,0,0,0,0,0,0,1,1,1
1,0,0,0,0,0,0,0,0,2
1,0,0,0,0,0,0,0,1,0
1,0,0,0,0,0,0,1,1,0
1,0,0,0,0,0,0,2,2,0
1,0,0,0,0,0,1,1,1,2
1,0,0,0,0,0,1,1,2,2
1,0,0,0,0,0,2,2,2,0
1,0,0,0,0,1,1,2,2,2
1,0,0,0,0,2,2,2,2,0
1,0,0,0,1,1,1,1,2,0
1,0,0,0,1,1,2,2,2,2
1,0,0,0,1,2,2,2,2,0
1,0,0,0,2,2,2,2,2,2
1,0,0,1,1,1,1,1,2,2
1,0,0,1,1,1,1,2,2,0
1,0,0,1,1,1,2,2,2,0
1,0,0,1,1,2,2,2,2,0
1,0,0,1,2,2,2,2,2,0
1,0,1,1,1,1,1,2,2,2
1,0,1,1,2,2,2,2,2,0
1,0,1,2,2,2,2,2,2,0
1,0,2,2,2,2,2,2,2,0
1,1,1,1,1,1,1,1,1,0
1,1,1,1,1,1,1,2,2,0
1,1,1,1,1,2,2,2,2,0
1,1,1,1,2,2,2,2,2,2
1,1,1,2,2,2,2,2,2,0
1,2,2,2,2,2,2,2,2,2
2,0,0,0,0,0,0,0,0,0
2,0,0,0,0,0,0,0,2,0
2,0,0,0,0,0,0,1,1,0
2,0,0,0,0,0,0,1,2,0
2,0,0,0,0,0,0,2,2,0
2,0,0,0,0,0,1,1,2,0
2,0,0,0,0,0,1,2,2,1
2,0,0,0,0,0,2,2,2,0
2,0,0,0,0,1,1,1,1,0
2,0,0,0,0,1,1,1,2,0
2,0,0,0,0,1,1,2,2,1
2,0,0,0,0,2,2,2,2,1
2,0,0,0,1,1,1,1,1,0
2,0,0,0,1,1,1,1,2,1
2,0,0,0,1,1,1,2,2,0
2,0,0,0,1,1,2,2,2,1
2,0,0,0,1,2,2,2,2,0
2,0,0,0,2,2,2,2,2,0
2,0,0,1,1,1,1,1,2,0
2,0,0,1,1,1,1,2,2,0
2,0,0,1,1,1,2,2,2,1
2,0,0,1,1,2,2,2,2,0
2,0,0,2,2,2,2,2,2,0
2,0,1,1,1,1,1,1,1,0
2,0,1,1,1,1,1,1,2,1
2,0,1,1,1,1,1,2,2,0
2,0,1,1,1,1,2,2,2,1
2,0,1,1,2,2,2,2,2,0
2,0,2,2,2,2,2,2,2,1
2,1,1,1,1,1,1,1,1,0
2,1,1,1,1,1,1,2,2,0
2,1,1,1,1,1,2,2,2,0
2,1,1,1,1,2,2,2,2,0
2,1,1,1,2,2,2,2,2,0
2,1,1,2,2,2,2,2,2,1
2,1,2,2,2,2,2,2,2,0
2,2,2,2,2,2,2,2,2,0
This rule seems to be filled with what seems like Herschel-esque conduits. (Incidentally, if all survival rulestrings over S4 are removed, the resulting rule produces a common, slow, sparky knightship.)

Re: Random Three-State Rules

Posted: July 8th, 2013, 7:53 pm
by EricG
"(Incidentally, if all survival rulestrings over S4 are removed, the resulting rule produces a common, slow, sparky knightship.)"

Could you provide the ruletable to remove any ambiguity about what you meant by this? Thanks!

Re: Random Three-State Rules

Posted: July 11th, 2013, 12:52 pm
by Extrementhusiast
Delete all lines between and including

Code: Select all

1,0,0,0,1,1,1,1,2,0
and
1,2,2,2,2,2,2,2,2,2
and

Code: Select all

2,0,0,0,1,1,1,1,1,0
and
2,2,2,2,2,2,2,2,2,0
but not between

Code: Select all

1,2,2,2,2,2,2,2,2,2
and
2,0,0,0,1,1,1,1,1,0

Re: Random Three-State Rules

Posted: July 11th, 2013, 2:48 pm
by bprentice
This is very irritating, why not just post the rule table rather than the editing instructions required to generate the rule table?

Brian Prentice

Re: Random Three-State Rules

Posted: July 11th, 2013, 3:27 pm
by Extrementhusiast
Sorry.

Code: Select all

n_states:3
neighborhood:Moore
symmetries:permute

0,0,0,0,0,0,0,0,1,2
0,0,0,0,0,0,0,1,1,1
1,0,0,0,0,0,0,0,0,2
1,0,0,0,0,0,0,0,1,0
1,0,0,0,0,0,0,1,1,0
1,0,0,0,0,0,0,2,2,0
1,0,0,0,0,0,1,1,1,2
1,0,0,0,0,0,1,1,2,2
1,0,0,0,0,0,2,2,2,0
1,0,0,0,0,1,1,2,2,2
1,0,0,0,0,2,2,2,2,0
2,0,0,0,0,0,0,0,0,0
2,0,0,0,0,0,0,0,2,0
2,0,0,0,0,0,0,1,1,0
2,0,0,0,0,0,0,1,2,0
2,0,0,0,0,0,0,2,2,0
2,0,0,0,0,0,1,1,2,0
2,0,0,0,0,0,1,2,2,1
2,0,0,0,0,0,2,2,2,0
2,0,0,0,0,1,1,1,1,0
2,0,0,0,0,1,1,1,2,0
2,0,0,0,0,1,1,2,2,1
2,0,0,0,0,2,2,2,2,1

Re: Random Three-State Rules

Posted: July 14th, 2013, 4:39 pm
by Extrementhusiast
This was a strange breeder I found:

Code: Select all

x = 6, y = 4, rule = oddbreeder
3.BAB$2A.B$4.AB$.B2AB!
RT:

Code: Select all

n_states:3
neighborhood:Moore
symmetries:permute

0,0,0,0,0,0,0,1,1,2
0,0,0,0,0,0,0,1,2,2
0,0,0,0,0,0,1,1,2,1
0,0,0,0,0,2,2,2,2,1
0,0,0,0,1,2,2,2,2,1
0,0,0,0,2,2,2,2,2,1
0,0,1,1,1,1,1,2,2,1
0,1,1,1,1,2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,2,0
2,0,0,0,0,0,1,2,2,0
2,0,0,0,0,0,2,2,2,0
2,0,0,0,0,1,1,1,1,0
2,0,0,0,0,1,1,1,2,0
2,0,0,0,0,1,1,2,2,0
2,0,0,0,0,1,2,2,2,0
2,0,0,0,0,2,2,2,2,0
2,0,0,0,1,1,1,1,1,1
2,0,0,0,1,1,1,1,2,0
2,0,0,0,1,1,1,2,2,1
2,0,0,0,1,1,2,2,2,0
2,0,0,0,1,2,2,2,2,0
2,0,0,0,2,2,2,2,2,0
2,0,0,1,1,1,1,1,1,0
2,0,0,1,1,1,1,1,2,0
2,0,0,1,1,1,1,2,2,0
2,0,0,1,1,1,2,2,2,0
2,0,0,1,2,2,2,2,2,0
2,0,0,2,2,2,2,2,2,0
2,0,1,1,1,1,1,1,1,0
2,0,1,1,1,1,1,1,2,0
2,0,1,1,1,1,1,2,2,0
2,0,1,1,1,1,2,2,2,0
2,0,1,1,1,2,2,2,2,0
2,0,1,1,2,2,2,2,2,0
2,0,1,2,2,2,2,2,2,0
2,0,2,2,2,2,2,2,2,0
2,1,1,1,1,1,1,1,1,0
2,1,1,1,1,1,1,1,2,0
2,1,1,1,1,1,1,2,2,0
2,1,1,1,1,1,2,2,2,0
2,1,1,1,1,2,2,2,2,0
2,1,1,1,2,2,2,2,2,0
2,1,1,2,2,2,2,2,2,0
2,1,2,2,2,2,2,2,2,1
One red cell produces an interesting fractal-esque pattern in this rule:

Code: Select all

n_states:3
neighborhood:Moore
symmetries:permute

var a = {0,1,2}
var b = {a}
var c = {a}
var d = {a}
var e = {a}
var f = {a}
var g = {a}
var h = {a}

0,0,0,0,0,0,0,0,1,1
0,0,0,0,0,0,0,1,1,2
1,a,b,c,d,e,f,g,h,0
2,0,0,0,0,0,0,0,0,2
2,a,b,c,d,e,f,g,h,0

Random Four-State Rule Script

Posted: August 4th, 2013, 9:34 pm
by Extrementhusiast
Doubleposting because I feel that this is at least somewhat important. I have extended (with help) the Python script to produce random four-state rules. Here it is:

Code: Select all

from random import randint
import golly as g

def f(n):
  line = [0, 0, 0, 0, 0, 0, 0, 0, n]
  i = 0
  while i < 8:
    j = 0
    while j <= i:
      line[j] = 1
      file.write('%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n' % (line[8], line[7], line[6], line[5], line[4], line[3], line[2], line[1], line[0], r()))
      j += 1
    j = 0
    while j <= i:
      line[j] = 2
      file.write('%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n' % (line[8], line[7], line[6], line[5], line[4], line[3], line[2], line[1], line[0], r()))
      j += 1
    j = 0
    while j <= i:
      line[j] = 3
      file.write('%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n' % (line[8], line[7], line[6], line[5], line[4], line[3], line[2], line[1], line[0], r()))
      j += 1
    # j = 0
    # while j <= i:
      # line[j] = 4
      # file.write('%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n' % (line[8], line[7], line[6], line[5], line[4], line[3], line[2], line[1], line[0], r()))
      # j += 1
    i += 1

def r():
  if randint(0, 2) == 0: # (change the 2 to control rulestring density)
    return randint(0, 3) # change the 3 to a 4
  else:
    return 0

file = open(g.getdir('rules') + 'test2.table', 'w') # replace test2 with test3
file.write('n_states:4\n') # change the 4 to a 5
file.write('neighborhood:Moore\n')
file.write('symmetries:permute\n\n')
f(0)
file.write('%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n' % (1, 0, 0, 0, 0, 0, 0, 0, 0, r()))
f(1)
file.write('%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n' % (2, 0, 0, 0, 0, 0, 0, 0, 0, r()))
f(2)
file.write('%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n' % (3, 0, 0, 0, 0, 0, 0, 0, 0, r()))
f(3)
# file.write('%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n' % (4, 0, 0, 0, 0, 0, 0, 0, 0, r()))
# f(4)
file.close()
g.new('testing rule')
g.setalgo('RuleTable')
g.setrule('test2') # replace test2 with test3, same name as above
g.select([0, 0, 100, 100])
g.randfill(33)
g.select([])
g.fit()
It isn't too different from the original script. I have inserted comments (preceded by hashes) about extending this to five states. (If the hash comes at the beginning of the line, delete it. If the hash does not come at the beginning of a line, follow the instructions after the hash on the contents before the hash.)

Re: Random Three-State Rules

Posted: August 5th, 2013, 1:54 pm
by bprentice
These two rule generating extensions will provide Golly users with a rich set of new interesting rules to explore. I've been playing with the 5 state extension and found another strange puffer. Here is the rule:

Code: Select all

n_states:5
neighborhood:Moore
symmetries:permute

0,0,0,0,0,0,0,0,1,0
0,0,0,0,0,0,0,0,2,0
0,0,0,0,0,0,0,0,3,0
0,0,0,0,0,0,0,0,4,0
0,0,0,0,0,0,0,0,1,0
0,0,0,0,0,0,0,1,1,0
0,0,0,0,0,0,0,1,2,0
0,0,0,0,0,0,0,2,2,1
0,0,0,0,0,0,0,2,3,0
0,0,0,0,0,0,0,3,3,0
0,0,0,0,0,0,0,3,4,0
0,0,0,0,0,0,0,4,4,4
0,0,0,0,0,0,0,4,1,0
0,0,0,0,0,0,0,1,1,0
0,0,0,0,0,0,1,1,1,0
0,0,0,0,0,0,1,1,2,0
0,0,0,0,0,0,1,2,2,0
0,0,0,0,0,0,2,2,2,0
0,0,0,0,0,0,2,2,3,0
0,0,0,0,0,0,2,3,3,0
0,0,0,0,0,0,3,3,3,0
0,0,0,0,0,0,3,3,4,0
0,0,0,0,0,0,3,4,4,0
0,0,0,0,0,0,4,4,4,0
0,0,0,0,0,0,4,4,1,0
0,0,0,0,0,0,4,1,1,0
0,0,0,0,0,0,1,1,1,1
0,0,0,0,0,1,1,1,1,0
0,0,0,0,0,1,1,1,2,0
0,0,0,0,0,1,1,2,2,0
0,0,0,0,0,1,2,2,2,0
0,0,0,0,0,2,2,2,2,2
0,0,0,0,0,2,2,2,3,1
0,0,0,0,0,2,2,3,3,0
0,0,0,0,0,2,3,3,3,1
0,0,0,0,0,3,3,3,3,4
0,0,0,0,0,3,3,3,4,2
0,0,0,0,0,3,3,4,4,0
0,0,0,0,0,3,4,4,4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,2,2,2,2,3
4,1,1,2,2,2,2,2,2,1
4,1,2,2,2,2,2,2,2,4
4,2,2,2,2,2,2,2,2,0
4,2,2,2,2,2,2,2,3,0
4,2,2,2,2,2,2,3,3,0
4,2,2,2,2,2,3,3,3,0
4,2,2,2,2,3,3,3,3,0
4,2,2,2,3,3,3,3,3,0
4,2,2,3,3,3,3,3,3,0
4,2,3,3,3,3,3,3,3,2
4,3,3,3,3,3,3,3,3,0
4,3,3,3,3,3,3,3,4,0
4,3,3,3,3,3,3,4,4,0
4,3,3,3,3,3,4,4,4,0
4,3,3,3,3,4,4,4,4,0
4,3,3,3,4,4,4,4,4,0
4,3,3,4,4,4,4,4,4,0
4,3,4,4,4,4,4,4,4,0
4,4,4,4,4,4,4,4,4,0
and here is the puffer:

Code: Select all

x = 6, y = 4, rule = R_5_1
2.D2.D$D2.DC$D2.D.D$2.D!
Brian Prentice

Re: Random Three-State Rules

Posted: August 9th, 2013, 7:23 am
by bprentice
Extrementhusiast wrote:As for the SquareCell implementation, it would most likely have to remain three-state. (134 for three-state, 659 for four-state, 2474 for five-state, 7721 for six-state, and then it just gets impractical.)
I have a SquareCell implementation running now and it performs quite well even with six states. It can be run using any 8 neighbors selected from the 25 cell neighborhood. If anyone is interested I will make it available.

I noticed that the 4 and 5 state rule generating scripts posted above do not create rule tables with the correct length and contain duplicate entries. Here is a script that corrects that problem:

Code: Select all

from random import randint
import golly as g

def f(n):
  for i0 in range(noStates):
    for i1 in range(noStates):
      for i2 in range(noStates):
        for i3 in range(noStates):
          for i4 in range(noStates):
            for i5 in range(noStates):
              for i6 in range(noStates):
                for i7 in range(noStates):
                  if (i1 >= i0) and (i2 >= i1) and (i3 >= i2) and (i4 >= i3) and (i5 >= i4) and (i6 >= i5) and (i7 >= i6):
                    if (n > 0):
                      file.write('%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n' % (n, i0, i1, i2, i3, i4, i5, i6, i7, r()))
                    else:
                      s = i0 + i1 + i2 + i3 + i4 + i5 + i6 + i7
                      if s > 0:
                        file.write('%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n' % (n, i0, i1, i2, i3, i4, i5, i6, i7, r()))

def r():
  if randint(0, 2) == 0:
    return randint(0, noStates - 1)
  else:
    return 0

noStates = 5
file = open(g.getdir('rules') + 'test.table', 'w')
file.write('n_states:%d\n' % (noStates))
file.write('neighborhood:Moore\n')
file.write('symmetries:permute\n\n')
for i in range(noStates):
  f(i)
file.close()
g.new('testing rule')
g.setalgo('RuleTable')
g.setrule('test')
g.select([0, 0, 100, 100])
g.randfill(33)
g.select([])
g.fit()
Change line 27 to the number of states desired and place the script in your Scripts directory and connect it to the N key using the Keyboard option of the Preferences dialog. Then repeatedly press N followed by Return until an interesting rule shows up. When one does, simply rename file test.table in your Rules directory to save it.

For 3 states, the script works identically to the 3 state script I posted above.

Brian Prentice

Re: Random Three-State Rules

Posted: September 6th, 2013, 8:48 am
by hobbyprogrammer77
Here's a rule with a few oscillators and three spaceships, one of them with speed c/17:

Code: Select all

@RULE methuselahrule

@TABLE

n_states:3
neighborhood:Moore
symmetries:permute

0,0,0,0,0,0,0,0,1,0 
0,0,0,0,0,0,0,0,2,0 
0,0,0,0,0,0,0,1,1,0 
0,0,0,0,0,0,0,1,2,0 
0,0,0,0,0,0,0,2,2,0 
0,0,0,0,0,0,1,1,1,2 
0,0,0,0,0,0,1,1,2,2 
0,0,0,0,0,0,1,2,2,1 
0,0,0,0,0,0,2,2,2,2 
0,0,0,0,0,1,1,1,1,0 
0,0,0,0,0,1,1,1,2,0
0,0,0,0,0,1,1,2,2,2 
0,0,0,0,0,1,2,2,2,0 
0,0,0,0,0,2,2,2,2,1 
0,0,0,0,1,1,1,1,1,0
0,0,0,0,1,1,1,1,2,0 
0,0,0,0,1,1,1,2,2,1 
0,0,0,0,1,1,2,2,2,0 
0,0,0,0,1,2,2,2,2,2
0,0,0,0,2,2,2,2,2,0 
0,0,0,1,1,1,1,1,1,0 
0,0,0,1,1,1,1,1,2,0
0,0,0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2,2,2,2,0 
2,0,1,2,2,2,2,2,2,0
2,0,2,2,2,2,2,2,2,0 
2,1,1,1,1,1,1,1,1,0
2,1,1,1,1,1,1,1,2,0
2,1,1,1,1,1,1,2,2,0
2,1,1,1,1,1,2,2,2,0
2,1,1,1,1,2,2,2,2,0
2,1,1,1,2,2,2,2,2,0
2,1,1,2,2,2,2,2,2,0
2,1,2,2,2,2,2,2,2,0
2,2,2,2,2,2,2,2,2,0
pattern collection:

Code: Select all

x = 174, y = 10, rule = methuselahrule
6.2B$5.B2.B2.3B3.B6.2B15.AB$2A4.2B9.2A5.A6.3B6.BA10.2B7.AB7.2B13.BA$
2A16.B5.A7.3B6.B10.B10.B6.2A15.2A$40.A11.B10.A4.BA2.AB11.B$84.3A$172.
B$159.B12.B$158.BA12.2B$158.BA!
EDIT: Just found a 5-cell (5;3)c/70 knightship!
EDIT 2: There's also a kickback reaction!