Page 1 of 1
How to Build Rule Tables?
Posted: June 8th, 2010, 12:51 am
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
Re: How to Build Rule Tables?
Posted: June 8th, 2010, 6:15 pm
by Axaj
The rule table repository has some good documentation, as well as the golly help file. You should check those out.
Re: How to Build Rule Tables?
Posted: June 9th, 2010, 9:21 am
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
Re: How to Build Rule Tables?
Posted: June 9th, 2010, 11:24 am
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.
Re: How to Build Rule Tables?
Posted: June 9th, 2010, 10:09 pm
by Axaj
Golly 2.2 has permute? I must have it. When is the final release coming out?
Re: How to Build Rule Tables?
Posted: October 12th, 2010, 12:24 am
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.
Re: How to Build Rule Tables?
Posted: January 9th, 2011, 2:22 am
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)?
Re: How to Build Rule Tables?
Posted: January 9th, 2011, 12:59 pm
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.