[Golly] "LifeHistory" for CA other than Life

For scripts to aid with computation or simulation in cellular automata.
Post Reply
User avatar
DivusIulius
Posts: 89
Joined: April 1st, 2009, 11:23 am
Contact:

[Golly] "LifeHistory" for CA other than Life

Post by DivusIulius » August 5th, 2013, 7:59 am

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!

User avatar
dvgrn
Moderator
Posts: 6277
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

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

Post by dvgrn » August 10th, 2013, 7:56 pm

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?

User avatar
DivusIulius
Posts: 89
Joined: April 1st, 2009, 11:23 am
Contact:

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

Post by DivusIulius » August 11th, 2013, 10:44 am

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. :)

Kasuha
Posts: 55
Joined: November 1st, 2012, 11:39 am

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

Post by Kasuha » August 11th, 2013, 1:48 pm

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.

User avatar
DivusIulius
Posts: 89
Joined: April 1st, 2009, 11:23 am
Contact:

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

Post by DivusIulius » August 12th, 2013, 6:26 pm

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! :)

Post Reply