RuleLoader's B0 handling quirks

For discussion of other cellular automata.
Post Reply
dani
Posts: 1222
Joined: October 27th, 2017, 3:43 pm

RuleLoader's B0 handling quirks

Post by dani » March 6th, 2018, 6:05 pm

Code: Select all

@RULE LifeRLB0
@TABLE
n_states:3
neighborhood:Moore
symmetries:permute

var i={0,2}
var j=i
var k=i
var l=i
var m=i
var n=i
var o=i
var p=i
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

0,1,1,1,i,j,k,l,m,1
1,1,1,i,j,k,l,m,n,1
1,1,1,1,i,j,k,l,m,1
0,0,0,0,0,0,0,0,0,2
1,a,b,c,d,e,f,g,h,0
2,a,b,c,d,e,f,g,h,0
Above is an example of a phenomenon that only affects RuleLoader as far as I can tell, and it leads to interesting results.

Try running the R-Pentomino at step 8^0. By the time it has settled down after its 437-generation lifespan, it has 6,448,907,850,777,163,651,761,960,265,094,196,856,919,523,022,901,874,049,413,582,873,860,765,412,069,395,257,256,070,018,159,877,781,917,412,048,257,533,309,068,388,031,732,202,945,575,428,955,817,663,624,925,850,287,924,760,212,933,849,426,346,008,132,764,685,751,392,199,964,463,414,424,787,550,567,425,491,046,706,709,753,694,718,256,702,321,466,965 cells. Of those, an immense portion are state two or state zero cells, but there are some CGoL objects formed in this mess. Specifically, a glider, a beehive, 4 blinkers, and 4 blocks.

Now try running it at step 8^1. It's not only quicker, stabilizing sometime before generation 80, it also has much fewer cells, only 69 . Its census is a block, blinker, beehive, and boat. The other 51 cells (73.9%) are state two cells.

Instead of running it immediately, press space (or whatever goes to the next frame) once, as well as twice, before running again. You will observe different results.

Another quirk is that if you put down the R-pentomino, draw a cell, run for one step and undo, the ripples will occur differently, and the results above are only achievable if you start a new pattern every time.

Position matters, too. Plopping down the R-pentomino at (-30,-10) will be different than at the origin, as well as (-2,-2).

Despite all of this, it's still a relatively standard rule. It even has a cute-yet-also-world-breaking 5c/13:

Code: Select all

x = 6, y = 3, rule = LifeRLB0
.3A$3A.2A$.3A!
It can be turned into a blinker puffer:

Code: Select all

x = 7, y = 15, rule = LifeRLB0
.3A$3A.2A$.3A6$4.A$3.A.A$2.A3.A$.2A3.A$2.A3.A$3.A.A$4.A!
It works in both 8^0 and 8^1.

I don't fully understand these oddities quite yet, but hopefully you will get some entertainment out of it.

User avatar
77topaz
Posts: 1496
Joined: January 12th, 2018, 9:19 pm

Re: RuleLoader's B0 handling quirks

Post by 77topaz » March 6th, 2018, 6:19 pm

That's really weird behaviour. Doesn't Golly usually automatically invert B0 patterns every generation so that the background always appears dead? And shouldn't, without that, the population in the first generation be infinite, as the entire universe outside of the area of interest is alive? Why is it growing finitely?

User avatar
77topaz
Posts: 1496
Joined: January 12th, 2018, 9:19 pm

Re: RuleLoader's B0 handling quirks

Post by 77topaz » March 6th, 2018, 7:30 pm

A bit of explanation about this behaviour, lifted from the Discord:
BlinkerSpawn wrote:quadtrees grow exponentially the higher you go
they're the basis of hashing
77topaz wrote:So, at each generation, it "realises" that an exponentially-larger section of the universe "should" be alive, and so transitions the states for that section?
SuperSupermario24 wrote:basically yeah
the ruleloader algorithm essentially only considers a finite section of the universe at any given time, based on which cells are alive
normally this works fine because in any other rule (LtL uses a completely different algorithm) things can only move at c
but with B0 this becomes apparent because it's not the case anymore
since the size of said section grows exponentially as the B0 repeatedly causes it to fill completely (the width and height each increasing by a factor of 2 each time), so does the pattern
that's basically the ELI5 version coming from someone who knows absolutely nothing about how the algorithm actually works internally

