ConwayLife.com - A community for Conway's Game of Life and related cellular automata
Home  •  LifeWiki  •  Forums  •  Download Golly

Rule request thread

For discussion of other cellular automata.

Re: Rule request thread

Postby 83bismuth38 » April 10th, 2017, 10:08 am

dvgrn wrote:
83bismuth38 wrote:What about a rock-paper-scissors kind of rule? i.e. A>B>C>A, meaning a kills b, b kills c, and c kills a.

But does each color simply ignore the next color -- e.g., does a Rock-colored glider plow right through a Scissors-colored still life without noticing it's there? Or is a Rock-colored glider affected for one tick by the presence of Scissors ON cells, before the Scissors cells die?

Yeah, it just plows right through.

dvgrn wrote:
83bismuth38 wrote:I tried messing around with the code but it won't work.

What did you try, and in what way did it not work?


replaced the 'i's with 'j's and 'k's, BUT i did notice something interesting-- the rules for each changed, so golly was running 3 different rules in the same universe, AT THE SAME TIME! this really surprised me, but forgot to post it.
x = 8, y = 10, rule = B3/S23
3b2o$3b2o$2b3o$4bobo$2obobobo$3bo2bo$2bobo2bo$2bo4bo$2bo4bo$2bo!

also, why does it say 'bo' so much?
User avatar
83bismuth38
 
Posts: 120
Joined: March 2nd, 2017, 4:23 pm
Location: Still sitting around in Sagittarius A...

Re: Rule request thread

Postby dvgrn » April 10th, 2017, 9:52 pm

83bismuth38 wrote:Yeah, it just plows right through.

Okay, let's see how long it takes. We can start with ThreeDeadlyEnemies, but we might need some new variables, or we might not need some of the variables we have, depending on which rule variant we set up. There are still a couple of reasonable possibilities:

1) State 1 kills State 2 when it touches it, and thinks it's an OFF state, but State 2 thinks State 1 is an ON state (so three-neighbor births will still happen when an OFF cell has a combination of State 1 and State 2 neighbors)
or
2) State 1 kills State 2, but State 2 thinks State 1 is an OFF state

I'll try #2, because there are just a couple of complicated parts. Here's a test pattern:

x = 94, y = 40, rule = RockScissorsPaperLife
38.B.B$38.2B$39.B5$82.A.A$82.A.A$82.3A6$23.A.A$23.2A$24.A$73.B.B15.C.
C$73.B.B15.C.C$73.3B15.3C$17.B$17.2B$16.B.B14$.C$.2C$C.C!

With the three pi explosions all near each other, they all affect one color and are affected by another, so you don't get any standard pi-debris shapes. But if you delete any one out of the three, one of the other two should dominate and not even notice that the remaining color is there, so you'll get one standard pi debris shape.

Here's what I think is the rule -- EDIT: patched 4/19/2017 in response to bug report below.

@RULE RockScissorsPaperLife

@TABLE

n_states:4
neighborhood:Moore
symmetries:permute

var a={0,1,2,3}
var b={0,1,2,3}
var c={0,1,2,3}
var d={0,1,2,3}
var e={0,1,2,3}
var f={0,1,2,3}
var g={0,1,2,3}
var h={0,1,2,3}
# Dead cells for State 1
var i={0,2,3}
var j={0,2,3}
var k={0,2,3}
var l={0,2,3}
var m={0,2,3}
var n={0,2,3}
# Dead cells for State 2
var o={0,1,3}
var p={0,1,3}
var q={0,1,3}
var r={0,1,3}
var s={0,1,3}
var t={0,1,3}
# Dead cells for State 3
var u={0,1,2}
var v={0,1,2}
var w={0,1,2}
var x={0,1,2}
var y={0,1,2}
var z={0,1,2}
var any={0,1,2,3}

# Birth in competitive circumstances
0,1,1,1,3,3,3,u,v,3
1,1,1,1,3,3,3,u,v,3
0,2,2,2,1,1,1,i,j,1
2,2,2,2,1,1,1,i,j,1
0,3,3,3,2,2,2,o,p,2
3,3,3,3,2,2,2,o,p,2

