How to Build Rule Tables?

For discussion of other cellular automata.
Post Reply
User avatar
Extrementhusiast
Posts: 1970
Joined: June 16th, 2009, 11:24 pm
Location: USA

How to Build Rule Tables?

Post by Extrementhusiast »

I was thinking of building a rule table, because of all of the rule tables posted on this board, but I don't know how to make any. Here is my objective:

State 0 and State 1 behave like Conway's Game of Life.
States 2 through n never change.

State 2 is the "birth-forcer" (will behave as described below).
State 3 is the "death-forcer" (equivalent to the "gray cells" in LifeHistory rule).
State 4 is the "birth-preventer" (no births are allowed in any of its eight neighbors).
State 5 is the "death-preventer" (once a cell is born into its neighborhood, it never dies).
State 6 is a combination of States 2 and 3.
State 7 is a combination of States 2 and 5.

This is how a lone State 2 cell behaves:

Code: Select all

000 111 101 010 111 101 010 111 101 010
020 121 020 121 121 020 121 121 020 121
000 111 101 010 111 101 010 111 101 010
I Like My Heisenburps! (and others)
Axaj
Posts: 231
Joined: September 26th, 2009, 12:23 am

Re: How to Build Rule Tables?

Post by Axaj »

The rule table repository has some good documentation, as well as the golly help file. You should check those out.
Image
User avatar
Tim Hutton
Posts: 64
Joined: May 20th, 2010, 7:30 am
Contact:

Re: How to Build Rule Tables?

Post by Tim Hutton »

Extrementhusiast wrote:I was thinking of building a rule table, because of all of the rule tables posted on this board, but I don't know how to make any. Here is my objective:

State 0 and State 1 behave like Conway's Game of Life.
States 2 through n never change.

State 2 is the "birth-forcer" (will behave as described below).
State 3 is the "death-forcer" (equivalent to the "gray cells" in LifeHistory rule).
State 4 is the "birth-preventer" (no births are allowed in any of its eight neighbors).
State 5 is the "death-preventer" (once a cell is born into its neighborhood, it never dies).
State 6 is a combination of States 2 and 3.
State 7 is a combination of States 2 and 5.

This is how a lone State 2 cell behaves:

Code: Select all

000 111 101 010 111 101 010 111 101 010
020 121 020 121 121 020 121 121 020 121
000 111 101 010 111 101 010 111 101 010
To turn your ideas into a rule table, you first need to concentrate on the cell that is to change. Instead of: "a 2 changes all 0 neighbors to 1" you need to think: "a 0 with one or more 2 neighbors becomes 1". And then you can start writing the rule table:

n_states:8
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}
0,2,a,b,c,d,e,f,g,1 # a 0 with one or more 2 neighbors (otherwise 0 or 1) becomes 1

Please note that this rule table takes advantage of some features due to arrive in Golly 2.2. With Golly 2.1 you can write:

n_states:8
neighborhood:Moore
symmetries:rotate8reflect
var a={0,1,2}
var b={0,1,2}
var c={0,1,2}
var d={0,1,2}
var e={0,1,2}
var f={0,1,2}
var g={0,1,2}
0,2,a,b,c,d,e,f,g,1 # a 0 with one or more 2 neighbors (otherwise 0 or 1) becomes 1

After that you'll need lots of experimentation and debugging to make sure it does what you expect.

I'm sure you've worked all this out by now but I thought it might be useful for others.

Tim
User avatar
Extrementhusiast
Posts: 1970
Joined: June 16th, 2009, 11:24 pm
Location: USA

Re: How to Build Rule Tables?

Post by Extrementhusiast »

Oh, and if a cell has a death-preventer and a death-forcer, (or the same thing with births), it doesn't change.
I Like My Heisenburps! (and others)
Axaj
Posts: 231
Joined: September 26th, 2009, 12:23 am

Re: How to Build Rule Tables?

Post by Axaj »

Golly 2.2 has permute? I must have it. When is the final release coming out?
Image
User avatar
Extrementhusiast
Posts: 1970
Joined: June 16th, 2009, 11:24 pm
Location: USA

Re: How to Build Rule Tables?

Post by Extrementhusiast »

OK, I've changed my formats slightly, so there are now 7 different states, and they are off, on, birth-forcer, death-forcer, combination of birth-forcer and death-forcer, blocker, and reactor.

The only things that have changed are that a couple of old states have been removed, the new blocker prevents any births on-site but otherwise does not participate in the action, and the new reactor behaves like an undying ON cell, even when death-forcers are next to it. (This is in the Moore neighborhood, and there are all possible symmetries.) Could somebody help me build a rule table? That would be really nice.

PS: I actually took out the death-preventer because of potential interactions with death-forcers.
I Like My Heisenburps! (and others)
User avatar
Extrementhusiast
Posts: 1970
Joined: June 16th, 2009, 11:24 pm
Location: USA

Re: How to Build Rule Tables?

Post by Extrementhusiast »

I've been thinking about this for three months, on and off, and I'm finally starting to get it. But I still have two questions: What happens if you run out of letters, and can you use the same letter twice in the same grouping (like 0,a,a,b,b,c,d,e,f,1)?
I Like My Heisenburps! (and others)
p46beth
Posts: 345
Joined: June 18th, 2010, 8:18 pm

Re: How to Build Rule Tables?

Post by p46beth »

Using multiple letters without spaces between them counts as a single variable. If you want multiple birth preventer states, for example, but don't have enough letters, you could call a new variable birthpreventer (which could be defined as any of the birth-preventer states). Or, you could simply call it bp.
Post Reply