## Making a rule table...

### Making a rule table...

Hello. I was wondering if somebody could make a rule table emulating the Triad rule in MCell. Any help will be accepted!

I know the general behavior of the rule, but I am lost as to how to translate it to a .table format.

The rule is behaves exactly the same as Brian's Brain, with 2 colors. States 1 (red) and 3 (blue) are on cells; 2 (dark red) & 4 (dark blue) are dying cells; when 1 and 3 interact, State 5 (Yellow) is produced.

I know the general behavior of the rule, but I am lost as to how to translate it to a .table format.

The rule is behaves exactly the same as Brian's Brain, with 2 colors. States 1 (red) and 3 (blue) are on cells; 2 (dark red) & 4 (dark blue) are dying cells; when 1 and 3 interact, State 5 (Yellow) is produced.

Why hasn't a glider exploded yet?

- Extrementhusiast
**Posts:**1904**Joined:**June 16th, 2009, 11:24 pm**Location:**USA

### Re: Making a rule table...

I had this same problem earlier, but I also got help with this. I'm not sure if this is the rule you are specifying, but I'll do my best:
Save this as

And for the colors:
Save this as

Code: Select all

```
n_states:6
neighborhood:Moore
symmetries:permute
var a={0,1,2,3,4,5}
var b={a}
var c={a}
var d={a}
var e={a}
var f={a}
var g={a}
var h={a}
var i={0,2,4,5}
var j={i}
var k={i}
var L={i}
var m={i}
var n={i}
var o={i}
var p={i}
# Birth
0,1,1,i,j,k,L,m,n,1
0,3,3,i,j,k,L,m,n,3
0,1,3,i,j,k,L,m,n,5
# Survival (none)
1,a,b,c,d,e,f,g,h,2
2,a,b,c,d,e,f,g,h,0
3,a,b,c,d,e,f,g,h,4
4,a,b,c,d,e,f,g,h,0
```

*triad.rle*.And for the colors:

Code: Select all

```
color = 1 255 0 0
color = 2 128 0 0
color = 3 0 0 255
color = 4 0 0 128
color = 5 255 255 0
```

*triad.colors*.I Like My Heisenburps! (and others)

### Re: Making a rule table...

That's almost exactly what I need! Just one thing though: 5 doesn't act as a still life; it moves with other patterns, and makes them behave differently. Other than that, it's great!

Run this pattern in MCell to see what I mean.
You'll see spaceships emitting yellow cells. These spaceships are exhibiting the behavior that I seek with 1,3,& 5.

Run this pattern in MCell to see what I mean.

Code: Select all

```
#MCell 4.20
#GAME User DLL
#RULE Triad
#BOARD 320x240
#WRAP 1
#CCOLORS 6
#D Red and Blue never fought it out this good!
#D
#L 14.CC$.EE11.DDE$ABDCE8.C.BE$AB.CDBE.EE..D$4.CD.CDBCC$5.CD..DD$7.CD.C
```

Last edited by 12Glider on April 13th, 2011, 7:00 pm, edited 1 time in total.

Why hasn't a glider exploded yet?

### Re: Making a rule table...

I did find a nice line stretcher though.

Code: Select all

```
x = 23, y = 49, rule = Triad
15.BA$15.BA$8.B2.B2.A$7.A5.BA$.B6.BA2B3.B2.BA$2A7.A3.2B2.2A.BA$.B.B7.
B2.2A2.BA.BA$2.A13.BA3.BA$14.BA$12.BA$B3.A.BA2.BA$2.2A2B2.BA$.2B3.BA$
4.BA$2.BA$.BA18$.DC$2.DC$4.DC$.2D3.DC$2.2C2D2.DC$D3.C.DC2.DC$12.DC$
14.DC$2.C13.DC3.DC$.D.D7.D2.2C2.DC.DC$2C7.C3.2D2.2C.DC$.D6.DC2D3.D2.D
C$7.C5.DC$8.D2.D2.C$15.DC$15.DC!
```

Why hasn't a glider exploded yet?

- Extrementhusiast
**Posts:**1904**Joined:**June 16th, 2009, 11:24 pm**Location:**USA

### Re: Making a rule table...

That is actually FAR TOO LARGE! It's actually so small that I could fit it in an ASCII:
Perhaps you meant this?
Or perhaps this?

Code: Select all

```
42
42
55
31
31
```

Code: Select all