# Birth
0,1,1,1,i,j,k,l,m,1
2,1,1,1,i,j,k,l,m,1
0,2,2,2,o,p,q,r,s,2
3,2,2,2,o,p,q,r,s,2
0,3,3,3,u,v,w,x,y,3
1,3,3,3,u,v,w,x,y,3

# the RockScissorsPaper rules
3,2,a,b,c,d,e,f,g,0
2,1,a,b,c,d,e,f,g,0
1,3,a,b,c,d,e,f,g,0

# Three-neighbor survival
1,1,1,1,i,j,k,l,m,1
2,2,2,2,o,p,q,r,s,2
3,3,3,3,u,v,w,x,y,3

# Two-neighbor survival
1,1,1,i,j,k,l,m,n,1
2,2,2,o,p,q,r,s,t,2
3,3,3,u,v,w,x,y,z,3

# Death
any,a,b,c,d,e,f,g,h,0

We just had to add rules for

-- State 3 with any State 2 neighbor dies (overrules any other thing that might happen);
-- State 2 with any State 1 neighbor dies;
-- State 1 with any State 3 neighbor dies;

# the RockScissorsPaper rules
3,2,a,b,c,d,e,f,g,0
2,1,a,b,c,d,e,f,g,0
1,3,a,b,c,d,e,f,g,0

Then we had to take away the rules that say that multiple colors can collaborate on new births: replace the 'i's with 1, 2, and 3 respectively, in "0,1,1,i,0,0,0,0,0,1", "0,2,2,i,0,0,0,0,0,2", and "0,3,3,i,0,0,0,0,0,3".

But then we also had to add variables to allow births to still happen when there are more than three neighbors, as long as they're different colors:

# Dead cells for State 1
var i={0,2,3}
var j={0,2,3}
var k={0,2,3}
var l={0,2,3}
var m={0,2,3}
var n={0,2,3}
# Dead cells for State 2
var o={0,1,3}
var p={0,1,3}
var q={0,1,3}
var r={0,1,3}
var s={0,1,3}
var t={0,1,3}
# Dead cells for State 3
var u={0,1,2}
var v={0,1,2}
var w={0,1,2}
var x={0,1,2}
var y={0,1,2}
var z={0,1,2}
var any={0,1,2,3}

# Birth
0,1,1,1,h,i,j,k,l,1
0,2,2,2,m,n,o,p,q,2
0,3,3,3,r,s,t,u,v,3

There are just three more annoyances:

1) This last "Birth" addition will be asymmetric, because "0,1,1,1,h,i,j,k,l,1" will produce a State 1 cell even when the surroundings are something like "1,1,1,3,3,3,0,0". Paper covers rock, so presumably when both paper and rock are trying for a new birth in the same cell, paper ought to win...! These rules are more specific cases, so they have to be listed above the regular birth rules, above, or they'll never get triggered:

# Birth in competitive circumstances
0,1,1,1,3,3,3,h,i,3
0,2,2,2,1,1,1,m,n,1
0,3,3,3,2,2,2,r,s,2

2) Births still happen even if the cell is a losing color instead of really OFF:
[EDIT: I picked the wrong variables in the "Birth in competitive circumstances" section, so the text below is wrong -- compare the current rule text, or see here]
# Birth in competitive circumstances
0,1,1,1,3,3,3,i,j,3
1,1,1,1,3,3,3,i,j,3
0,2,2,2,1,1,1,o,p,1
2,2,2,2,1,1,1,o,p,1
0,3,3,3,2,2,2,u,v,2
3,3,3,3,2,2,2,u,v,2

# Birth
0,1,1,1,i,j,k,l,m,1
2,1,1,1,i,j,k,l,m,1
0,2,2,2,o,p,q,r,s,2
3,2,2,2,o,p,q,r,s,2
0,3,3,3,u,v,w,x,y,3
1,3,3,3,u,v,w,x,y,3

3) The rock/scissors/paper death rules have to come after the above birth rules, because a cell shouldn't actually die if it's due to be born as another color on the next tick. If the death rules come first, you get non-Life-standard behavior in in two-color situations, in the winning color as well as the losing color.
dvgrn
Moderator
 
Posts: 3353
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: Rule request thread