User avatar
SuperSupermario24
Posts: 121
Joined: July 22nd, 2014, 12:59 pm
Location: Within the infinite expanses of the Life universe

Re: RuleLoader's B0 handling quirks

Post by SuperSupermario24 » March 8th, 2018, 12:38 am

That's interesting how there's no exponential growth when running at a step size that's a multiple of 2 (any multiple of 2, even something like 6^n, will work). I would expect it to happen regardless, but I guess multiple generations running within a single step are treated differently than generations being run individually.

Another interesting thing is that if you use a script to run n generations using g.run(n), there will be no exponential growth at all if n is an even number, but exponential growth will happen n times if it's an odd number. For example, if you start with a single state 1 cell at the origin, g.run(12) will result in a single state 2 cell at the origin, but g.run(11) results in a population of 53,665,251. (I would expect it to happen once if it's an odd number, given its behavior with even numbers. I guess it's not as simple as "generations within a step vs. generations individually", then.)

On the other hand, repeating g.run(1) n times will always result in exponential growth, even if it's an odd number, so it doesn't have anything to do specifically with Golly updating the display or anything (since scripts won't update the display until the end by default).

Code: Select all

bobo2b3o2b2o2bo3bobo$obobobo3bo2bobo3bobo$obobob2o2bo2bobo3bobo$o3bobo3bo2bobobobo$o3bob3o2b2o3bobo2bo!

User avatar
muzik
Posts: 5614
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

Re: RuleLoader's B0 handling quirks

Post by muzik » March 17th, 2018, 4:17 pm

Seems exceeding a population of 2^1024 produces nan.

User avatar
SuperSupermario24
Posts: 121
Joined: July 22nd, 2014, 12:59 pm
Location: Within the infinite expanses of the Life universe

Re: RuleLoader's B0 handling quirks

Post by SuperSupermario24 » March 18th, 2018, 6:40 pm

muzik wrote:Seems exceeding a population of 2^1024 produces nan.
I think that limitation might only apply to the iOS version. I seem to remember running into that at one point on iOS Golly, but on desktop it can easily go well beyond that: after a few thousand generations, the population count is displaying 8.21442e+2282.

Although now I wonder what the maximum population that can be displayed on the desktop version is.

Code: Select all

bobo2b3o2b2o2bo3bobo$obobobo3bo2bobo3bobo$obobob2o2bo2bobo3bobo$o3bobo3bo2bobobobo$o3bob3o2b2o3bobo2bo!

User avatar
muzik
Posts: 5614
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

Re: RuleLoader's B0 handling quirks

Post by muzik » December 10th, 2021, 5:22 pm

LifeViewer appears to just have this grow quadratically, likely due to not using HashLife:

Code: Select all

x = 2, y = 2, rule = LifeRLB0
2A$2A!
[[ AUTOFIT GRAPH STEP 2 NOTHROTTLE ]]

User avatar
FWKnightship
Posts: 1464
Joined: June 23rd, 2019, 3:10 am
Location: Hey,wait!! Where am I!? Help! Somebody help!I'm lost!!

Re: RuleLoader's B0 handling quirks

Post by FWKnightship » December 11th, 2021, 12:41 am

Code: Select all

@RULE LifeRLB0_emulated
@TABLE
n_states:5
neighborhood:Moore
symmetries:permute

var i={0,2,4}
var j=i
var k=i
var l=i
var m=i
var n=i
var o=i
var p=i
var a={0,1,2,3,4}
var b=a
var c=a
var d=a
var e=a
var f=a
var g=a
var h=a

0,1,1,1,i,j,k,l,m,3
1,1,1,i,j,k,l,m,n,3
1,1,1,1,i,j,k,l,m,3
0,1,a,b,c,d,e,f,g,2
1,a,b,c,d,e,f,g,h,2
2,2,2,2,2,2,2,2,2,4
2,3,3,3,i,j,k,l,m,1
3,3,3,i,j,k,l,m,n,1
3,3,3,3,i,j,k,l,m,1
0,4,a,b,c,d,e,f,g,2
4,a,b,c,d,e,f,g,h,2
3,a,b,c,d,e,f,g,h,0
2,a,b,c,d,e,f,g,h,0

Code: Select all

x = 7, y = 36, rule = LifeRLB0_emulated
.3A$3A.2A$.3A19$.3A$3A.2A$.3A6$4.A$3.A.A$2.A3.A$.2A3.A$2.A3.A$3.A.A$
4.A!
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'FWKnightship' object has no attribute 'signature'

User avatar
muzik
Posts: 5614
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

Re: RuleLoader's B0 handling quirks

Post by muzik » December 11th, 2021, 11:42 am

muzik wrote:
December 10th, 2021, 5:22 pm
LifeViewer appears to just have this grow quadratically, likely due to not using HashLife:

Code: Select all

x = 2, y = 2, rule = LifeRLB0
2A$2A!
[[ AUTOFIT GRAPH STEP 2 NOTHROTTLE ]]
For example, here's a pattern with an identically growing bounding box: (EDIT: I miscalculated, this actually grows much faster)

Code: Select all

x = 2, y = 2, rule = R31,C0,S0-3968,B1-3968
2o$2o!
[[ AUTOFIT GRAPH STEP 2 NOTHROTTLE THEME Mono ]]

User avatar
muzik
Posts: 5614
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

Re: RuleLoader's B0 handling quirks

Post by muzik » March 8th, 2023, 2:27 pm

I've been trying out RuleLoader B0 handling again lately. In Golly, this kind of stuff does not interact well with bounded grids, which is weird since bounded grids would probably be the best environment for running true B0 rules. Playback just gets slower and slower and slower. I presume that as the range grows exponentially, the amount of loops across the bounded grid must also grow exponentially, meaning that the processing time gets ridiculous before you even reach the double digits in generations.

If we run the same test pattern I used in Golly in LifeViewer instead, well, you can see the results for yourself:

Code: Select all

x = 75, y = 75, rule = AntiLife-RuleLoader:T75
75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o
$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$
75o$34ob3o3b34o$34o3b2ob35o$35ob39o$75o$75o$75o$75o$75o$75o$75o$75o$75o
$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$
75o$75o$75o$75o$75o$75o$75o$75o$75o$75o!
#C [[ MAXGRIDSIZE 9 ]]
@RULE AntiLife-RuleLoader
@TABLE
n_states:2
neighborhood:Moore
symmetries:permute
0,0,0,0,0,0,0,0,0,1
0,0,0,0,0,0,0,0,1,1
0,0,0,0,0,0,0,1,1,1
0,0,0,0,0,0,1,1,1,1
0,0,0,0,0,1,1,1,1,1
0,0,1,1,1,1,1,1,1,1
0,1,1,1,1,1,1,1,1,1
1,0,0,0,1,1,1,1,1,0
I really don't want to see B0 ruletables removed for either program. They're a lot of fun to mess with. I would like to see bounded grids work correctly with them in Golly though, since these rules are a very useful device for demonstrating how B0 emulation works, among other things.

User avatar
rowett
Moderator
Posts: 3776
Joined: January 31st, 2013, 2:34 am
Location: UK
Contact:

Re: RuleLoader's B0 handling quirks

Post by rowett » March 13th, 2023, 11:01 am

muzik wrote:
March 8th, 2023, 2:27 pm
If we run the same test pattern I used in Golly in LifeViewer instead, well, you can see the results for yourself:

Code: Select all

x = 75, y = 75, rule = AntiLife-RuleLoader:T75
75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o
$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$
75o$34ob3o3b34o$34o3b2ob35o$35ob39o$75o$75o$75o$75o$75o$75o$75o$75o$75o
$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$75o$
75o$75o$75o$75o$75o$75o$75o$75o$75o$75o!
#C [[ MAXGRIDSIZE 9 ]]
@RULE AntiLife-RuleLoader
@TABLE
n_states:2
neighborhood:Moore
symmetries:permute
0,0,0,0,0,0,0,0,0,1
0,0,0,0,0,0,0,0,1,1
0,0,0,0,0,0,0,1,1,1
0,0,0,0,0,0,1,1,1,1
0,0,0,0,0,1,1,1,1,1
0,0,1,1,1,1,1,1,1,1
0,1,1,1,1,1,1,1,1,1
1,0,0,0,1,1,1,1,1,0
LifeViewer now has improved support for RuleLoader B0 rules. They require a finite grid (i.e. a Bounded Grid with no infinite dimensions).

Antonin Duda
Posts: 57
Joined: October 19th, 2023, 10:23 am
Location: 404 not found

Re: RuleLoader's B0 handling quirks

Post by Antonin Duda » January 4th, 2024, 9:12 am

The behaviour of B0 jumpscares me a lot.

Post Reply