```
n_states:6
neighborhood:Moore
symmetries:permute
var a={0,1,2,3,4,5}
var b={a}
var c={a}
var d={a}
var e={a}
var f={a}
var g={a}
var h={a}
var i={0,2,4}
var j={i}
var k={i}
var L={i}
var m={i}
var n={i}
var o={i}
var p={i}
# Birth
0,1,1,i,j,k,L,m,n,1
0,3,3,i,j,k,L,m,n,3
0,1,3,i,j,k,L,m,n,5
0,1,5,i,j,k,L,m,n,1
0,3,5,i,j,k,L,m,n,3
# Survival (none)
1,a,b,c,d,e,f,g,h,2
2,a,b,c,d,e,f,g,h,0
3,a,b,c,d,e,f,g,h,4
4,a,b,c,d,e,f,g,h,0
```

Code: Select all

```
n_states:6
neighborhood:Moore
symmetries:permute
var a={0,1,2,3,4,5}
var b={a}
var c={a}
var d={a}
var e={a}
var f={a}
var g={a}
var h={a}
var i={0,2,4,5}
var j={i}
var k={i}
var L={i}
var m={i}
var n={i}
var o={i}
var p={i}
# Birth
0,1,1,i,j,k,L,m,n,1
0,3,3,i,j,k,L,m,n,3
0,1,3,i,j,k,L,m,n,5
0,1,5,i,j,k,L,m,n,1
0,3,5,i,j,k,L,m,n,3
# Survival (none)
1,a,b,c,d,e,f,g,h,2
2,a,b,c,d,e,f,g,h,0
3,a,b,c,d,e,f,g,h,4
4,a,b,c,d,e,f,g,h,0
```

I Like My Heisenburps! (and others)

### Re: Making a rule table...

Neither of these are rule tables exhibit the same behavior as the one 12Glider is referring to. From what I've seen, any state 5 cells that are born one generation die immediately after.Perhaps you meant this?Or perhaps this?Code: Select all

`n_states:6 neighborhood:Moore symmetries:permute var a={0,1,2,3,4,5} var b={a} var c={a} var d={a} var e={a} var f={a} var g={a} var h={a} var i={0,2,4} var j={i} var k={i} var L={i} var m={i} var n={i} var o={i} var p={i} # Birth 0,1,1,i,j,k,L,m,n,1 0,3,3,i,j,k,L,m,n,3 0,1,3,i,j,k,L,m,n,5 0,1,5,i,j,k,L,m,n,1 0,3,5,i,j,k,L,m,n,3 # Survival (none) 1,a,b,c,d,e,f,g,h,2 2,a,b,c,d,e,f,g,h,0 3,a,b,c,d,e,f,g,h,4 4,a,b,c,d,e,f,g,h,0`

Code: Select all

`n_states:6 neighborhood:Moore symmetries:permute var a={0,1,2,3,4,5} var b={a} var c={a} var d={a} var e={a} var f={a} var g={a} var h={a} var i={0,2,4,5} var j={i} var k={i} var L={i} var m={i} var n={i} var o={i} var p={i} # Birth 0,1,1,i,j,k,L,m,n,1 0,3,3,i,j,k,L,m,n,3 0,1,3,i,j,k,L,m,n,5 0,1,5,i,j,k,L,m,n,1 0,3,5,i,j,k,L,m,n,3 # Survival (none) 1,a,b,c,d,e,f,g,h,2 2,a,b,c,d,e,f,g,h,0 3,a,b,c,d,e,f,g,h,4 4,a,b,c,d,e,f,g,h,0`

- Extrementhusiast
**Posts:**1904**Joined:**June 16th, 2009, 11:24 pm**Location:**USA

### Re: Making a rule table...

