Way to run 2 different life rules in same simulation?

For general discussion about Conway's Game of Life.
Post Reply
Platypus5
Posts: 33
Joined: August 15th, 2011, 12:56 pm

Way to run 2 different life rules in same simulation?

Post by Platypus5 » December 22nd, 2011, 2:55 pm

I know of something called the "powder toy," and they have a section of various life-like rules. An interesting thing, however, is that you can run, say, 2x2 at the same time you run GoL at the same time you run Day and Night. They even have codes on how to deal with each other if the two collide or want to reproduce in the same spot. To tell the differences, different rules are color coded

Would it be possible to code this ability into Golly? I know it can be done in other systems, so if someone could tell me how to modify my Golly to do this, that would be great.

Thanks!

User avatar
Wojowu
Posts: 210
Joined: October 1st, 2011, 1:24 pm

Re: Way to run 2 different life rules in same simulation?

Post by Wojowu » December 22nd, 2011, 4:14 pm

I've installed Powder Toy, but I don't know exactly how Life rules collide. But here is rule table made by edwardfanboy simulating Seeds and Conway's Life simultaneously and this behaves exactly like ones in Powder Toy

Code: Select all

#
#Rule table by edwardfanboy 
#
#rules: 6
#
# Golly rule-table format.
# Each rule: C,NW,N,NE,E,SE,S,SW,W,C'
#
# Default for transitions not listed: no change
#
# Variables are bound within each transition.
# For example, if a={1,2} then 4,a,0->a represents
# two transitions: 4,1,0->1 and 4,2,0->2
# (This is why we need to repeat the variables below.
#  In this case the method isn't really helping.)
#
# 1 simulates the Seeds rule,
# 2 simulates Conway Life.

n_states: 3
neighborhood:Moore
symmetries:permute
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}
var h = {0,1,2}

var i = {1,2}
var j = {1,2}
var k = {1,2}
var l = {1,2}
# Seeds rule: Die always
1,a,b,c,d,e,f,g,h,0
# Seeds rule: Born when 2 cells are alive and at least one is Seeds
0,i,1,0,0,0,0,0,0,1
# Conway Life: Born when 3 cells are alive and at least two are Life
0,i,2,2,0,0,0,0,0,2
# Conway Life: Die when it is on its own
2,0,0,0,0,0,0,0,0,0
# Conway Life: Die when 1 cell is alive
2,i,0,0,0,0,0,0,0,0
# Conway Life: Die when 4 cells or more are alive
2,i,j,k,l,a,b,c,d,0
I also want to know how rules collide. I heard that cell borns in given rule if majority of neighbors cells are of given rule, but I don't know what happens if there is one cell of Seeds(/2) and some another B2 rule. It is hard to guess which cell will born if two rules are able to give birth in same point
First question ever. Often referred to as The Question. When this question is asked in right place in right time, no one can lie. No one can abstain. But when The Question is asked, silence will fall. Silence must fall. The Question is: Doctor Who?

Platypus5
Posts: 33
Joined: August 15th, 2011, 12:56 pm

Re: Way to run 2 different life rules in same simulation?

Post by Platypus5 » December 22nd, 2011, 4:33 pm

Cool! Given that seeds is based off of the same basic live/die based on neighbors concept, I imagine this table could be modified for high life, day and night, 2x2, etc. However, I actually don't know how to modify that script...... :( still, that would be great!

I imagine that if two cells wanted to reproduce in the same area, a "majority wins" system by itself would be bad for the reason you stated.

I imagine instead/in addition to what you said i s that 1. Neither cell gets to reproduce or 2. The rules follow a pre-determined hierarchy.

Also, where would I place this code in the Golly files?
Unsorted C/3 search output? Somewhat newish C/3 edgesparker? give it to me, and my "battleships" just may have a use for it. :)

User avatar
Wojowu
Posts: 210
Joined: October 1st, 2011, 1:24 pm

Re: Way to run 2 different life rules in same simulation?

Post by Wojowu » December 22nd, 2011, 5:23 pm

Save file as seedlife.table in folder "Rules" in Golly files. Also, I think cells reproduce in some pre-determined way if they collide. I tried it with two long strings of cells. One of HighLife one of Move. Between them were dead cells with 6 neighbors, so both types can reproduce. They have 3 HLife neighbors and 3 Move neighbors. Only thing I know that this is not some random scheme, because pattern stays symmetrical. I know nothing more, because in Powder Toy we can't simulate step by step. Also, I gave you rule table, not Python script. This is list of transitions which are used during pattern evolution. In Golly help there is more about it, if you want
First question ever. Often referred to as The Question. When this question is asked in right place in right time, no one can lie. No one can abstain. But when The Question is asked, silence will fall. Silence must fall. The Question is: Doctor Who?

Platypus5
Posts: 33
Joined: August 15th, 2011, 12:56 pm

Re: Way to run 2 different life rules in same simulation?

Post by Platypus5 » December 22nd, 2011, 5:49 pm

Wojowu wrote: I know nothing more, because in Powder Toy we can't simulate step by step.
Just to let you know, you can actually: Press F while it is paused to move forward one step. You cannot undo that, though.

Thanks for everything.
Unsorted C/3 search output? Somewhat newish C/3 edgesparker? give it to me, and my "battleships" just may have a use for it. :)

User avatar
Wojowu
Posts: 210
Joined: October 1st, 2011, 1:24 pm

Re: Way to run 2 different life rules in same simulation?

Post by Wojowu » December 23rd, 2011, 5:47 am

Thank you! I always thought you can't simulate step-by-step (I haven't found anything about that) but now I see it is possible! Now I found interesting thing about colliding rules: when empty cell can be born in 2 different ways (two rules are colliding) and there is same number of neighbors (e.g. 3 HLife and 3 Move), there is hierarchy saying what rule cell will be: it is list of rules in Powder Toy. Our cell will be born as HLife, because this rule is before Move. List of rules in this hierarchy is on end of post. BUT if more than 3 rules are colliding and there is same number of neighbors of all rules, then cell won't born, because it needs majority (i.e. half or more) of cells in one rule.
Hierarchy of rules:
Game Of Life, HighLife, Assimilation, 2x2, Day and Night, Amoeba, Move, Pseudo Life, Diamoeba, 34, Long Life, Stains, Seeds, Maze, Coagulation, Walled City, Gnarl, Replicator, Mystery, 37/3458/4, 3/124/3, 278/3456/6, 34/12/3, 246/6/3
First question ever. Often referred to as The Question. When this question is asked in right place in right time, no one can lie. No one can abstain. But when The Question is asked, silence will fall. Silence must fall. The Question is: Doctor Who?

edwardfanboy
Posts: 80
Joined: September 16th, 2011, 10:29 pm

Re: Way to run 2 different life rules in same simulation?

Post by edwardfanboy » December 23rd, 2011, 9:50 pm


Post Reply