Rule request thread
- get_Snacked
- Posts: 542
- Joined: August 20th, 2022, 10:51 pm
Re: Rule request thread
Life, but cells that are born by b3n cannot survive by s2k in the first generation they are alive. that's literally it.
- confocaloid
- Posts: 6697
- Joined: February 8th, 2022, 3:15 pm
- Location: learn to protect yourself against stray gliders and sparks and self-destruct mechanisms
Re: Rule request thread
get_Snacked wrote: March 5th, 2025, 3:52 pm Life, but cells that are born by b3n cannot survive by s2k in the first generation they are alive. that's literally it.
Code: Select all
#C [[ RANDOMIZE2 RANDWIDTH 320 RANDHEIGHT 240 RANDFILL 25 ]]
x = 1, y = 1, rule = TestingRequestFromPost205978
b!
@RULE TestingRequestFromPost205978
https://conwaylife.com/forums/viewtopic.php?p=205978#p205978
Living = state 1 or state 2
@TABLE
n_states:3
neighborhood:Moore
symmetries:rotate4reflect
var a={1,2}
var b=a
var c=a
var d=a
var p={0,1,2}
var q=p
var r=p
var s=p
var t=p
var u=p
var v=p
var w=p
# If a cell's condition is (S2k|D2k) in the current generation
# and the cell's condition was (B3n|A3n) in the preceding generation,
# then the cell dies:
2, a,0,0,b,0,0,0,0, 0
# the rules implementing birth from =3 alive neighbours:
0, a,b,c,0,0,0,0,0, 1
0, a,b,0,c,0,0,0,0, 2 # B3n
0, a,b,0,0,c,0,0,0, 1
0, a,b,0,0,0,c,0,0, 1
0, a,b,0,0,0,0,c,0, 1
0, a,b,0,0,0,0,0,c, 1
0, a,0,b,0,c,0,0,0, 1
0, a,0,b,0,0,c,0,0, 1
0, 0,a,0,b,0,c,0,0, 1
0, 0,a,0,b,0,0,c,0, 1
# the rules implementing survival with =3 alive neighbours:
d, a,b,c,0,0,0,0,0, 1
d, a,b,0,c,0,0,0,0, 1
d, a,b,0,0,c,0,0,0, 1
d, a,b,0,0,0,c,0,0, 1
d, a,b,0,0,0,0,c,0, 1
d, a,b,0,0,0,0,0,c, 1
d, a,0,b,0,c,0,0,0, 1
d, a,0,b,0,0,c,0,0, 1
d, 0,a,0,b,0,c,0,0, 1
d, 0,a,0,b,0,0,c,0, 1
# the rules implementing survival with =2 alive neighbours:
d, a,b,0,0,0,0,0,0, 1
d, a,0,b,0,0,0,0,0, 1
d, a,0,0,b,0,0,0,0, 1
d, a,0,0,0,b,0,0,0, 1
d, 0,a,0,b,0,0,0,0, 1
d, 0,a,0,0,0,b,0,0, 1
d, p,q,r,s,t,u,v,w, 0 # otherwise, everything becomes zero
127:1 B3/S234c User:Confocal/R (isotropic CA, incomplete)
Unlikely events happen.
My silence does not imply agreement, nor indifference. If I disagreed with something in the past, then please do not construe my silence as something that could change that.
Unlikely events happen.
My silence does not imply agreement, nor indifference. If I disagreed with something in the past, then please do not construe my silence as something that could change that.
Re: Rule request thread
I'd like this simple rule:
on Life (two non-interacting universe, one Life, one the rule above)
Code: Select all
@TABLE
n_states:7
neighborhood:vonNeumann
symmetries:permute
var a = {0,1,2,3,4,5,6}
var b = a
var c = a
var d = a
var x = {1,2}
var y = {3,4}
var z = {5,6}
x,6,a,b,c,2
y,2,a,b,c,4
z,4,a,b,c,6
2,a,b,c,d,1
4,a,b,c,d,3
6,a,b,c,d,5My sandbox | All my engineered replicators | BsKngt | TNT
Asperger, ISTP, using a Dvorak keyboard.
I love my new school life.
Asperger, ISTP, using a Dvorak keyboard.
I love my new school life.
- get_Snacked
- Posts: 542
- Joined: August 20th, 2022, 10:51 pm
Re: Rule request thread
HybridRainbow1TFL.
state 0: B3/S23 background
state 1: B3/S23 alive
state 2: B03/S23 background
state 3: B03/S23 alive
state 4: B1c3/S23 background
state 5: B1c3/S23 alive
etc. for all rules 1TFL.
state 0: B3/S23 background
state 1: B3/S23 alive
state 2: B03/S23 background
state 3: B03/S23 alive
state 4: B1c3/S23 background
state 5: B1c3/S23 alive
etc. for all rules 1TFL.
- unname4798
- Posts: 2529
- Joined: July 15th, 2023, 10:27 am
- Location: Near ConwayLife servers
Re: Rule request thread
State 2 and state 3 aren't included (these states have B0)
Re: Rule request thread
Life+LangtonsAnt but an ant cell is born when an off cell is surrounded by 6 life cells and a life cell is born when an off cell is surrounded by 6 or 7 ant cells.
Can't trust someone who misspells typset as typeset.
Contribute to CheckerLife!
Oppose KOSA now, save the internet!
The Sandboxer Sandbox (Discord server)
RIP Unname New Web
Contribute to CheckerLife!
Oppose KOSA now, save the internet!
The Sandboxer Sandbox (Discord server)
RIP Unname New Web
Re: Rule request thread
I name this rule uhhh
i don't know what to name it, oh wait i should name it crawler (without s, crawlers is taken)
the rule is a multistate colorized rule that can be used for wiring.
States
The first state is just white background/dead cells.
The second state is crawler, which is an orange state. it is a photon (c/1 spaceship) that makes up the simplest spaceship (the crawler) which is 2 cells. it also gains support from the second state, the crawler tail (or tail). it does not need a wire to move, it works perfect in vacuum. it cannot move diagonally. it decays into the tail.
The third state is the tail (crawler tail), which is light orange. it provides support to the crawler, and prevents it from blowing up into more crawlers. it always decays into background, unless it comes in contact with the black hole, which we will get to later.
The fourth state is called a wall, which is just a grey block that never gets destroyed, unless in contact with the black hole. crawler spaceships can go through tunnels of them, but if it crashes into a wall, it gets destroyed. if you want to turn it around in a wire (or wall tunnel), then use the 5th state, the turner.
the fifth state is... you guessed it, the turner. it is a cornflower blue cell that turns crawlers around 90°, but needs support from walls or objects around the edge (not corner) of it. if it has 0-1 walls or objects around it, it just bounces crawlers. with 2 walls or objects on the edge of it (or e2 in INT terms), it will function and turn things 90°. if it has 3 cells around it, it bounces stuff again. with 4-8 cells around the edge of it, it becomes wall.
the sixth state is the filter, a light red (or salmon) part that turns crawlers into walls. that's all it really does. the seventh state, the plant is the polar opposite, which is light green in color and brings walls back to life turning then into crawlers and bouncing them off.
the eighth state is the box, a light brown cell that can be pushed by crawlers. can be turned into wall using eaters, and can also interact with turners.
the ninth state is the black hole, a black part which turns every touching part (except other black holes) into a black hole. they can also be joined together with other black holes. can also be used to move black holes, destroying the touching black hole while becoming one.
the tenth state is the dissolver, a grayish blue cell which turns every part it touches (except for other dissolvers) into background.
the eleventh (and final state) is the replicator, a dark yellow cell that replicates everything (except for walls, black holes, and dissolvers) and puts the copy on the opposite side of it, and cannot replicate if a part is already behind it
i hope this rule isn't too hard to make, but good luck!
i don't know what to name it, oh wait i should name it crawler (without s, crawlers is taken)
the rule is a multistate colorized rule that can be used for wiring.
States
The first state is just white background/dead cells.
The second state is crawler, which is an orange state. it is a photon (c/1 spaceship) that makes up the simplest spaceship (the crawler) which is 2 cells. it also gains support from the second state, the crawler tail (or tail). it does not need a wire to move, it works perfect in vacuum. it cannot move diagonally. it decays into the tail.
The third state is the tail (crawler tail), which is light orange. it provides support to the crawler, and prevents it from blowing up into more crawlers. it always decays into background, unless it comes in contact with the black hole, which we will get to later.
The fourth state is called a wall, which is just a grey block that never gets destroyed, unless in contact with the black hole. crawler spaceships can go through tunnels of them, but if it crashes into a wall, it gets destroyed. if you want to turn it around in a wire (or wall tunnel), then use the 5th state, the turner.
the fifth state is... you guessed it, the turner. it is a cornflower blue cell that turns crawlers around 90°, but needs support from walls or objects around the edge (not corner) of it. if it has 0-1 walls or objects around it, it just bounces crawlers. with 2 walls or objects on the edge of it (or e2 in INT terms), it will function and turn things 90°. if it has 3 cells around it, it bounces stuff again. with 4-8 cells around the edge of it, it becomes wall.
the sixth state is the filter, a light red (or salmon) part that turns crawlers into walls. that's all it really does. the seventh state, the plant is the polar opposite, which is light green in color and brings walls back to life turning then into crawlers and bouncing them off.
the eighth state is the box, a light brown cell that can be pushed by crawlers. can be turned into wall using eaters, and can also interact with turners.
the ninth state is the black hole, a black part which turns every touching part (except other black holes) into a black hole. they can also be joined together with other black holes. can also be used to move black holes, destroying the touching black hole while becoming one.
the tenth state is the dissolver, a grayish blue cell which turns every part it touches (except for other dissolvers) into background.
the eleventh (and final state) is the replicator, a dark yellow cell that replicates everything (except for walls, black holes, and dissolvers) and puts the copy on the opposite side of it, and cannot replicate if a part is already behind it
i hope this rule isn't too hard to make, but good luck!
aaaaaaaaaaaaaaaaaaaa i ar haev autsim
- confocaloid
- Posts: 6697
- Joined: February 8th, 2022, 3:15 pm
- Location: learn to protect yourself against stray gliders and sparks and self-destruct mechanisms
Re: Rule request thread
The following is extremely incomplete, but I'm posting it anyway, partly intended as an illustration of how one could make a RuleLoader ruletable, and partly because it seems impossible to implement the request as stated.
I added some variables which will likely be needed. I added 11 cellstates.
I added several rules with comments, to enable the "crawler" and the "dissolver" (as far as I understood it).
Some notes:
The RuleLoader algorithm (Golly/LifeViewer-supported ruletables and ruletrees) has the built-in restriction to the Moore neighbourhood.
In particular, that means the current state of the cell with coordinates (0;0) cannot possibly affect the state of the cell with coordinates (2;0) in the next generation.
The idea of a cellular automaton is that every cell can only "see" (some information about) its own current state and the current states of its neighbours. The update rules cannot use any other information. For example, a cell adjacent to a "wall" cannot "see through the wall" what is the current state of the cell on the other side of the wall.
If I read your request correctly, then that restriction means that your "replicator" cellstate cannot be implemented as described. (Imagine the cell at (1;0) is a "replicator" cell; the cell at (0;0) is currently a "background" cell; and the cell at (2;0) is currently either "plant" or "crawler". Your request would mean that in the next generation, the cell at (0;0) should become either "plant" or "crawler" depending on the current state of the cell at (2;0). But the cells (0;0) and (2;0) are not Moore neighbours of each other, so they cannot directly affect each other like that.)
It looks like the same problem also happens in other parts of the request (for example, in the description of "turner" cellstate).
When describing the "box" cellstate, you wrote "can be turned into wall using eaters". Can you clarify that? Normally, an eater would be a stationary object that can cleanly "eat" a spaceship without suffering permanent damage. Here the intended meaning appears to be different, because turning something into "wall" (a specific nonzero cellstate) is different from turning it into the background.
I added some variables which will likely be needed. I added 11 cellstates.
I added several rules with comments, to enable the "crawler" and the "dissolver" (as far as I understood it).
Code: Select all
x = 14, y = 2, rule = TestingPost207257_Crawler
5.C7.I$BA!
#C [[ GRID ]]
@RULE TestingPost207257_Crawler
0 = background/dead cells
1 = crawler; photon head (the tail is 2)
2 = crawler tail
3 = wall
4 = turner; with 0,1,3 walls/objects around it bounces crawlers; with two walls/objects in a specific configuration it turns crawlers 90 degrees; with 4-8 walls/objects around it becomes a wall.
5 = filter; turns crawlers into walls.
6 = plant; turns walls into crawlers and bounces them off.
7 = box; can be pushed by crawlers, can be turned into wall using eaters [???], and can also interact with turners.
8 = black hole; every nonzero neighbour becomes a black hole
9 = dissolver; turns every neighbouring non-dissolver into background
10 = replicator, replicates everything and puts the copy on the opposite side of it
@NAMES
0 background
1 crawler
2 crawler tail
3 wall
4 turner
5 filter
6 plant
7 box
8 black hole
9 dissolver
10 replicator
@COLORS
0 240 240 240
1 240 120 40
2 240 180 40
3 80 80 80
4 40 40 240
5 240 40 40
6 40 240 40
7 180 180 40
8 40 40 40
9 80 80 240
10 140 140 40
@TABLE
n_states:11
neighborhood:Moore
symmetries:rotate4reflect
var safe_background_for_crawler={0,3}
var sbfc1=safe_background_for_crawler
var sbfc2=safe_background_for_crawler
var sbfc3=safe_background_for_crawler
var sbfc4=safe_background_for_crawler
var sbfc5=safe_background_for_crawler
var sbfc6=safe_background_for_crawler
var sbfc7=safe_background_for_crawler
var anything={0,1,2,3,4,5,6,7,8,9,10}
var n=anything
var r=anything
var e=anything
var h=anything
var s=anything
var v=anything
var w=anything
var l=anything
# The above lines defined some variables. Those variables can now be used in the rules listed below.
# The rules are read one-by-one, line-by-line, from top to down. The first "matching" rule applies.
# The following three rules tell that, if there is an adjacent "dissolver" (9),
# then a non-"dissolver" (anything /= 9) becomes background (0),
# and a "dissolver" adjacent to another "dissolver" remains unchanged.
# Note that the first "matching" rule applies, which is important in this case:
9, n,r,e,h,s,v,w,l, 9 # a "dissolver" remains unchanged
anything, 9,r,e,h,s,v,w,l, 0 # anything else -> 0 when there's an orthogonally adjacent 9
anything, n,9,e,h,s,v,w,l, 0 # anything else -> 0 when there's a diagonally adjacent 9
# The following rule allows the crawler to move orthogonally:
0, 1,sbfc1,sbfc2,sbfc3,sbfc4,sbfc5,sbfc6,sbfc7, 1
# The following rule tells that the "crawler" (1) always decays into "crawler tail" (2):
1, n,r,e,h,s,v,w,l, 2 # crawler -> crawler tail
# The following rule tells that the "crawler tail" (2) always decays into "background" (0):
2, n,r,e,h,s,v,w,l, 0 # crawler -> background
The RuleLoader algorithm (Golly/LifeViewer-supported ruletables and ruletrees) has the built-in restriction to the Moore neighbourhood.
In particular, that means the current state of the cell with coordinates (0;0) cannot possibly affect the state of the cell with coordinates (2;0) in the next generation.
The idea of a cellular automaton is that every cell can only "see" (some information about) its own current state and the current states of its neighbours. The update rules cannot use any other information. For example, a cell adjacent to a "wall" cannot "see through the wall" what is the current state of the cell on the other side of the wall.
If I read your request correctly, then that restriction means that your "replicator" cellstate cannot be implemented as described. (Imagine the cell at (1;0) is a "replicator" cell; the cell at (0;0) is currently a "background" cell; and the cell at (2;0) is currently either "plant" or "crawler". Your request would mean that in the next generation, the cell at (0;0) should become either "plant" or "crawler" depending on the current state of the cell at (2;0). But the cells (0;0) and (2;0) are not Moore neighbours of each other, so they cannot directly affect each other like that.)
It looks like the same problem also happens in other parts of the request (for example, in the description of "turner" cellstate).
When describing the "box" cellstate, you wrote "can be turned into wall using eaters". Can you clarify that? Normally, an eater would be a stationary object that can cleanly "eat" a spaceship without suffering permanent damage. Here the intended meaning appears to be different, because turning something into "wall" (a specific nonzero cellstate) is different from turning it into the background.
Vlev2 wrote: March 17th, 2025, 9:57 pm I name this rule uhhh
i don't know what to name it, oh wait i should name it crawler (without s, crawlers is taken)
the rule is a multistate colorized rule that can be used for wiring.
States
The first state is just white background/dead cells.
The second state is crawler, which is an orange state. it is a photon (c/1 spaceship) that makes up the simplest spaceship (the crawler) which is 2 cells. it also gains support from the second state, the crawler tail (or tail). it does not need a wire to move, it works perfect in vacuum. it cannot move diagonally. it decays into the tail.
The third state is the tail (crawler tail), which is light orange. it provides support to the crawler, and prevents it from blowing up into more crawlers. it always decays into background, unless it comes in contact with the black hole, which we will get to later.
The fourth state is called a wall, which is just a grey block that never gets destroyed, unless in contact with the black hole. crawler spaceships can go through tunnels of them, but if it crashes into a wall, it gets destroyed. if you want to turn it around in a wire (or wall tunnel), then use the 5th state, the turner.
the fifth state is... you guessed it, the turner. it is a cornflower blue cell that turns crawlers around 90°, but needs support from walls or objects around the edge (not corner) of it. if it has 0-1 walls or objects around it, it just bounces crawlers. with 2 walls or objects on the edge of it (or e2 in INT terms), it will function and turn things 90°. if it has 3 cells around it, it bounces stuff again. with 4-8 cells around the edge of it, it becomes wall.
the sixth state is the filter, a light red (or salmon) part that turns crawlers into walls. that's all it really does. the seventh state, the plant is the polar opposite, which is light green in color and brings walls back to life turning then into crawlers and bouncing them off.
the eighth state is the box, a light brown cell that can be pushed by crawlers. can be turned into wall using eaters, and can also interact with turners.
the ninth state is the black hole, a black part which turns every touching part (except other black holes) into a black hole. they can also be joined together with other black holes. can also be used to move black holes, destroying the touching black hole while becoming one.
the tenth state is the dissolver, a grayish blue cell which turns every part it touches (except for other dissolvers) into background.
the eleventh (and final state) is the replicator, a dark yellow cell that replicates everything (except for walls, black holes, and dissolvers) and puts the copy on the opposite side of it, and cannot replicate if a part is already behind it
i hope this rule isn't too hard to make, but good luck! :)
127:1 B3/S234c User:Confocal/R (isotropic CA, incomplete)
Unlikely events happen.
My silence does not imply agreement, nor indifference. If I disagreed with something in the past, then please do not construe my silence as something that could change that.
Unlikely events happen.
My silence does not imply agreement, nor indifference. If I disagreed with something in the past, then please do not construe my silence as something that could change that.
- PiSpaceships
- Posts: 218
- Joined: January 17th, 2025, 12:20 pm
Re: Rule request thread
Make a Golly script that takes birth and survival conditions in INT format and returns the following 3-state rule:
-A cell is born in state 2 if it satisfy one of the birth conditions, checking only state 1 cells.
-A cell in state 2 turns into state 1 if it satisfy one of the survival conditons, checking only state 2 cells. Else, it dies.
-State 1 cell always dies.
So like Bb/S|B/Ss alternating rules, but patterns from otherwise uncompatible generations can coexist.
-A cell is born in state 2 if it satisfy one of the birth conditions, checking only state 1 cells.
-A cell in state 2 turns into state 1 if it satisfy one of the survival conditons, checking only state 2 cells. Else, it dies.
-State 1 cell always dies.
So like Bb/S|B/Ss alternating rules, but patterns from otherwise uncompatible generations can coexist.
INACTIVE
- confocaloid
- Posts: 6697
- Joined: February 8th, 2022, 3:15 pm
- Location: learn to protect yourself against stray gliders and sparks and self-destruct mechanisms
Re: Rule request thread
Does this work as intended?PiSpaceships wrote: March 19th, 2025, 1:11 pm Make a Golly script that takes birth and survival conditions in INT format and returns the following 3-state rule:
-A cell is born in state 2 if it satisfy one of the birth conditions, checking only state 1 cells.
-A cell in state 2 turns into state 1 if it satisfy one of the survival conditons, checking only state 2 cells. Else, it dies.
-State 1 cell always dies.
So like Bb/S|B/Ss alternating rules, but patterns from otherwise uncompatible generations can coexist.
Code: Select all
x = 13, y = 12, rule = Testing_B1S1
11.AB$6.3B.B.B$6.B.B.A2B$6.A2$4.2BA2.B2$BA4.A$B.B$2BA2$5.B.3B!
@RULE Testing_B1S1
https://conwaylife.com/forums/viewtopic.php?p=207405#p207405
@TABLE
n_states:3
neighborhood:Moore
symmetries:none
var a1={0,2}
var a2={0,2}
var a3={0,2}
var a4={0,2}
var a5={0,2}
var a6={0,2}
var a7={0,2}
var a8={0,2}
var b1={0,1}
var b2={0,1}
var b3={0,1}
var b4={0,1}
var b5={0,1}
var b6={0,1}
var b7={0,1}
var b8={0,1}
var x1={0,1,2}
var x2={0,1,2}
var x3={0,1,2}
var x4={0,1,2}
var x5={0,1,2}
var x6={0,1,2}
var x7={0,1,2}
var x8={0,1,2}
0, a1,a2,a3,1,a5,a6,a7,a8, 2
2, b1,b2,b3,2,b5,b6,b7,b8, 1
0, a1,a2,a3,a4,1,a6,a7,a8, 2
2, b1,b2,b3,b4,2,b6,b7,b8, 1
0, a1,a2,a3,a4,a5,1,a7,a8, 2
2, b1,b2,b3,b4,b5,2,b7,b8, 1
0, a1,a2,1,a4,a5,a6,a7,a8, 2
2, b1,b2,2,b4,b5,b6,b7,b8, 1
0, a1,a2,a3,a4,a5,a6,1,a8, 2
2, b1,b2,b3,b4,b5,b6,2,b8, 1
0, a1,1,a3,a4,a5,a6,a7,a8, 2
2, b1,2,b3,b4,b5,b6,b7,b8, 1
0, 1,a2,a3,a4,a5,a6,a7,a8, 2
2, 2,b2,b3,b4,b5,b6,b7,b8, 1
0, a1,a2,a3,a4,a5,a6,a7,1, 2
2, b1,b2,b3,b4,b5,b6,b7,2, 1
1, x1,x2,x3,x4,x5,x6,x7,x8, 0
2, x1,x2,x3,x4,x5,x6,x7,x8, 0
Code: Select all
x = 20, y = 9, rule = Testing_B234S23
14.3B$13.B3.B$2.3A7.B.B3.B$.A3.A7.2B2.B$A5.A4.3B.2B.2B$5.A7.B.B$3A3.A
9.3B2$2A!
@RULE Testing_B234S23
https://conwaylife.com/forums/viewtopic.php?p=207405#p207405
@TABLE
n_states:3
neighborhood:Moore
symmetries:none
var a1={0,2}
var a2={0,2}
var a3={0,2}
var a4={0,2}
var a5={0,2}
var a6={0,2}
var a7={0,2}
var a8={0,2}
var b1={0,1}
var b2={0,1}
var b3={0,1}
var b4={0,1}
var b5={0,1}
var b6={0,1}
var b7={0,1}
var b8={0,1}
var x1={0,1,2}
var x2={0,1,2}
var x3={0,1,2}
var x4={0,1,2}
var x5={0,1,2}
var x6={0,1,2}
var x7={0,1,2}
var x8={0,1,2}
0, a1,a2,a3,1,1,a6,a7,a8, 2
2, b1,b2,b3,2,2,b6,b7,b8, 1
0, a1,a2,a3,1,a5,1,a7,a8, 2
2, b1,b2,b3,2,b5,2,b7,b8, 1
0, a1,a2,a3,a4,1,1,a7,a8, 2
2, b1,b2,b3,b4,2,2,b7,b8, 1
0, a1,a2,a3,1,1,1,a7,a8, 2
2, b1,b2,b3,2,2,2,b7,b8, 1
0, a1,a2,1,1,a5,a6,a7,a8, 2
2, b1,b2,2,2,b5,b6,b7,b8, 1
0, a1,a2,1,a4,1,a6,a7,a8, 2
2, b1,b2,2,b4,2,b6,b7,b8, 1
0, a1,a2,1,1,1,a6,a7,a8, 2
2, b1,b2,2,2,2,b6,b7,b8, 1
0, a1,a2,1,a4,a5,1,a7,a8, 2
2, b1,b2,2,b4,b5,2,b7,b8, 1
0, a1,a2,1,1,a5,1,a7,a8, 2
2, b1,b2,2,2,b5,2,b7,b8, 1
0, a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1
0, 1,a2,a3,a4,1,a6,a7,1, 2
2, 2,b2,b3,b4,2,b6,b7,2, 1
0, 1,a2,a3,1,1,a6,a7,1, 2
0, 1,a2,a3,a4,a5,1,a7,1, 2
2, 2,b2,b3,b4,b5,2,b7,2, 1
0, 1,a2,a3,1,a5,1,a7,1, 2
0, 1,a2,a3,a4,1,1,a7,1, 2
0, 1,a2,1,a4,a5,a6,a7,1, 2
2, 2,b2,2,b4,b5,b6,b7,2, 1
0, 1,a2,1,1,a5,a6,a7,1, 2
0, 1,a2,1,a4,1,a6,a7,1, 2
0, 1,a2,1,a4,a5,1,a7,1, 2
0, 1,a2,a3,a4,a5,a6,1,1, 2
2, 2,b2,b3,b4,b5,b6,2,2, 1
0, 1,a2,a3,1,a5,a6,1,1, 2
0, 1,a2,a3,a4,1,a6,1,1, 2
0, 1,a2,a3,a4,a5,1,1,1, 2
0, 1,a2,1,a4,a5,a6,1,1, 2
0, 1,1,a3,a4,a5,a6,a7,1, 2
2, 2,2,b3,b4,b5,b6,b7,2, 1
0, 1,1,a3,1,a5,a6,a7,1, 2
0, 1,1,a3,a4,1,a6,a7,1, 2
0, 1,1,a3,a4,a5,1,a7,1, 2
0, 1,1,1,a4,a5,a6,a7,1, 2
0, 1,1,a3,a4,a5,a6,1,1, 2
1, x1,x2,x3,x4,x5,x6,x7,x8, 0
2, x1,x2,x3,x4,x5,x6,x7,x8, 0
The script evolves all 3-by-3 neighbourhood configurations, checks the future state of the middle cell in each case, and uses that to recover the currently-active rules and compute the new rules.
Code: Select all
# Requested in https://conwaylife.com/forums/viewtopic.php?p=207405#p207405
import golly as g
import itertools as it
SCRIPT_NAME = '?p=207405#p207405'
def iter_celllist(celllist):
epc = 2 + (len(celllist) % 2)
for i in range(len(celllist) // epc):
x = celllist[epc * i + 0]
y = celllist[epc * i + 1]
c = 1
if epc == 3:
c = celllist[epc * i + 2]
yield x, y, c
# Follow the rules of a two-state CA currently active in Golly
def slowcalc2(nw, n, ne, w, c, e, sw, s, se):
celllist = [ -1, -1, nw,
0, -1, n,
1, -1, ne,
-1, 0, w,
0, 0, c,
1, 0, e,
-1, 1, sw,
0, 1, s,
1, 1, se,
]
assert len(celllist) % 2 == 1
for x, y, c in iter_celllist(g.evolve(celllist, 1)):
if x == y == 0:
return c
return 0
def looks_like_valid_name(s):
A = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
B = '0123456789_-'
if not (0 < len(s) < 128):
return False
if s[0] not in A:
return False
if not set(s.upper()).issubset(A + B):
return False
return True
def make_rule(c, x, nrehsvwl, vn, vv):
r = '{}, '.format(c)
for i in range(8):
t = nrehsvwl[i]
if t == 0:
t = '{}{}'.format(vn, i + 1)
else:
t = '{}'.format(vv)
r += '{},'.format(t)
r += ' {}\n'.format(x)
return r
def main():
if g.numstates() != 2:
g.show('Before running the script, make sure that the current CA is two-state.')
return
nm = 'Testing_' + g.getrule().replace('/', '')
if not looks_like_valid_name(nm):
nm = 'Testing'
nm = g.getstring('Enter the name:', nm, SCRIPT_NAME)
if not looks_like_valid_name(nm):
g.show('The input does not look like a valid name.')
return
with open(g.getdir('rules') + nm + '.rule', mode='w') as f:
f.write('@RULE {}\n\n'.format(nm))
f.write('https://conwaylife.com/forums/viewtopic.php?p=207405#p207405')
f.write('\n\n@TABLE\n')
f.write('n_states:3\nneighborhood:Moore\nsymmetries:none\n\n')
for i in range(1, 9):
f.write('var a{}={}\n'.format(i, '{0,2}'))
for i in range(1, 9):
f.write('var b{}={}\n'.format(i, '{0,1}'))
for i in range(1, 9):
f.write('var x{}={}\n'.format(i, '{0,1,2}'))
f.write('\n')
for nw, n, ne, w, e, sw, s, se in it.product(range(2), repeat = 8):
nrehsvwl = (n, ne, e, se, s, sw, w, nw)
if slowcalc2(nw, n, ne, w, 0, e, sw, s, se) > 0:
f.write(make_rule(0, 2, nrehsvwl, 'a', 1))
if slowcalc2(nw, n, ne, w, 1, e, sw, s, se) > 0:
f.write(make_rule(2, 1, nrehsvwl, 'b', 2))
f.write('1, x1,x2,x3,x4,x5,x6,x7,x8, 0\n')
f.write('2, x1,x2,x3,x4,x5,x6,x7,x8, 0\n')
g.setrule(nm)
main()
127:1 B3/S234c User:Confocal/R (isotropic CA, incomplete)
Unlikely events happen.
My silence does not imply agreement, nor indifference. If I disagreed with something in the past, then please do not construe my silence as something that could change that.
Unlikely events happen.
My silence does not imply agreement, nor indifference. If I disagreed with something in the past, then please do not construe my silence as something that could change that.
- PiSpaceships
- Posts: 218
- Joined: January 17th, 2025, 12:20 pm
Re: Rule request thread
Sorry, but islptng already made it, and it's better:confocaloid wrote: March 20th, 2025, 8:42 amDoes this work as intended?PiSpaceships wrote: March 19th, 2025, 1:11 pm Make a Golly script that takes birth and survival conditions in INT format and returns the following 3-state rule:
-A cell is born in state 2 if it satisfy one of the birth conditions, checking only state 1 cells.
-A cell in state 2 turns into state 1 if it satisfy one of the survival conditons, checking only state 2 cells. Else, it dies.
-State 1 cell always dies.
So like Bb/S|B/Ss alternating rules, but patterns from otherwise uncompatible generations can coexist.
INACTIVE
- confocaloid
- Posts: 6697
- Joined: February 8th, 2022, 3:15 pm
- Location: learn to protect yourself against stray gliders and sparks and self-destruct mechanisms
Re: Rule request thread
For some reason, the long link currently doesn't load for me. Does it give a Golly script that can be run in Golly? Does it work equivalently to what I wrote?PiSpaceships wrote: March 20th, 2025, 8:47 am [...] Sorry, but islptng already made it, and it's better: [...]
127:1 B3/S234c User:Confocal/R (isotropic CA, incomplete)
Unlikely events happen.
My silence does not imply agreement, nor indifference. If I disagreed with something in the past, then please do not construe my silence as something that could change that.
Unlikely events happen.
My silence does not imply agreement, nor indifference. If I disagreed with something in the past, then please do not construe my silence as something that could change that.
- PiSpaceships
- Posts: 218
- Joined: January 17th, 2025, 12:20 pm
Re: Rule request thread
It isn't a Golly script, but it's an online Python program that takes the INT rulestring and returns the ruletable. It works by turning the rulestring into two lists of conditions - birth and survival - and next tuening each condition into a row in the ruletable.confocaloid wrote: March 20th, 2025, 8:52 amFor some reason, the long link currently doesn't load for me. Does it give a Golly script that can be run in Golly? Does it work equivalently to what I wrote?PiSpaceships wrote: March 20th, 2025, 8:47 am [...] Sorry, but islptng already made it, and it's better: [...]
INACTIVE
- confocaloid
- Posts: 6697
- Joined: February 8th, 2022, 3:15 pm
- Location: learn to protect yourself against stray gliders and sparks and self-destruct mechanisms
Re: Rule request thread
Unfortunately for some reason it currently doesn't load for me, so I cannot check whether it produces equivalent rules to what my script gives.PiSpaceships wrote: March 20th, 2025, 9:05 am [...] It isn't a Golly script, but it's an online Python program that takes the INT rulestring and returns the ruletable. It works by turning the rulestring into two lists of conditions - birth and survival - and next tuening each condition into a row in the ruletable.
Assuming no bugs, I think the script has the advantages that
(a) it's an actual Golly script, so it implements the request as stated, and it works offline;
(b) it avoids the problem of parsing the rulestring entirely, so it works regardless of how you provide the birth/survival conditions. It should work for non-isotropic CA as well (at least assuming no bugs).
IMO having to parse the rulestring notation would be a disadvantage. Directly reading the rules (which are already parsed by Golly) should work better than that.
127:1 B3/S234c User:Confocal/R (isotropic CA, incomplete)
Unlikely events happen.
My silence does not imply agreement, nor indifference. If I disagreed with something in the past, then please do not construe my silence as something that could change that.
Unlikely events happen.
My silence does not imply agreement, nor indifference. If I disagreed with something in the past, then please do not construe my silence as something that could change that.
Re: Rule request thread
It can be made into a Golly script easily:
I'm confused on how confocaloid can't open the TIO link.
Edit 1: Fix bugs
Code: Select all
import golly as gl
rule = gl.getrule()
if gl.getalgo() not in ["QuickLife","HashLife"]:
gl.exit("Unsupported rule.")
if rule[-1] in "HV":
gl.exit("Unsupported neighborhood.")
Hensel = {
"0" : [0,0,0,0,0,0,0,0],
"1e" : [1,0,0,0,0,0,0,0],
"1c" : [0,1,0,0,0,0,0,0],
"2a" : [1,1,0,0,0,0,0,0],
"2e" : [1,0,1,0,0,0,0,0],
"2k" : [1,0,0,1,0,0,0,0],
"2i" : [1,0,0,0,1,0,0,0],
"2c" : [0,1,0,1,0,0,0,0],
"2n" : [0,1,0,0,0,1,0,0],
"3a" : [1,1,1,0,0,0,0,0],
"3n" : [1,1,0,1,0,0,0,0],
"3r" : [1,1,0,0,1,0,0,0],
"3q" : [1,1,0,0,0,1,0,0],
"3j" : [1,1,0,0,0,0,1,0],
"3i" : [1,1,0,0,0,0,0,1],
"3e" : [1,0,1,0,1,0,0,0],
"3k" : [1,0,1,0,0,1,0,0],
"3y" : [1,0,0,1,0,1,0,0],
"3c" : [0,1,0,1,0,1,0,0],
"4a" : [1,1,1,1,0,0,0,0],
"4r" : [1,1,1,0,1,0,0,0],
"4q" : [1,1,1,0,0,1,0,0],
"4i" : [1,1,0,1,1,0,0,0],
"4y" : [1,1,0,1,0,1,0,0],
"4k" : [1,1,0,1,0,0,1,0],
"4n" : [1,1,0,1,0,0,0,1],
"4z" : [1,1,0,0,1,1,0,0],
"4j" : [1,1,0,0,1,0,1,0],
"4t" : [1,1,0,0,1,0,0,1],
"4w" : [1,1,0,0,0,1,1,0],
"4e" : [1,0,1,0,1,0,1,0],
"4c" : [0,1,0,1,0,1,0,1],
"5i" : [1,1,1,1,1,0,0,0],
"5j" : [1,1,1,1,0,1,0,0],
"5n" : [1,1,1,1,0,0,1,0],
"5a" : [1,1,1,1,0,0,0,1],
"5q" : [1,1,1,0,1,1,0,0],
"5c" : [1,1,1,0,1,0,1,0],
"5r" : [1,1,0,1,1,1,0,0],
"5y" : [1,1,0,1,1,0,1,0],
"5k" : [1,1,0,1,0,1,1,0],
"5e" : [1,1,0,1,0,1,0,1],
"6a" : [1,1,1,1,1,1,0,0],
"6c" : [1,1,1,1,1,0,1,0],
"6k" : [1,1,1,1,0,1,1,0],
"6e" : [1,1,1,1,0,1,0,1],
"6n" : [1,1,1,0,1,1,1,0],
"6i" : [1,1,0,1,1,1,0,1],
"7c" : [1,1,1,1,1,1,1,0],
"7e" : [1,1,1,1,1,1,0,1],
"8" : [1,1,1,1,1,1,1,1]}
def RuleFormat(rulestr):
HenselInFun = [['0x'], ['1c', '1e'], ['2a', '2c', '2e', '2i', '2k', '2n'],
['3a', '3c', '3e', '3i', '3j', '3k', '3n', '3q', '3r', '3y'],
['4a', '4c', '4e', '4i', '4j', '4k', '4n', '4q', '4r', '4t', '4w', '4y', '4z'],
['5a', '5c', '5e', '5i', '5j', '5k', '5n', '5q', '5r', '5y'],
['6a', '6c', '6e', '6i', '6k', '6n'], ['7c', '7e'], ['8x']]
HENSEL = [
['0'], ['1c', '1e'], ['2a', '2c', '2e', '2i', '2k', '2n'],
['3a', '3c', '3e', '3i', '3j', '3k', '3n', '3q', '3r', '3y'],
['4a', '4c', '4e', '4i', '4j', '4k', '4n', '4q', '4r', '4t', '4w', '4y', '4z'],
['5a', '5c', '5e', '5i', '5j', '5k', '5n', '5q', '5r', '5y'],
['6a', '6c', '6e', '6i', '6k', '6n'], ['7c', '7e'], ['8']]
rulestr = rulestr.split("/S")
birth = rulestr[0][1:].replace("8","8x")
survival = rulestr[1].replace("0","0x").replace("8","8x")
def ConditionsFormat(cstr):
res = ""
currentnum = -1
negated = False
letterslist = []
for supercalifragilisticexpialidocious in range(len(cstr) + 1):
try:
i = cstr[supercalifragilisticexpialidocious]
except: i = "9"
if i in "0123456789":
if currentnum != -1:
if len(letterslist) == 0:
letterslist = [x[1] for x in HENSEL[currentnum]]
if negated:
newlist = []
for j in HENSEL[currentnum]:
if j[1] not in letterslist:
newlist.append(j[1])
letterslist = newlist
for j in letterslist:
res += str(currentnum) + j
currentnum = int(i)
negated = False
letterslist = []
elif i == "-": negated = True
else: letterslist.append(i)
return res.replace("x","")
return (ConditionsFormat(birth),ConditionsFormat(survival))
template = '''@RULE Test
** File auto generated **
@TABLE
n_states:3
neighborhood:Moore
symmetries:rotate4reflect
var a = {0,1,2}
var b = a
var c = a
var d = a
var e = a
var f = a
var g = a
var h = a
var i = a
var n1_0 = {0,2}
var n1_1 = n1_0
var n1_2 = n1_0
var n1_3 = n1_0
var n1_4 = n1_0
var n1_5 = n1_0
var n1_6 = n1_0
var n1_7 = n1_0
var n2_0 = {0,1}
var n2_1 = n2_0
var n2_2 = n2_0
var n2_3 = n2_0
var n2_4 = n2_0
var n2_5 = n2_0
var n2_6 = n2_0
var n2_7 = n2_0
<content>
a,b,c,d,e,f,g,h,i,0'''
def ctrule(rulestring):
b,s = RuleFormat(rulestring)
res = ""
for i in Hensel:
j = ",".join([(("x" if Hensel[i][x] else "y")+str(x)) for x in range(len(Hensel[i]))])
if i in b: res += "0,"+j.replace("x","1-").replace("y","n1_")+",2\n"
if i in s: res += "2,"+j.replace("x","2-").replace("y","n2_")+",1\n"
for i in range(8):
res = res.replace("-"+str(i),"")
return template.replace("<content>",res)
rules = gl.getdir("rules")
rules += "Test.rule"
with open(rules,mode="w") as wf: print(ctrule(rule), file=wf)
g.setrule("Test")
Edit 1: Fix bugs
Last edited by islptng on March 20th, 2025, 10:10 pm, edited 2 times in total.
My sandbox | All my engineered replicators | BsKngt | TNT
Asperger, ISTP, using a Dvorak keyboard.
I love my new school life.
Asperger, ISTP, using a Dvorak keyboard.
I love my new school life.
- confocaloid
- Posts: 6697
- Joined: February 8th, 2022, 3:15 pm
- Location: learn to protect yourself against stray gliders and sparks and self-destruct mechanisms
Re: Rule request thread
I also don't know why the link didn't open for me. I'll probably try it again later and see if it works.
Anyway, ability to run a script "offline" is more convenient i.m.o. (and the request asked for a Golly script).
(1) I changed the rulename to "Test" (the name must begin with an uppercase letter, to ensure compatibility).
(2) I changed the lines at the end to the following:
According to the Golly documentation, the call to getdir("rules") returns a full path the the user-specific rules directory set in Preferences > Control:
I also had to add mode="w" to write to the file. I added a line at the end to automatically switch to the resulting 3-state CA.
You might want to add some checks at the beginning, to ensure that the string returned by g.getrule() can be used in the way the script attempts to use it.
I tested the modified script with those patterns I found earlier and posted above. Both patterns appear to work the same way.
Anyway, ability to run a script "offline" is more convenient i.m.o. (and the request asked for a Golly script).
I had to change the parts that are left in the above quote (the omitted parts are left intact).islptng wrote: March 20th, 2025, 4:23 pm It can be made into a Golly script easily:Code: Select all
[...][...][...] template = '''@RULE test [...][...][...] rules = gl.getdir("rules") if rules[-1] != "\\": rules += "\\" rules += "test.rule" with open(rules) as wf: print(ctrule(rule), file=wf)
(1) I changed the rulename to "Test" (the name must begin with an uppercase letter, to ensure compatibility).
(2) I changed the lines at the end to the following:
Code: Select all
rules = gl.getdir("rules")
rules += "Test.rule"
with open(rules, mode="w") as wf: print(ctrule(rule), file=wf)
gl.setrule("Test")
Because it's guaranteed to be terminated correctly, you shouldn't need to insert any path separators yourself. (In fact, the line inserting '\\' caused an error for me, the script didn't work at all.)In each case a full path is returned, terminated by the appropriate path separator for the current platform.
I also had to add mode="w" to write to the file. I added a line at the end to automatically switch to the resulting 3-state CA.
You might want to add some checks at the beginning, to ensure that the string returned by g.getrule() can be used in the way the script attempts to use it.
I tested the modified script with those patterns I found earlier and posted above. Both patterns appear to work the same way.
127:1 B3/S234c User:Confocal/R (isotropic CA, incomplete)
Unlikely events happen.
My silence does not imply agreement, nor indifference. If I disagreed with something in the past, then please do not construe my silence as something that could change that.
Unlikely events happen.
My silence does not imply agreement, nor indifference. If I disagreed with something in the past, then please do not construe my silence as something that could change that.
- PiSpaceships
- Posts: 218
- Joined: January 17th, 2025, 12:20 pm
- unname4798
- Posts: 2529
- Joined: July 15th, 2023, 10:27 am
- Location: Near ConwayLife servers
Re: Rule request thread
What is an ogreship?
You didn't clarify what the transition rules does this rule feature.PiSpaceships wrote: March 22nd, 2025, 1:51 pm Make a 3-state rule that has very common small ogreship.
- PiSpaceships
- Posts: 218
- Joined: January 17th, 2025, 12:20 pm
Re: Rule request thread
Ogreship is a spaceship which every n generations moves 1 cell in one direction and 10 cells in another.unname4798 wrote: March 22nd, 2025, 1:53 pm What is an ogreship?You didn't clarify what the transition rules does this rule feature.PiSpaceships wrote: March 22nd, 2025, 1:51 pm Make a 3-state rule that has very common small ogreship.
Maybe it's wrong topic for it. I'll repost it in Rulegolf Request thread.
INACTIVE
- LittleLWSS
- Posts: 152
- Joined: August 1st, 2024, 10:39 pm
- Location: In a mysterious, historic, and powerful country in the East Asia
Re: Rule request thread
Go is a mental game that originated in China. China, Japan and South Korea are the three pillars of today's Go, but in recent years, Japanese Go has gradually weakened, forming a situation in which China and South Korea compete for hegemony. At present, the biggest problem faced by Go is that the rules are not uniform, and there is no international organization to manage it in a unified manner, so it is facing great difficulties in the promotion process.
1. Each side of the game holds a one-color chess piece.
2. Open with an empty chessboard.
3. Black first and then white, alternately on the points of the chessboard.(For ease of use, we use blue and red)
4. After the chess pieces are decided, they will not move to other points.
5. It is the right of both parties to take turns, but either party is allowed to give up the right to play and use the hypothesis.
6. Normally, chessboard for Go is 19x19.
A chess piece is on the board, and the empty spot immediately adjacent to it(von Neumann neighbour) is the "energy" of this chess piece.
If there are pieces of the same color on the points immediately adjacent to the line, the pieces are connected to each other to form an inseparable whole.
If there are discolored pieces on the points immediately adjacent to the line, there is no energy here. If a piece loses all its energy, it cannot exist on the board.
The method of clearing the non-energized piece out of the chessboard is called "take out". There are two types of "take out":
1. After the move, if the opponent's chess piece is out of energy, the opponent's piece without energy should be took out immediately.
2. After the move, both pieces are in a state of no energy, and the opponent's piece of no energy should be took out immediately.
At any point on the board, if a player makes a move, the piece is immediately in a state of non-energized, and at the same time it cannot take out any opponent's piece. This point is called the "forbidden point". In the case of official matches, the right to abstain will be awarded, or treat as virtual move.
1. The game is final when both parties unanimously confirm the completion of the move.
2. When one of the players admits defeat in the middle of the game, it is the final game.
3. The continuous use of virtual by both sides is the final game.
My design is, red is state 1 and blue is state 2, state1 is first then state2. When the players placed their piece, go forward a generation.
Will anyone make Go into RULETABLE?
1. Each side of the game holds a one-color chess piece.
2. Open with an empty chessboard.
3. Black first and then white, alternately on the points of the chessboard.(For ease of use, we use blue and red)
4. After the chess pieces are decided, they will not move to other points.
5. It is the right of both parties to take turns, but either party is allowed to give up the right to play and use the hypothesis.
6. Normally, chessboard for Go is 19x19.
A chess piece is on the board, and the empty spot immediately adjacent to it(von Neumann neighbour) is the "energy" of this chess piece.
If there are pieces of the same color on the points immediately adjacent to the line, the pieces are connected to each other to form an inseparable whole.
If there are discolored pieces on the points immediately adjacent to the line, there is no energy here. If a piece loses all its energy, it cannot exist on the board.
The method of clearing the non-energized piece out of the chessboard is called "take out". There are two types of "take out":
1. After the move, if the opponent's chess piece is out of energy, the opponent's piece without energy should be took out immediately.
2. After the move, both pieces are in a state of no energy, and the opponent's piece of no energy should be took out immediately.
At any point on the board, if a player makes a move, the piece is immediately in a state of non-energized, and at the same time it cannot take out any opponent's piece. This point is called the "forbidden point". In the case of official matches, the right to abstain will be awarded, or treat as virtual move.
1. The game is final when both parties unanimously confirm the completion of the move.
2. When one of the players admits defeat in the middle of the game, it is the final game.
3. The continuous use of virtual by both sides is the final game.
My design is, red is state 1 and blue is state 2, state1 is first then state2. When the players placed their piece, go forward a generation.
Will anyone make Go into RULETABLE?
This is LittleLWSS.
Code: Select all
x = 5, y = 4, rule = B3/S23
o2bo$4bo$o3bo$b4o!
Code: Select all
x = 5, y = 4, rule = B3-k7/S23-ck4q5y
o2bo$4bo$o3bo$b4o!
Code: Select all
x = 5, y = 4, rule = B3-y7e/S2-n3-cey4ei
o2bo$4bo$o3bo$b4o!
Re: Rule request thread
I used to play Go fairly regularly, thirty years or so ago. It's a great game.
It can't be converted into a ruletable in any particularly straightforward way, though. Mostly this is because of what you call the "take out" rules -- I think "capture" is a more common translation.
I'm thinking you're going to need quite a lot more than just the two states representing the two players' pieces.
For an extreme case, there would be absolutely no way for the rule to know what the new state of the board should be, after just a single generation -- because of lightspeed limitations.LittleLWSS wrote: March 29th, 2025, 7:51 amWhen the players placed their piece, go forward a generation.
In this situation, for example, many dozens of ticks are needed for information to propagate from the move location (red) to the outside of the board:
Code: Select all
x = 21, y = 21, rule = B3-jknr4ity5ijk6i8/S23-a4city6c7cHistory
21F$F18ABF$FA16BABF$FAB14ABABF$FABA12BABABF$FABAB10ABABABF$FABABA8BAB
ABABF$FABABAB6ABABABABF$FABABABA4BABABABABF$FABABABAB2ABABABABABF$FAB
ABABABADBABABABABF$FABABABABA2BABABABABF$FABABABAB4ABABABABF$FABABABA
6BABABABF$FABABAB8ABABABF$FABABA10BABABF$FABAB12ABABF$FABA14BABF$FAB
16ABF$FA18BF$21F!So you either need to have two separate rules
(Player1GoProcessingRule and Player2GoProcessingRule)
or you need more states for both players, such that the players' pieces each alternate between two states. The two states would basically mean "This is Player N's piece and it's Player N's move" and "This is Player N's piece and it isn't Player N's move".
You'd need more states anyway to allow capture information to propagate -- something like "This is Player N's piece and it is in the process of being captured", which propagates at lightspeed von-Neumann-wise to neighboring Player N pieces, and changes to state 0 on the next tick.
-----------------------
It's a good thing that situations as awful as the above example spiral never arise in actual Go games -- it would be awfully fiddly work picking all of the captured pieces out from between the rows of capturing pieces!
Re: Rule request thread
can anybody make a more chaotic version of my rule B2o34p56/S2o3-m4p56H
make sure it's not explosive
Code: Select all
x = 1, y = 1, rule = B2o34p56/S2o3-m4p56H
b!aaaaaaaaaaaaaaaaaaaa i ar haev autsim
- hotcrystal0
- Posts: 4568
- Joined: July 3rd, 2020, 5:32 pm
- Location: wherever you think I am
Re: Rule request thread
This isn't exactly a normal request, but I still feel like it goes here.
A pair of rules, where one has B2a and the other doesn't where the one with B2a is nonexplosive, but the one without B2a is explosive. The only difference is the B2a (condition or transition or transition rule or whatever).
A pair of rules, where one has B2a and the other doesn't where the one with B2a is nonexplosive, but the one without B2a is explosive. The only difference is the B2a (condition or transition or transition rule or whatever).
Last edited by hotcrystal0 on March 29th, 2025, 4:15 pm, edited 1 time in total.
137 days until New York's age verification law goes into effect.
Code: Select all
x = 192, y = 53, rule = B3/S23
33$42b4o$41b6o$40b2ob4o$41b2o3$41b2o$39bo6bo$38bo8bo$38bo8bo$38b9o3$42b
4o$41b6o$40b2ob4o$41b2o!- unname4798
- Posts: 2529
- Joined: July 15th, 2023, 10:27 am
- Location: Near ConwayLife servers
Re: Rule request thread
Code: Select all
#R B2a/S12kn
!
[[ RANDOMIZE ]]
Code: Select all
#R B34/S34
!
[[ RANDOMIZE ]]
- confocaloid
- Posts: 6697
- Joined: February 8th, 2022, 3:15 pm
- Location: learn to protect yourself against stray gliders and sparks and self-destruct mechanisms
Re: Rule request thread
Given how the request is stated, the example by unname4798 is completely correct, although might not cover the intended request.
In case the idea was that B2a vs. A2a must be the only difference between the rulesets, I'm not sure whether that is possible at all. Explosivity without the rule B2a would need some of the rules B1c, B1e, B2c, B3i and some of the rules B1c, B1e, B2e, B3a. Nonexplosivity with the rule B2a is hard enough as it is.
It might be possible to do something vaguely similar with multiple cellstates or with a higher-range neighbourhood, but then it wouldn't be the difference between following the rule B2a and following the rule A2a, but instead a difference in some more finely-grained rule.
EDIT: also, it would depend on your definition of explosive CA and nonexplosive CA. For example, you could define explosivity in such a way that the following counts as explosive cellular automaton:
... while the following counts as nonexplosive cellular automaton:
... with the only difference between the rulesets being the rule B2a vs. A2a as requested, although now it's a five-state Generations CA.
In case the idea was that B2a vs. A2a must be the only difference between the rulesets, I'm not sure whether that is possible at all. Explosivity without the rule B2a would need some of the rules B1c, B1e, B2c, B3i and some of the rules B1c, B1e, B2e, B3a. Nonexplosivity with the rule B2a is hard enough as it is.
It might be possible to do something vaguely similar with multiple cellstates or with a higher-range neighbourhood, but then it wouldn't be the difference between following the rule B2a and following the rule A2a, but instead a difference in some more finely-grained rule.
EDIT: also, it would depend on your definition of explosive CA and nonexplosive CA. For example, you could define explosivity in such a way that the following counts as explosive cellular automaton:
Code: Select all
x = 16, y = 16, rule = 045678/2-a345678/5
A.A.4A3.2A.2A$4A4.3A.A.A$A.A.A.4A.4A$2.2A2.6A.A.A$A.5A.A4.A$2.A.A.2A.
3A$2.2A2.3A3.4A$A.3A.A.A.A2.2A$4A4.2A3.2A$2A2.4A.A.3A$A.A.A.A.5A.A$2A
2.A2.A.2A.A.2A$2A4.4A3.A.A$A.3A.A5.4A$A.2A4.2A.A2.A$3.3A3.2A.A.2A!
Code: Select all
x = 16, y = 16, rule = 045678/2345678/5
A.A.4A3.2A.2A$4A4.3A.A.A$A.A.A.4A.4A$2.2A2.6A.A.A$A.5A.A4.A$2.A.A.2A.
3A$2.2A2.3A3.4A$A.3A.A.A.A2.2A$4A4.2A3.2A$2A2.4A.A.3A$A.A.A.A.5A.A$2A
2.A2.A.2A.A.2A$2A4.4A3.A.A$A.3A.A5.4A$A.2A4.2A.A2.A$3.3A3.2A.A.2A!
hotcrystal0 wrote: March 29th, 2025, 3:49 pm This isn't exactly a normal request, but I still feel like it goes here.
A pair of rules, where one has B2a and the other doesn't where the one with B2a is nonexplosive, but the one without B2a is explosive.
127:1 B3/S234c User:Confocal/R (isotropic CA, incomplete)
Unlikely events happen.
My silence does not imply agreement, nor indifference. If I disagreed with something in the past, then please do not construe my silence as something that could change that.
Unlikely events happen.
My silence does not imply agreement, nor indifference. If I disagreed with something in the past, then please do not construe my silence as something that could change that.