Page 1 of 1

[Golly] "LifeHistory" for CA other than Life

Posted: August 5th, 2013, 7:59 am
by DivusIulius
Hello to all:

Just a quick question. Is there a trick to get the LifeHistory functionality for an arbitrary cellular automaton e.g. B38/S238?

I'm trying these two commands successively:

Code: Select all

g_setrule("B357/S238");
g_setrule("LifeHistory");
But it seems as if LifeHistory is hardwired to B3/S23. :cry:

Thanks in advance!

Re: [Golly] "LifeHistory" for CA other than Life

Posted: August 10th, 2013, 7:56 pm
by dvgrn
DivusIulius wrote:Just a quick question. Is there a trick to get the LifeHistory functionality for an arbitrary cellular automaton e.g. B38/S238?
It's not exactly a trick, but you would have to write a separate LifeHistory rule for each base rule -- LifeHistoryB38S238, etc. Unfortunately it's a bit more complicated to write LifeHistory versions of rules with more possible B and S options.

On the other hand, I now notice that I wrote the original LifeHistory rule before the "permute" option was available (see the RoadMap). Looks like the current LifeHistory.rule is just a carry-over of the old rule to .rule format, so the list of rules is unnecessarily complicated now.

It's certainly possible to write a script to generate a LifeHistory rule for any B*/S* rule, using the "permute" symmetry option. No doubt the script could be added to Golly''s TableGenerators folder if someone wants to write it. Anybody care to give it a try?

Re: [Golly] "LifeHistory" for CA other than Life

Posted: August 11th, 2013, 10:44 am
by DivusIulius
dvgrn wrote:It's not exactly a trick, but you would have to write a separate LifeHistory rule for each base rule -- LifeHistoryB38S238, etc. Unfortunately it's a bit more complicated to write LifeHistory versions of rules with more possible B and S options.
Thank you for your detailed answer. :)

Re: [Golly] "LifeHistory" for CA other than Life

Posted: August 11th, 2013, 1:48 pm
by Kasuha
LifeHistory is just a simple extension of the standard B3/S23 rule - instead of two cell states, on and off switching one to another, it uses a slightly more complicated state automaton. The states are:
0 - standard OFF state
1 - standard ON state
2 - OFF cell that was ON some time in the past
3 - ON cell, marked
4 - OFF cell, marked
5 - ON cell, marked specially
6 - boundary cell
The state changes (induced by rules) then are
ON states changing to OFF states:
1 -> 2
3 -> 4
5 -> 4
OFF states changing to ON states:
0 -> 1
2 -> 1
4 -> 3
(boundary cell never changes)

so instead of state changes 0 -> 1 and 1 -> 0 defined according to CA rules, you need to define each rule three times, separately for each ON resp. OFF state to change it to appropriate opposite state.

Re: [Golly] "LifeHistory" for CA other than Life

Posted: August 12th, 2013, 6:26 pm
by DivusIulius
Kasuha wrote:LifeHistory is just a simple extension of the standard B3/S23 rule [...] you need to define each rule three times, separately for each ON resp. OFF state to change it to appropriate opposite state.
Thank you very much! :)