Postby dvgrn » April 10th, 2017, 9:52 pm

83bismuth38 wrote:replaced the 'i's with 'j's and 'k's, BUT i did notice something interesting-- the rules for each changed, so golly was running 3 different rules in the same universe, AT THE SAME TIME! this really surprised me, but forgot to post it.

There's been quite a lot of that kind of thing going on, actually, starting in the last year or so.
dvgrn
Moderator
 
Posts: 3353
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: Rule request thread

Postby Rhombic » April 11th, 2017, 5:02 am

@dvgrn:

Are these meant to behave like this?
1) no birth?
2) at generation 25, birth with 4 ON neighbours
3) I'm not sure what this is
x = 6, y = 7, rule = RockScissorsPaperLife
.2C$C2.C$C.C$.C2.B$3.B.B$3.B.B$4.B!

x = 14, y = 11, rule = RockScissorsPaperLife
.C7.2C.2C$C.C7.C.C$2C8.C.C$11.C5$6.A$5.3A$4.2A.A!

x = 2, y = 4, rule = RockScissorsPaperLife
2C$2C$A$2A!
there may be bugs in gfind
User avatar
Rhombic
 
Posts: 454
Joined: June 1st, 2013, 5:41 pm

Re: Rule request thread

Postby Saka » April 11th, 2017, 5:13 am

Requesting a variant of the RPS rule:
Instead of dying, cells that get beaten should turn into the color of the invading cell.
Nice waterbear you got there. Would be a shame if this rake shot it down from the other side of the universe.
User avatar
Saka
 
Posts: 1137
Joined: June 19th, 2015, 8:50 pm
Location: Who Cares?

Re: Rule request thread

Postby dvgrn » April 11th, 2017, 10:19 am

Rhombic wrote:Are these meant to behave like this?
1) no birth?
2) at generation 25, birth with 4 ON neighbours
3) I'm not sure what this is

Yeah, these may not be what somebody wants the rule to do. On the other hand, it is exactly what at least one person (me) wants the rule to do:

dvgrn wrote:There are still a couple of reasonable possibilities:

1) State 1 kills State 2 when it touches it, and thinks it's an OFF state, but State 2 thinks State 1 is an ON state (so three-neighbor births will still happen when an OFF cell has a combination of State 1 and State 2 neighbors)
or
2) State 1 kills State 2, but State 2 thinks State 1 is an OFF state

I'll try #2, because there are just a couple of complicated parts.

The requested rule isn't really specified completely by "Yeah, it just plows right through." My explanation of the decision to go with option #2 probably ended up being TL;DR.

Anyway, it seems to me all three of those cases make perfect sense. Maybe this statement of option #2 would be clearer:

"State [1,2,3] kills State [2,3,1] when it touches it. All ON states count only their own state when looking for neighbors."

Anyone who wants the rules to work differently is welcome to make a modified rule table (with a different name). The long walkthrough posts are trying to teach people how to rule, so to speak, instead of just giving them rules...! For example, I'm going to leave to someone else the implementation RockPaperScissorsSpockLizardLife -- or is it RockLizardSpockScissorsPaperLife?

When you compose a rule and want to test it, you can just copy it to the clipboard and choose File > Open Clipboard in Golly -- it will replace any previous versions. Keep running a test pattern that should have all the behavior that you want.

When something isn't working, read the rule list from the top. There will always turn out to be one that is either getting applied when you don't want it to, or isn't getting applied when you do want it to... and then you just have to figure out why, and how to fix it. It doesn't take very many test cycles to successfully produce fairly complicated multistate rules.
dvgrn
Moderator
 
Posts: 3353
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: Rule request thread

Postby 83bismuth38 » April 14th, 2017, 10:20 am

IS it possible for a single rule to have a baby toad:
x = 2, y = 3, rule = B3/S2e3
bo$2o$o!

A regular toad:
x = 2, y = 4, rule = B3/S23
bo$2o$2o$o!

And a big toad:
x = 2, y = 5, rule = B34-air/S34-ai
bo$2o$2o$2o$o!

