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

Golly script help needed.

For scripts to aid with computation or simulation in cellular automata.

Golly script help needed.

Postby rkauppila » October 31st, 2014, 10:47 am

Hi!
I found an interesting family of oscillators in a Weighted Life rule. The rule is quite complex but
the oscillators are supported by the following minimal "Miniosc" rule:
NW5,NN1,NE5,EE1,SE5,SS1,SW5,WW1,ME0,HI0,RB2,RB7,RB10,RS0,RS5,RS10
and the corresponding Golly rule is:

num_states=2
num_neighbors=8
num_nodes=31
1 0 1
1 0 0
2 0 1
1 1 0
2 1 3
3 2 4
2 3 1
3 4 6
4 5 7
2 1 1
3 6 9
4 7 10
5 8 11
6 12 12
1 1 1
2 14 1
3 15 9
3 9 9
4 16 17
4 17 17
5 18 19
6 12 20
7 13 21
5 19 19
6 20 23
7 21 24
8 22 25
6 23 23
7 24 27
8 25 28
9 26 29


Let P(n) denote an array of n diagonal cells, like this P(11):
{code]
x = 11, y = 11, rule = Miniosc
10bo$9bo$8bo$7bo$6bo$5bo$4bo$3bo$2bo$bo$o!
[/code]

This is an oscillator with the period 126. For odd n P(n) seems to be an oscillator with (n+1)/2 as the size
of its smallest phase. For most even n P(n) is a seed of some oscillator, but for example P(2) and P(6)
vanish.
The period of P(n), shortly p(n) here, behaves irregularly for odd integers. For example:
p(15) = 30, p(17) = 1022, p(19) = 126, p(21) = 4094. My problem is that the period of P(n)
may be fairly big even for comparatively small n. I just found that the half-period of P(57) is
536,870,911, and it took nearly two days for my slow code to get it. I extracted the code from
my own simulator that serves me well as a rule-explorer, but its nextGen() is based on an
old Life-program that ! wrote about 15 years ago when learning to program.

Is it hard to write a Python script for Golly to get the period of P(n)? I've coded mainly in C, Java, Qt and
Perl and written few lines in Python.
I found experimentally that for odd n, the maximum population of P(n) is (n*n + 2*n -1)/2 and that occurs
first time at generation (p(n)/2 -1)/2. So the script should do the following for odd input n:
Check that n is odd and n > 1.
Draw P(n) as the starting pattern.
Run generations until population (n*n + 2*n -1)/2 occurs and return its generation.

Since the bounding box of P(n) is the square of nxn cells (determined always by its least phase of (n+1)/2 cells,
writing fast C code to do that should also be possible, but I'm short of time at the moment.

I'm mainly interested in number-theoretic aspects of p(n).

Risto Kauppila
rkauppila
 
Posts: 5
Joined: February 3rd, 2013, 4:50 am

Re: Golly script help needed.

Postby rkauppila » November 1st, 2014, 3:31 pm

The period of P(n) for odd n seems to be always of the form 2^k - 2. Perhaps the solution of the problem
demands more reasoning than coding and computing.

Risto Kauppila
rkauppila
 
Posts: 5
Joined: February 3rd, 2013, 4:50 am

Re: Golly script help needed.

Postby rkauppila » November 2nd, 2014, 9:40 am

The periods of p(n) for odd n seem to be found in OEIS:
A160657

In the rule space I explore a rule is defined by a set of strings
Bxy, Sxy, where x is the number of live diagonal neighbours and
y is the number of live orthogonal neighbours of a cell.
In this notation the rule for B3/S5 is { B03 B12 B21 B30 S14 S23 S32 S41 }
while Miniosc is { B02 B12 B20 S00 S10 S20 }.
In fact, a minimal rule in my isotropic rule space supporting those rectangular
oscillators is { B21 S23 }, By using diagonal weight 5 and orthogonal weight 1
this rule is in MCell: NW5 NN1 NE5 EE1 SE5 SS1 SW5 WW1 ME0 HI0
RB11 RS 13. EricG's Weightedlife->RuleTree(1.0).py gives then this Golly rule:
num_states=2
num_neighbors=8
num_nodes=26
1 0 0
2 0 0
3 1 1
4 2 2
5 3 3
6 4 4
1 1 0
2 0 6
2 6 0
3 7 8
1 0 1
2 0 10
3 8 11
4 9 12
2 10 0
3 11 14
4 12 15
5 13 16
6 4 17
7 5 18
6 17 4
7 18 20
8 19 21
7 20 5
8 21 23
9 22 24


I can't see any reason why the rectangular oscillators in this rule behave very similarly than P(n)'s
in Miniosc.
But now this thread seems to be in a wrong forum. The above looks like Nathaniel's stuff.

Risto Kauppila
rkauppila
 
Posts: 5
Joined: February 3rd, 2013, 4:50 am


Return to Scripts

Who is online

Users browsing this forum: No registered users and 1 guest