(I don't use MCell, so that's why I'm having trouble figuring out the exact rule.) From flipper77's description, here is another table:
Surprisingly, the second variation that I posted can emulate Wireworld, as far as I know. Here is an XOR gate:
In the same variation, here is an unstable wickstretcher base:

Code: Select all

```
n_states:6
neighborhood:Moore
symmetries:permute
var a={0,1,2,3,4,5}
var b={a}
var c={a}
var d={a}
var e={a}
var f={a}
var g={a}
var h={a}
var i={0,2,4}
var j={i}
var k={i}
var L={i}
var m={i}
var n={i}
var o={i}
var p={i}
# Birth
0,1,1,i,j,k,L,m,n,1
0,3,3,i,j,k,L,m,n,3
0,1,3,i,j,k,L,m,n,5
# Survival (none)
1,a,b,c,d,e,f,g,h,2
2,a,b,c,d,e,f,g,h,0
3,a,b,c,d,e,f,g,h,4
4,a,b,c,d,e,f,g,h,0
5,a,b,c,d,e,f,g,h,0
```

Code: Select all

```
x = 20, y = 33, rule = (rulename)
7E$EBA3.2E$6E.E$5.E.E$4.2E.3E$4.E4.11E$4.E.2E11.E$4.E4.11E$4.2E.3E$5.
E.E$6E.E$EBA3.2E$7E8$7E$E2B3.2E$6E.E$5.E.E$4.2E.3E$4.E4.11E$4.E.2E11.
E$4.E4.11E$4.2E.3E$5.E.E$6E.E$EBA3.2E$7E!
```

Code: Select all

```
x = 18, y = 14, rule = (rulename)
.A14.A$A16EA$2A.B3A.2B.3AB.2A$.2BA2.B.2B.B2.A2B$.A4.AB2.BA4.A$7.A2.A$
6.B4.B$6.AB2.BA$7.A2.A$6.B4.B$6.AB2.BA$7.A2.A$8.2B$8.2A!
```

I Like My Heisenburps! (and others)

### Re: Making a rule table...

This one doesn't work right either. Try downloading the setup for MCell from this site by clicking the "MCell setup" link, and install it, then after it's all set up, then copy and paste the MCell pattern above in 12Glider's last post by going to File > Open Special > Open from clipboard.

- Extrementhusiast
**Posts:**1904**Joined:**June 16th, 2009, 11:24 pm**Location:**USA

### Re: Making a rule table...

Is this simply a three-colored variation on Brian's Brain?

Since this is taking such a long time, I'll just provide the general format. (I also do not wish to download MCell just to look at a particular rule.) First, start with this "heading":
This assumes that there are five ON states and one OFF state, that it is in the Moore neighborhood (like the original Brian's Brain), and that any rearrangement of a specific cell's neighbors generates the same central cell one generation later (also like the original Brian's Brain). To comment out a line, insert a number sign, a space, and the comment, like this:
Now comes the harder part.

There are actually two different parts. The first part is the general cellstate-change rules. To do this, insert this in:
Replace "center-start" with the cellstate that you want to change. Replace "center-end" with the final result. Replace "01"-"08" with whatever cells are needed to change the cell from the "center-start" cellstate to the "center-end" cellstate. This will most likely be confusing, so I'll give an example:
This means that a cell of state 0 (empty) needs one cell of state 1 and one cell of state 2, and six cells of state 0, to change to state 3. Multiple changes can be implemented for the same cellstate, as in this example of 3-4 Life:
One more thing: if a cell in the final rule does not satisfy any condition (like if there are five live neighbors around a dead cell in 3-4 Life), it stays the same.

Now for the second part. If a neighbor can be any value out of a particular set of values, do something like this, as in another example from 3-4 Life:
You could even define something as crazy as this:
This would mean that in the cellstate-change condition, a particular neighbor can be any of states 2, 5, 7, 8, or 11, but none others.If there are multiple cellstate sets, use a different sequence of letter without spaces after "var", like this:
If there is more than one of the same variation needed, do something like this (from LongLife, B345/S5):
One more thing: I tend to use a capital L instead of a lowercase l, because in my computer's font, the "l" and the "1" look identical. I hope this explanation was easy enough for you to understand, and yet thorough enough to cover your future rule-table-making adventures.

Since this is taking such a long time, I'll just provide the general format. (I also do not wish to download MCell just to look at a particular rule.) First, start with this "heading":

Code: Select all

```
n_states:6
neighborhood:Moore
symmetries:permute
```

Code: Select all

`# This is an example comment.`

There are actually two different parts. The first part is the general cellstate-change rules. To do this, insert this in:

Code: Select all

`center-start,01,02,03,04,05,06,07,08,center-end`

Code: Select all

`0,1,2,0,0,0,0,0,0,3`

Code: Select all

```
0,1,1,1,0,0,0,0,0,1
0,1,1,1,1,0,0,0,0,1
```

Now for the second part. If a neighbor can be any value out of a particular set of values, do something like this, as in another example from 3-4 Life:

Code: Select all

```
var a={0,1}
0,1,1,1,a,0,0,0,0,1
```

Code: Select all

`var a={2,5,7,8,11}`

Code: Select all

```
var a={0,1,3}
var b={1,2,7}
var ab={0,1,2,3,7}
```

Code: Select all

```
var a={0,1}
var b={a}
0,1,1,1,a,b,0,0,0,1
```

Last edited by Extrementhusiast on April 14th, 2011, 3:55 pm, edited 1 time in total.

I Like My Heisenburps! (and others)

### Re: Making a rule table...

This rule is actually a little bit different, in the fact that if the different cells are pack close enough, they make different spaceships.

To demonstrate this, I'll make a little drawing of sorts:

....

.12.

.12.

.... This is the basic block ship in BB. p1.

....

.14.

.12.

.... This is the block ship in Triad, with a state 2 cell being replaced with a state 4 cell. This is actually p2, because a generation later, this appears:

..55

.124

.12.

....

To demonstrate this, I'll make a little drawing of sorts:

....

.12.

.12.

.... This is the basic block ship in BB. p1.

....

.14.

.12.

.... This is the block ship in Triad, with a state 2 cell being replaced with a state 4 cell. This is actually p2, because a generation later, this appears:

..55

.124

.12.

....

Why hasn't a glider exploded yet?

### Re: Making a rule table...

I think I got the ruletable right:
Since this is my first real ruletable, I'm sure this could be compressed further, but I believe it works since it functions the same as in Mcell

EDIT:

Very small p2 oscillator
EDIT2:

Here's a more compact ruletable

Code: Select all

```
n_states:6
neighborhood:Moore
symmetries:permute
var a={0,1,2,3,4,5}
var b={a}
var c={a}
var d={a}
var e={a}
var f={a}
var g={a}
var h={a}
var i={0,1,2,3,4}
var j={i}
var k={i}
var l={i}
var m={i}
var n={i}
var o={i}
var p={i}
var q={0,2,4,5}
var r={q}
var s={q}
var aa={q}
var ab={q}
var ac={q}
var ad={q}
var ae={q}
var af={1,2}
var ag={1,3}
#No birth
0,q,r,s,aa,ab,ac,ad,ae,0
#Birth
0,ag,ag,q,r,s,aa,ab,ac,ag
0,1,1,3,q,r,s,aa,ab,1
0,3,3,1,q,r,s,aa,ab,3
0,1,3,q,r,s,aa,ab,ac,5
0,1,3,1,3,q,r,s,aa,5
#Survival change
1,5,j,k,l,m,n,o,p,3
3,5,j,k,l,m,n,o,p,1
#Transition
1,a,b,c,d,e,f,g,h,2
3,a,b,c,d,e,f,g,h,4
#Death
q,a,b,c,d,e,f,g,h,0
```

EDIT:

Very small p2 oscillator

Code: Select all

```
x = 3, y = 2, rule = Triad
.EA$C!
```

Here's a more compact ruletable

Code: Select all

```
n_states:6
neighborhood:Moore
symmetries:permute
var a={0,1,2,3,4,5}
var b={a}
var c={a}
var d={a}
var e={a}
var f={a}
var g={a}
var h={a}
var i={0,1,2,3,4}
var j={i}
var k={i}
var l={i}
var m={i}
var n={i}
var o={i}
var p={i}
var q={0,2,4,5}
var r={q}
var s={q}
var t={q}
var u={q}
var v={q}
var w={q}
var x={q}
var y={1,2}
var z={1,3}
#Birth
0,z,z,q,r,s,t,u,v,z
0,1,1,3,q,r,s,t,u,1
0,3,3,1,q,r,s,t,u,3
0,1,3,q,r,s,t,u,v,5
0,1,3,1,3,q,r,s,t,5
#Survival change
1,5,j,k,l,m,n,o,p,3
3,5,j,k,l,m,n,o,p,1
#Transition
1,a,b,c,d,e,f,g,h,2
3,a,b,c,d,e,f,g,h,4
#Death
q,a,b,c,d,e,f,g,h,0
```

### Re: Making a rule table...

Thanks a bunch! It works exactly how I wanted it!flipper77 wrote:I think I got the ruletable right:Since this is my first real ruletable, I'm sure this could be compressed further, but I believe it works since it functions the same as in McellCode: Select all

`n_states:6 neighborhood:Moore symmetries:permute var a={0,1,2,3,4,5} var b={a} var c={a} var d={a} var e={a} var f={a} var g={a} var h={a} var i={0,1,2,3,4} var j={i} var k={i} var l={i} var m={i} var n={i} var o={i} var p={i} var q={0,2,4,5} var r={q} var s={q} var aa={q} var ab={q} var ac={q} var ad={q} var ae={q} var af={1,2} var ag={1,3} #No birth 0,q,r,s,aa,ab,ac,ad,ae,0 #Birth 0,ag,ag,q,r,s,aa,ab,ac,ag 0,1,1,3,q,r,s,aa,ab,1 0,3,3,1,q,r,s,aa,ab,3 0,1,3,q,r,s,aa,ab,ac,5 0,1,3,1,3,q,r,s,aa,5 #Survival change 1,5,j,k,l,m,n,o,p,3 3,5,j,k,l,m,n,o,p,1 #Transition 1,a,b,c,d,e,f,g,h,2 3,a,b,c,d,e,f,g,h,4 #Death q,a,b,c,d,e,f,g,h,0`

EDIT:

Very small p2 oscillatorEDIT2:Code: Select all

`x = 3, y = 2, rule = Triad .EA$C!`

Here's a more compact ruletableCode: Select all

`n_states:6 neighborhood:Moore symmetries:permute var a={0,1,2,3,4,5} var b={a} var c={a} var d={a} var e={a} var f={a} var g={a} var h={a} var i={0,1,2,3,4} var j={i} var k={i} var l={i} var m={i} var n={i} var o={i} var p={i} var q={0,2,4,5} var r={q} var s={q} var t={q} var u={q} var v={q} var w={q} var x={q} var y={1,2} var z={1,3} #Birth 0,z,z,q,r,s,t,u,v,z 0,1,1,3,q,r,s,t,u,1 0,3,3,1,q,r,s,t,u,3 0,1,3,q,r,s,t,u,v,5 0,1,3,1,3,q,r,s,t,5 #Survival change 1,5,j,k,l,m,n,o,p,3 3,5,j,k,l,m,n,o,p,1 #Transition 1,a,b,c,d,e,f,g,h,2 3,a,b,c,d,e,f,g,h,4 #Death q,a,b,c,d,e,f,g,h,0`

Why hasn't a glider exploded yet?

### Re: Making a rule table...

Thank you, but I'm posting an updated version of the ruletable since I found that also 3 and 4 cells of states 1 and 3 produce 5's as well. I added these 2 transitions:
To make this more accurate ruletable:
If you can run Mcell on your computer, you can see the difference when running 90deg_smship_seeds.mcl:
I thinking this is what I want to achieve, but it's possible there may be somthing else missing, but I'm thinking there will be no such thing.

Code: Select all

```
0,1,1,1,3,3,3,s,t,5
0,1,1,1,1,3,3,3,3,5
```

Code: Select all

```
n_states:6
neighborhood:Moore
symmetries:permute
var a={0,1,2,3,4,5}
var b={a}
var c={a}
var d={a}
var e={a}
var f={a}
var g={a}
var h={a}
var i={0,1,2,3,4}
var j={i}
var k={i}
var l={i}
var m={i}
var n={i}
var o={i}
var p={i}
var q={0,2,4,5}
var r={q}
var s={q}
var t={q}
var u={q}
var v={q}
var w={1,3}
#Birth
0,w,w,q,r,s,t,u,v,w
0,1,1,3,q,r,s,t,u,1
0,3,3,1,q,r,s,t,u,3
0,1,3,q,r,s,t,u,v,5
0,1,1,3,3,q,r,s,t,5
0,1,1,1,3,3,3,s,t,5
0,1,1,1,1,3,3,3,3,5
#Survival change
1,5,j,k,l,m,n,o,p,3
3,5,j,k,l,m,n,o,p,1
#Transition
1,a,b,c,d,e,f,g,h,2
3,a,b,c,d,e,f,g,h,4
#Death
q,a,b,c,d,e,f,g,h,0
```

Code: Select all

```
#MCell 4.20
#GAME User DLL
#RULE Triad
#BOARD 400x400
#WRAP 1
#CCOLORS 6
#D 90° parting small ship seeds
#D
#D Lionel Bonnetier
#D Spring 1996, revised March 2000
#L .AC$AAC$CCA13$18.C$17.ECC$16.AA$17.A10$35.C$34.EC$33.AA
```