and maybe even further? all I really want though is a non-explosive rule with these three toads.
edit: 99% sure impossible for baby toad and regular toad to meet, besides, the baby toad is technically not a toad. :lol:
Last edited by 83bismuth38 on April 14th, 2017, 6:12 pm, edited 1 time in total.
x = 8, y = 10, rule = B3/S23
3b2o$3b2o$2b3o$4bobo$2obobobo$3bo2bo$2bobo2bo$2bo4bo$2bo4bo$2bo!

also, why does it say 'bo' so much?
User avatar
83bismuth38
 
Posts: 120
Joined: March 2nd, 2017, 4:23 pm
Location: Still sitting around in Sagittarius A...

Re: Rule request thread

Postby 83bismuth38 » April 14th, 2017, 11:04 am

Maybe we could have another rule be the king of polythlons, or as I would call it, Polythlonia. It (of course) would have the pentadecathlon:
x = 10, y = 3, rule = B3/S23
2bo4bo$2ob4ob2o$2bo4bo!

But also from another rule, the decathlon:
x = 6, y = 5, rule = B35y/S236c
bo2bo$o4bo$o4bo$o4bo$bo2bo!

And there's probably some others, but i'm too lazy to try and find them :lol:
x = 8, y = 10, rule = B3/S23
3b2o$3b2o$2b3o$4bobo$2obobobo$3bo2bo$2bobo2bo$2bo4bo$2bo4bo$2bo!

also, why does it say 'bo' so much?
User avatar
83bismuth38
 
Posts: 120
Joined: March 2nd, 2017, 4:23 pm
Location: Still sitting around in Sagittarius A...

Re: Rule request thread

Postby 83bismuth38 » April 14th, 2017, 12:00 pm

Maybe we could find rules for all of them, including toads, polythlons, beacons, and blinkers. I already tried blinkers--
it's WAY harder than you would think, i got this monstrosity instead of a regular blinker family:
x = 33, y = 1, rule = B2-ac36/S02e
o2b3o2b5o2b7o2b9o!

btw, the regular blinker familty has a single, central stator with the rotor on the outside, turning 90 degrees at half of it's period.
Should i make a new thread for this? i feel like i'm spamming this one :?
EDIT: i kind of found it, only works with sizes 1 and 2:
x = 10, y = 5, rule = B3-a4-n5/S02-c34e56-c8
2bo2$5o2b3o2$2bo!
x = 8, y = 10, rule = B3/S23
3b2o$3b2o$2b3o$4bobo$2obobobo$3bo2bo$2bobo2bo$2bo4bo$2bo4bo$2bo!

also, why does it say 'bo' so much?
User avatar
83bismuth38
 
Posts: 120
Joined: March 2nd, 2017, 4:23 pm
Location: Still sitting around in Sagittarius A...

Re: Rule request thread

Postby Kiran » April 19th, 2017, 5:47 pm

Looks like Rock-Paper-Scissors has a bug:
x = 105, y = 83, rule = RockScissorsPaperLife
5$26.2A$26.5A$28.9A$33.2A2.18A$35.2A18.23A$37.A40.18A4.A$38.2A47.16A$
40.2A20.25A$41.21A$25.16A3.2A$18.7A21.2A$17.A30.3A$18.3A30.2A$21.3A
29.3A$23.16A17.3A$39.31A$62.3A5.24A$65.2A27.7A$67.3A29.A$70.4A24.A$
74.4A12.8A$72.18A$43.29A10.4A$23.20A43.4A$19.5A66.8A$15.4A35.43A$16.
3A19.16A$19.12A.6A$26.25A$22.4A25.12A$21.A41.4A$20.A7.15A24.5A$21.A
10.5A2.6A2.A24.5A$22.A13.5A36.4A$22.A15.8A35.5A$23.2A16.3A2.4A36.4A$
25.2A17.3A11.3C29.3A$27.3A17.2A9.C.C32.2A$30.3A25.C.C34.A$15.32A49.2A
$28.22A2.A44.2A$33.8A3.5A4.30A13.A$38.5A6.4A30.13A$16.2A25.8A2.5A$15.
A2.5A23.2A3.11A$15.3A5.8A16.19A$18.5A8.10A21.25A$23.5A13.13A16.5A12.
10A$28.6A14.22A4.4A12.7A$34.5A16.4A4.27A$39.21A22.4A$59.32A$25.21A14.
A27.10A$19.6A21.49A3.A$20.A41.A32.5A$16.14A32.A14.18A$22.7A.47A$24.
23A18.2A$17.16A5.12A17.3A$16.A10.10A13.11A9.3A$15.5A11.4A.5A20.3A9.3A
$20.6A9.3A2.24A12.3A$25.11A2.4A.10A2.27A$13.44A$8.5A33.8A3.20A$7.A42.
8A19.15A$6.7A42.9A28.6A$13.25A21.10A29.A$38.36A25.A$68.21A8.4A$80.17A
$87.4A!
Kiran Linsuain
User avatar
Kiran
 
