Methuselah search program

For scripts to aid with computation or simulation in cellular automata.
Post Reply
googleplex
Posts: 219
Joined: January 24th, 2018, 4:36 pm

Methuselah search program

Post by googleplex » February 3rd, 2018, 4:01 pm

I was attempting to find Methuselahs when I had an idea:
Why waste time finding them manually when I could write a program to do it?
However, the only programming language I know is Python 3, and I am self-taught.
This is my idea of the procedure:
  • 1. Find conduit objects (see below)
    2. Find sparks within 20 cells of the initial object
    3. Add still lives/constellations
    4. Optimise population (replace blocks with pre-blocks, traffic lights with T-Tetrominoes, etc.)
    5. Report findings into files (RLE)
    6. Repeat
How conduit objects are found :
  • 1. generate a random seed
    2. start with one cell
    3. add-on 1-2 2-4 cell expansion lines from that one cell.
    4. add 1-3 cells with a gap of one cell from everything else
    5. simulate it with hashlife
    6. does it emit at least one glider to within 20 cells of itself?
    7. does it leave at least 3 still lives behind once it stabilizes?
    8. at any point in its life does one of its boundaries be 2x its initial boundaries?
    9.if two of 6, 7, or 8 are true, it is a conduit object.
Can someone help me actually make this a program (preferably Python, but Potentially C/C++)
Look at me! I make patterns in golly and go on the forums! I wanna be Famous!

User avatar
vyznev
Posts: 27
Joined: April 23rd, 2016, 4:08 am

Re: Methuselah search program

Post by vyznev » February 3rd, 2018, 9:45 pm

I see no reason why you couldn't do just what you suggest. If you don't want to implement your own GoL simulation code in Python, you could use the Golly Python API and let Golly handle the actual simulation for you.

AFAIK, Golly currently only supports Python 2.7, but the differences between Python 2 and Python 3 aren't that great, and many of them can be smoothed over with from __future__ import ....

I wonder what your definition of of Methuselah is, though. Because if you require a Methuselah to be very small in an absolute sense (bounding box, population), you're probably better off just generating small patterns and testing them to see how long they live. Whereas if you just want to maximize the ratio of lifespan to initial population (or bounding box size or whatever), it's possible to construct extensible families of patterns where the former grows as an exponential function of the latter, like this extensible diehard I recently built. (Combining that with a puffer that can be killed by a glider / *WSS from behind should fairly easily yield an exponential final population as well.)

Still, I'm sure you could find something interesting with a search like that. You won't know until you try, anyway.

googleplex
Posts: 219
Joined: January 24th, 2018, 4:36 pm

Re: Methuselah search program

Post by googleplex » February 3rd, 2018, 9:57 pm

I just... don't have any Idea on how to go about doing this, turning idea into reality.
Look at me! I make patterns in golly and go on the forums! I wanna be Famous!

User avatar
dvgrn
Moderator
Posts: 6488
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Methuselah search program

Post by dvgrn » February 3rd, 2018, 10:15 pm

googleplex wrote:I just... don't have any Idea on how to go about doing this, turning idea into reality.
Well, you have a good start -- problem divided into reasonably specific steps. If you think you might be able to write Python code for each of those steps, then string them together, then you'll be all set... eventually.

The least specific steps are probably #2 through #4 in your second list. I'm not sure how "start with one cell" matches up with "generate a random seed" -- do you mean you'll pick one cell from your random seed, and then pick other cells near it that match your criteria in #3 and #4?

That will take some slightly fiddly coding, but it doesn't seem impossible. The first step is to generate a random seed. To get started, I'd suggest you start running existing Golly search scripts, and borrowing code from them. For example, if you work through this methuseblob search script until you understand what each line is doing, you'll be a long way toward having a handle on how your project could be coded as a Golly Python script.

Don't be afraid to break things -- start with the working script, change a line, and see what happens. Or add lines like

Code: Select all

g.note(str([variablename1, variablename2, variablename3]))
to see what the contents of different variables look like -- and so on.

The "g.select(...)" and "g.randfill(50)" part should at least get you past the first item in your second to-do list!

User avatar
Apple Bottom
Posts: 1030
Joined: July 27th, 2015, 2:06 pm
Contact:

Re: Methuselah search program

Post by Apple Bottom » February 4th, 2018, 5:34 am

Re: searching for methuselahs in general, there's also Simon Ekström's meth_h4.

(Hmm, I wonder if that "new version [...] that will be a lot faster" he mentioned ever came about.)
If you speak, your speech must be better than your silence would have been. — Arabian proverb

Catagolue: Apple Bottom • Life Wiki: Apple Bottom • Twitter: @_AppleBottom_

Proud member of the Pattern Raiders!

Post Reply