Page 1 of 1

RuleLoader's B0 handling quirks

Posted: March 6th, 2018, 6:05 pm
by dani

Code: Select all


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

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
It can be turned into a blinker puffer:

Code: Select all

x = 7, y = 15, rule = LifeRLB0
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.

Re: RuleLoader's B0 handling quirks

Posted: March 6th, 2018, 6:19 pm
by 77topaz
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?

Re: RuleLoader's B0 handling quirks

Posted: March 6th, 2018, 7:30 pm
by 77topaz
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

Re: RuleLoader's B0 handling quirks

Posted: March 8th, 2018, 12:38 am
by SuperSupermario24
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, 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, will result in a single state 2 cell at the origin, but 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 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).

Re: RuleLoader's B0 handling quirks

Posted: March 17th, 2018, 4:17 pm
by muzik
Seems exceeding a population of 2^1024 produces nan.

Re: RuleLoader's B0 handling quirks

Posted: March 18th, 2018, 6:40 pm
by SuperSupermario24
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.