Posts: 268
Joined: March 4th, 2015, 6:48 pm

Re: Rule request thread

Postby Jackk » April 19th, 2017, 6:23 pm

If a red cell should be born but there are 4/5 yellow cells surrounding the same cell, a yellow cell is incorrectly born instead:

x = 9, y = 6, rule = RockScissorsPaperLife
2CA$C.A$2CA$6.2C$6.C.A$6.C2A!
Jackk
 
Posts: 71
Joined: March 13th, 2012, 3:49 pm

Re: Rule request thread

Postby dvgrn » April 19th, 2017, 8:46 pm

Jackk wrote:If a red cell should be born but there are 4/5 yellow cells surrounding the same cell, a yellow cell is incorrectly born instead.


Kiran wrote:Looks like Rock-Paper-Scissors has a bug:
x = 105, y = 83, rule = RockScissorsPaperLife
5$26.2A$26.5A$28.9A$33.2A2.18A$35.2A18.23A$37.A40.18A4.A$38.2A47.16A$
40.2A20.25A$41.21A$25.16A3.2A$18.7A21.2A$17.A30.3A$18.3A30.2A$21.3A
29.3A$23.16A17.3A$39.31A$62.3A5.24A$65.2A27.7A$67.3A29.A$70.4A24.A$
74.4A12.8A$72.18A$43.29A10.4A$23.20A43.4A$19.5A66.8A$15.4A35.43A$16.
3A19.16A$19.12A.6A$26.25A$22.4A25.12A$21.A41.4A$20.A7.15A24.5A$21.A
10.5A2.6A2.A24.5A$22.A13.5A36.4A$22.A15.8A35.5A$23.2A16.3A2.4A36.4A$
25.2A17.3A11.3C29.3A$27.3A17.2A9.C.C32.2A$30.3A25.C.C34.A$15.32A49.2A
$28.22A2.A44.2A$33.8A3.5A4.30A13.A$38.5A6.4A30.13A$16.2A25.8A2.5A$15.
A2.5A23.2A3.11A$15.3A5.8A16.19A$18.5A8.10A21.25A$23.5A13.13A16.5A12.
10A$28.6A14.22A4.4A12.7A$34.5A16.4A4.27A$39.21A22.4A$59.32A$25.21A14.
A27.10A$19.6A21.49A3.A$20.A41.A32.5A$16.14A32.A14.18A$22.7A.47A$24.
23A18.2A$17.16A5.12A17.3A$16.A10.10A13.11A9.3A$15.5A11.4A.5A20.3A9.3A
$20.6A9.3A2.24A12.3A$25.11A2.4A.10A2.27A$13.44A$8.5A33.8A3.20A$7.A42.
8A19.15A$6.7A42.9A28.6A$13.25A21.10A29.A$38.36A25.A$68.21A8.4A$80.17A
$87.4A!

Indeed it did. I had the wrong variables in the "birth in competitive circumstances" section -- it should have been

# Birth in competitive circumstances
0,1,1,1,3,3,3,u,v,3
1,1,1,1,3,3,3,u,v,3
0,2,2,2,1,1,1,i,j,1
2,2,2,2,1,1,1,i,j,1
0,3,3,3,2,2,2,o,p,2
3,3,3,3,2,2,2,o,p,2

(and now it is.)

If I had been luckier, my three-pi test pattern would have caught that problem. Guess I'll use something bigger like overlapping acorns next time.
dvgrn
Moderator
 
Posts: 3353
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: Rule request thread

