Infinite patterns (generation 0 being infinite)
Posted: February 21st, 2022, 1:16 pm
Have infinite patterns ever being studied somewhere?
Here, by infinite I mean that generation 0 has an infinite amount of cells that are alive.
We could define such an infinite 0-generation in a function such as:
Then for any given x, y and generation g, we could determine if (x,y) is alive in generation g with recursion:
(Performance-wise this is far from optimal, I know, but it shows what I mean.)
An infinite pattern is essentially different from a finite subset of it that runs in Golly, it will only be similar in the first so many generations.
Here, by infinite I mean that generation 0 has an infinite amount of cells that are alive.
We could define such an infinite 0-generation in a function such as:
Code: Select all
def IsAlive_G0(self, x, y):
if self.ff.IsPrime((12 * x) + 1):
return True
if self.ff.IsPrime((8 * y) + 1):
return True
if self.ff.IsPrime((12 * (x - 1)) + 1):
return True
if self.ff.IsPrime((8 * (y - 1)) + 1):
return True
return False
Code: Select all
def IsAlive(self, x, y, g):
if g == 0:
return self.IsAlive_G0(x, y)
n = 0
for i in range(x - 1, x + 2):
for j in range(y -1, y + 2):
if (i != x or j != y):
if self.IsAlive(i, j, g - 1):
n = n + 1
if self.IsAlive(x, y, g - 1):
if n < 2 or n > 3:
return False
else:
return True
else:
if n == 3:
return True
else:
return False
An infinite pattern is essentially different from a finite subset of it that runs in Golly, it will only be similar in the first so many generations.