Postby Kiran » April 20th, 2017, 11:32 pm

It would be nice to have a "friendly" version of Rock-Paper-Scissors.
Something like this (conditions edited to address 3 of each other kind case, may be reducable):
scissors cell
If it has exactly 3 rock neighbours and exactly 3 paper neighbours:
Turn into rock if it has 2 scissors neighbours, otherwise turns into paper.
Otherwise:
Turns into rock if it has exactly 3 rock neighbours.
Otherwise:
Stays scissors if it has 2 or 3 scissor neighbours.
Otherwise:
Turns into paper if it has exactly 3 paper neighbours.
Otherwise:
Becomes empty.
rock and paper cells
Analogues to scissors cells, just permute the labels cyclically.
empty cell
Turns into dominating type if there are exactly three cells of each of two types (for example, an empty cell with three scissors neighbours and three paper neighbours turns into a scissors cell).
Otherwise:
Turns into said type if there are exactly three neighbours of that type regardless of other neighbors.
Stays empty otherwise.

Note that cells do not disrupt each other too much, and behave independently as long as there is no conflict over a cell.
In particular, patterns like this are stable:
x = 50, y = 4, rule = RockScissorsPaperLife
.2A2B2C2A2B2C2A2B2C2A2B2C2A2B2C2A2B2C2A2B2C2A2B2C$A.BACBACBACBACBACBA
CBACBACBACBACBACBACBACBACBACB.C$A.BACBACBACBACBACBACBACBACBACBACBACBA
CBACBACBACB.C$.2A2B2C2A2B2C2A2B2C2A2B2C2A2B2C2A2B2C2A2B2C2A2B2C!
Last edited by Kiran on April 21st, 2017, 1:41 pm, edited 1 time in total.
Kiran Linsuain
User avatar
Kiran
 
Posts: 268
Joined: March 4th, 2015, 6:48 pm

Re: Rule request thread

Postby dvgrn » April 21st, 2017, 8:25 am

Kiran wrote:It would be nice to have a "friendly" version of Rock-Paper-Scissors.
Something like this:
scissors cell
...
Turns into paper if it has exactly 3 paper neighbours.

Since scissors wins against paper, might it not make sense for a scissors cell to hold its own against three paper neighbors? Or might a scissors cell turn into rock even if it has only two rock neighbors, or only one? Guess it depends on how dominant you want the dominant states to be.

I'm going to leave this for someone else to put together. The outline has all the details, so it's really just a matter of starting with the RockScissorsPaperLife rule table but removing the various competitive/enemy rule lines, stepping through the new specifications and adding a rule for each, and coming up with a good test pattern.

Maybe the new variant should be called just RockPaperScissorsLife, since I think that's the more standard ordering anyway.
dvgrn
Moderator
 
Posts: 3353
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: Rule request thread

Postby Kiran » April 21st, 2017, 1:38 pm

dvgrn wrote:Since scissors wins against paper, might it not make sense for a scissors cell to hold its own against three paper neighbors?

Note that this transition only happens when the scissors cell does not have 2 or 3 scissors neighbours, so in the absence of paper cells, it would become empty anyway.
dvgrn wrote: Or might a scissors cell turn into rock even if it has only two rock neighbors, or only one? Guess it depends on how dominant you want the dominant states to be.

This would allow scissors cells to disrupt rock cells even in the absence of paper cells, for example, a rock glider hitting scissors cells would not plough through without noticing.

One special case that needs to be dealt with separately, is the case of a scissors cell with 3 rock neighbours and 3 paper neighbours. In this case, if it does not have 2 scissors neighbours, it should turn to paper. If it does, it is not clear what should happen, but it makes slightly more sense for it to turn to rock.
I will edit my description to address this.
If a cell has 3 neighbours of each type, the laws of geometry have changed, and it should watch out for Cthulhu.

It would also be interesting to make an exploding version of this rule, to track the spiralling vortexes that should emerge, the easiest way to achieve this is by adding survival conditions.
Kiran Linsuain
User avatar
Kiran
 
Posts: 268
Joined: March 4th, 2015, 6:48 pm

Previous

Return to Other Cellular Automata

Who is online

Users browsing this forum: bprentice and 4 guests