Date: 23/07/2016 10:34:18
From: The Rev Dodgson
ID: 928954
Subject: Golly Game of Life

Further to a mollwol post in chat:

http://tokyo3.org/forums/holiday/?main=http%3A//tokyo3.org/forums/holiday/posts/734116/

I have downloaded Golly from:
https://sourceforge.net/projects/golly/files/golly/

To get the python scripting to work the download file has to be the same bit level (32 or 64) as your python version, so run python (must be 2.7 I think) and note how many bits it has, then download the corresponding version of Golly.

To run a script just choose Run script from the file menu, and choose one of the scripts.

Now working for me with no problem.

Reply Quote

Date: 23/07/2016 15:00:16
From: mollwollfumble
ID: 929043
Subject: re: Golly Game of Life

The Rev Dodgson said:


Further to a mollwol post in chat:

http://tokyo3.org/forums/holiday/?main=http%3A//tokyo3.org/forums/holiday/posts/734116/

I have downloaded Golly from:
https://sourceforge.net/projects/golly/files/golly/

To get the python scripting to work the download file has to be the same bit level (32 or 64) as your python version, so run python (must be 2.7 I think) and note how many bits it has, then download the corresponding version of Golly.

To run a script just choose Run script from the file menu, and choose one of the scripts.

Now working for me with no problem.


Good it’s working for you. I’ll check later but think I have python versions 2.6, 2.7 and 3.5. The one that Golly asked for as default didn’t work so it asked me to specify a python DLL. I specified the python35.dll, to which it responded that some subroutine couldn’t be found and then wouldn’t let me try either of the other two versions. Exactly the same problem with Perl. Am trying to do this on 32 bit windows. Given problems there am now trying Golly on android. Can’t find any scripts at all there.

Further problems. Supposed to be able to open patterns on website. Can’t from windows or android.
Supposed to be able to input random start on android (no mention of this capability on windows). Can’t.
Other discrepancies between windows and android, too.

One thing I can say, though. Golly is incredibly fast. Results of the most complex constructs look remarkably biological.

Reply Quote

Date: 23/07/2016 16:58:24
From: mollwollfumble
ID: 929070
Subject: re: Golly Game of Life

Conway’s game of Life even has its very own Wiki.
http://conwaylife.com/wiki/Main_Page

My Python and Perl script error messages are:
“No Py_InitModule4” for Python.
“No Perl_sv_ziv_flags” for Perl.

For those forumites who want to know what Golly is, most if not all of the animations in the following Video are included in the demo files that come with Golly. The video includes oscillators, guns, space-fillers, spaceships and puffers. And there are even crazier cellular automata, the video doesn’t show any “rakes”, which are grandparent patterns – generators that generate an infinite number of generators.

https://www.youtube.com/watch?v=C2vgICfQawE

Reply Quote

Date: 23/07/2016 17:11:53
From: Peak Warming Man
ID: 929071
Subject: re: Golly Game of Life

Just be careful with this stuff.
Look what happened when God started mucking around with this sort of thing, He created runaway life and the humans got out of control and he had to get His son in to help him sort it out.
So just be careful.

Reply Quote

Date: 23/07/2016 18:08:25
From: mollwollfumble
ID: 929080
Subject: re: Golly Game of Life

Peak Warming Man said:


Just be careful with this stuff.
Look what happened when God started mucking around with this sort of thing, He created runaway life and the humans got out of control and he had to get His son in to help him sort it out.
So just be careful.

It’s quite clear that people who create these things enjoy “playing God”. It’s quite a challenging intelligence test.
My aim is to “play atheist” to see if random variations can at least begin to create the same sort of things.
Then apply the Drake equation to the results.

I may have to give up, I was thinking I could modify the c++ code ‘qlifealgo.cpp’ (ie. quick life algorithm) to do this fast. But I get lost for example in discerning the difference between a “block, brick, tile, level, cell, slice, trail, data”, not to mention “bit”, “flag” and “mask”. And some of the c++ notation makes no sense to me. For example, the part of the subroutine that calculates the population of dots is:

G_INT64 qlifealgo::find_set_bits(supertile *p, int lev, int gm1) { G_INT64 pop = 0 ; int i, j, k, b ; if (lev == 0) { tile *pp = (tile *)p ; b = 8 + gm1 * 12 ; pop = (pp->flags >> b) & 0xfff ; if (pop > 0×800) { pop = 0 ; for (i=0; i<4; i++) { if (pp->b != emptybrick) { for (j=0; j<8; j++) { k = pp->b->d ; if (k) pop += bc + bc + bc + bc ; } } } pp->flags = (long)((pp->flags & ~(0xfff << b)) | (pop << b)) ; } } else { if (p->flags & (0×20000000 << gm1)) { for (i=0; i<8; i++) if (p->d != nullroots) pop += find_set_bits(p->d, lev-1, gm1) ; if (pop < 500000000) { p->pop = (long)pop ; p->flags &= ~(0×20000000 << gm1) ; } else { p->pop = 0xfffffff ; // placeholder; some bits are set } } else { pop = p->pop ; } } return pop ;
}

which looks a lot different to the Fortran version.

if(a(i,j)) then pop=pop+1
end if

Reply Quote

Date: 23/07/2016 18:11:29
From: mollwollfumble
ID: 929081
Subject: re: Golly Game of Life

LOL, looks even worse when the forum editor removes the spaces.

Reply Quote

Date: 23/07/2016 19:01:44
From: The Rev Dodgson
ID: 929086
Subject: re: Golly Game of Life

mollwollfumble said:


My Python and Perl script error messages are:
“No Py_InitModule4” for Python.
“No Perl_sv_ziv_flags” for Perl.

Can’t help with the Perl, but for the Python I’m pretty sure the 2.7 version should work and the others won’t.

I’d suggest a reinstall using Anaconda Python, if your current installation can’t be made to work.

If you have an hour or three to waste that is :)

Reply Quote

Date: 24/07/2016 01:08:14
From: btm
ID: 929423
Subject: re: Golly Game of Life

mollwollfumble said:


My Python and Perl script error messages are:
“No Py_InitModule4” for Python.
“No Perl_sv_ziv_flags” for Perl.

I don’t know perl very well, but the python error is because you’re using 32-bit golly and 64-bit python. Try using the 64-bit golly.

Reply Quote

Date: 24/07/2016 06:44:37
From: mollwollfumble
ID: 929444
Subject: re: Golly Game of Life

The Rev Dodgson said:


mollwollfumble said:

My Python and Perl script error messages are:
“No Py_InitModule4” for Python.
“No Perl_sv_ziv_flags” for Perl.

Can’t help with the Perl, but for the Python I’m pretty sure the 2.7 version should work and the others won’t.

I’d suggest a reinstall using Anaconda Python, if your current installation can’t be made to work. If you have an hour or three to waste that is :)

The python error is because you’re using 32-bit golly and 64-bit python. Try using the 64-bit golly.


I had installed version 3.5 of Anaconda Python – which by the way I’ve still not figured out how to use. I could go back to version 2.7.

64-bit Python! This is only a 32 bit machine. How the heck could I have made that mistake, thanks.
That’s weird, the “Python 3.5” icon specifically says 32 bit.

When running Anaconda Python, do you use “Anaconda Prompt”, “Anaconda Navigator”, “IPython”, “Python 2.7”, “Spyder”, “Jupyter QTConsole” or “IDLE (Python 2.7)”, and why? I’m confused, why isn’t there just a single user interface? Do you write your Python scripts in a text editor like Notepad and then open them with one of those?

As for Golly, I may not have to do my own programming after all. The Glider Gun, more technically the Gosper Glider Gun, has never appeared from a primordial soup, but I’ve just discovered that two other similar objects have. To quote WikiLife:

“There are two basic types of stabilized switch engine, both of which were also found by Charles Corderman: the period 288 block-laying switch engine (the more common of the two) and period 384 glider-producing switch engine. These two puffers are the most natural infinite growth patterns in Life, being by far the most common ones to occur from non-symmetric random starting patterns. Switch engine-based puffers, and combinations thereof, are also the only infinite growth patterns observed to have emerged from primordial soups on Catagolue.”

BTW, “Catagolue” is not a misspelling. Looking up the “Catagolue” entry on LifeWiki now. The above is out of date

“25 Infinite-growth patterns” have appeared from a random start.

“The first known natural occurrence of a puffer other than the block-laying or glider-producing switch engine, a p1152 made from two switch engines dubbed the pony express, was found in September 2015.”

A symmetric primordial soup may not count as being natural. “The pufferfish was discovered in the ash of symmetric soups.”

https://catagolue.appspot.com/home

“How can I contribute to the search? You can run the search program on your computer, which will rapidly search random initial ‘soups’ and periodically upload the results to Catagolue. The recommended version of the search program is a highly-optimised C++ program available here. An alternative is the older Python version, but this is considerably slower than the C++ version.”

It looks like many people have already been looking at the abiological origins of life from primordial soup in Conway’s Life. Sort of like SETI@Home.

OMG. If we treat “infinite growth” as a polymerase, then “the period 288 block-laying switch engine and period 384 glider-producing switch engine” turn out to be startlingly common, with 47 million of the first and 17 million of the second found so far. Compare that with 0.21 million of the queen bee shuttle and 0.0002 million of the twin bee shuttle – the Gosper Glider Gun is very like the twin bee shuttle, but hasn’t appeared yet. The “pony express” has appeared once, it uses two switch engines.

Reply Quote

Date: 24/07/2016 09:17:46
From: The Rev Dodgson
ID: 929460
Subject: re: Golly Game of Life

mollwollfumble said:

When running Anaconda Python, do you use “Anaconda Prompt”, “Anaconda Navigator”, “IPython”, “Python 2.7”, “Spyder”, “Jupyter QTConsole” or “IDLE (Python 2.7)”, and why? I’m confused, why isn’t there just a single user interface? Do you write your Python scripts in a text editor like Notepad and then open them with one of those?

I’m very much a beginner at Python, and pretty well my only use for it is getting access to fast numerical routines in Numpy and Scipy (and others) from Excel, using xlwings (which is included in Anaconda Python), and linking to compiled Fortran code from Excel.

But FWIW, I do my coding in a text editor, usually Notepad++, but sometimes MS Visual Studio Community, which is quite nice, but takes forever to load.

If I want to run direct from Python, rather than Excel, I open a cmd window, then type Python.

Reply Quote

Date: 24/07/2016 09:24:06
From: The Rev Dodgson
ID: 929461
Subject: re: Golly Game of Life

By the way, I did a spreadsheet version of Life back in the days when Excel was called 123. Must look it up and see how well it goes on modern computers.

Reply Quote

Date: 24/07/2016 16:35:15
From: mollwollfumble
ID: 929543
Subject: re: Golly Game of Life

The Rev Dodgson said:


mollwollfumble said:

When running Anaconda Python, do you use “Anaconda Prompt”, “Anaconda Navigator”, “IPython”, “Python 2.7”, “Spyder”, “Jupyter QTConsole” or “IDLE (Python 2.7)”, and why? I’m confused, why isn’t there just a single user interface? Do you write your Python scripts in a text editor like Notepad and then open them with one of those?

I’m very much a beginner at Python, and pretty well my only use for it is getting access to fast numerical routines in Numpy and Scipy (and others) from Excel, using xlwings (which is included in Anaconda Python), and linking to compiled Fortran code from Excel.

But FWIW, I do my coding in a text editor, usually Notepad++, but sometimes MS Visual Studio Community, which is quite nice, but takes forever to load.

If I want to run direct from Python, rather than Excel, I open a cmd window, then type Python.

By the way, I did a spreadsheet version of Life back in the days when Excel was called 123. Must look it up and see how well it goes on modern computers.


Where do you open the cmd window from? From DOS, from Cygwin, from Excel, from Anaconda prompt, from elsewhere?

> I did a spreadsheet version of Life back in the days when Excel was called 123

Then you’re one up on me. I tried and failed to write a PL-1 verson of Life in, I think it was late 1974 or early 1975. On punched tape. The first computer program I ever tried to write.

On the topic of Golly, from Catagolue I now might have enough information to evaluate the Drake equation,
http://i120.photobucket.com/albums/o162/DavidPaterson/SSSF/Drake_zpstxdterxv.jpg

Reply Quote

Date: 24/07/2016 17:14:55
From: The Rev Dodgson
ID: 929549
Subject: re: Golly Game of Life

mollwollfumble said:


Where do you open the cmd window from? From DOS, from Cygwin, from Excel, from Anaconda prompt, from elsewhere?

Which Windows are you using?

Actually I think this will work in any recent Windows:

In File Explorer go to the folder with your Python code, then click the File menu, and there should be an option for Open Command Prompt.

Reply Quote

Date: 24/07/2016 17:16:19
From: poikilotherm
ID: 929550
Subject: re: Golly Game of Life

click on run, then type cmd

If win 8 or 10, type cmd in the Search the web and Windows box

I reckon you’re still using XP…

Reply Quote

Date: 24/07/2016 17:36:02
From: The Rev Dodgson
ID: 929551
Subject: re: Golly Game of Life

poikilotherm said:


click on run, then type cmd

If win 8 or 10, type cmd in the Search the web and Windows box

But then you have to go to the directory you want, so it’s easier to go where you want with File Manager, and start from there.

But the way I do it is using Total Commander, which has a command line built in, so I can go to the directory I want and type cmd in the TC command line, then python in the command window, or just type python on the TC command line.

Reply Quote

Date: 24/07/2016 19:07:35
From: poikilotherm
ID: 929572
Subject: re: Golly Game of Life

The Rev Dodgson said:


poikilotherm said:

click on run, then type cmd

If win 8 or 10, type cmd in the Search the web and Windows box

But then you have to go to the directory you want, so it’s easier to go where you want with File Manager, and start from there.

But the way I do it is using Total Commander, which has a command line built in, so I can go to the directory I want and type cmd in the TC command line, then python in the command window, or just type python on the TC command line.

I guess, I don’t use it often enough to be fussed by having to go to the directory I want.

Reply Quote

Date: 25/07/2016 04:44:10
From: mollwollfumble
ID: 929754
Subject: re: Golly Game of Life

The Rev Dodgson said:


mollwollfumble said:

Where do you open the cmd window from? From DOS, from Cygwin, from Excel, from Anaconda prompt, from elsewhere?

Which Windows are you using?

Actually I think this will work in any recent Windows:

In File Explorer go to the folder with your Python code, then click the File menu, and there should be an option for Open Command Prompt.


DOS window then.

I don’t seem to have a “File” menu. Not sure I have “File explorer” either.

I keep a desktop shortcut to C:\Windows\System32\cmd.exe
Once in, change to my Python script directory, currently
cd C:\Users\David\Downloads\golly-2.7-src\Scripts\Python
Type “Python”

Slightly quicker using “Anaconda Prompt” desktop shortcut.
Once in, change to my Python script directory using
cd Downloads\golly-2.7-src\Scripts\Python
Type “Python”

Then how do I load a script?

On Drake equation (darn darn) not enough information. It all depends on the definition of “random” and the problem of the buffer zone required around each starting state. If “random” means “small block of random dots placed randomly far apart on the universe” then the Catagolue results mean that the abiological origin of the Pony Express is virtually certain in negligible time. The Pony Express is the simplest pattern that generates a polymer and then reads the information in that polymer to produce a second polymer. But if random means “each cell has the same probability of being a dot” then without further information the probability of the Pony Express is vanishingly small, of order 10^100:1 against.

You strike exactly the same sort of problem estimating the probability of origin of carbon-based life.

The published equation needs a correction, replace <n_0> with n_0+<n_b>, where <n_b> is the average number of units in the buffer zone around the protolife that need to be free from deadly threats in order for the organism to reproduce once. Without a pre-existing cell wall, n_b >> n_0.

Reply Quote

Date: 25/07/2016 10:48:52
From: mollwollfumble
ID: 929792
Subject: re: Golly Game of Life

Golly Game of Life. Pony Express.

I had hoped to post a video of this, it’s the closest so far to an abiologically generated lifeform on Life. But there’s no video on the web, and I can’t get video capture to work here. So here’s a set of snapshots, starting from a random pattern on a 16*16 grid, initial development, and further development.







Note the stream of gliders heading towards the upper right corner in the last image. This pattern grows without limit.

Reply Quote

Date: 25/07/2016 21:16:14
From: mollwollfumble
ID: 930065
Subject: re: Golly Game of Life

> Golly supposed to be able to input random start on android (no mention of this capability on windows). Can’t.

Figured out how to do it on both Windows and Android.

> Then how do I load a script?

ie, Rev D, what do I do after I type “Python”?

Reply Quote

Date: 25/07/2016 22:27:55
From: The Rev Dodgson
ID: 930070
Subject: re: Golly Game of Life

mollwollfumble said:

> Then how do I load a script?

ie, Rev D, what do I do after I type “Python”?

I’m not really the right person to ask, because almost everything I do is calling Python functions from somewhere else, but if you have a file with a load of functions in it (say pyfuncs.py), then you can enter:
import pyfuncs as pf

then you can use any of the functions in pyfuncs just like built in functions (but preceded with pf.)

Or you can enter:
from pyfuncs import *
then you can use them without the pf.

If that doesn’t suit what you want to do, this looks like an OK tutorial:

http://www.python-course.eu/python3_execute_script.php

Reply Quote

Date: 28/07/2016 14:36:16
From: bob(from black rock)
ID: 931571
Subject: re: Golly Game of Life

Peak Warming Man said:


Just be careful with this stuff.
Look what happened when God started mucking around with this sort of thing, He created runaway life and the humans got out of control and he had to get His son in to help him sort it out.
So just be careful.

Kids always have to explain new technology to their parents.

Reply Quote

Date: 31/07/2016 05:21:40
From: mollwollfumble
ID: 932995
Subject: re: Golly Game of Life

The Rev Dodgson said:


mollwollfumble said:

> Then how do I load a script?

ie, Rev D, what do I do after I type “Python”?

I’m not really the right person to ask, because almost everything I do is calling Python functions from somewhere else, but if you have a file with a load of functions in it (say pyfuncs.py), then you can enter:
import pyfuncs as pf

then you can use any of the functions in pyfuncs just like built in functions (but preceded with pf.)

Or you can enter:
from pyfuncs import *
then you can use them without the pf.

If that doesn’t suit what you want to do, this looks like an OK tutorial:

http://www.python-course.eu/python3_execute_script.php

Ta. You are the right person to ask.

BTW, I can’t get my standalone high speed Fortran simulation of Game of Life to work. It performs perfectly well on small test problems (eg. 20*20) but misbehaves badly for real problems (eg. 2048*2048).

Reply Quote

Date: 5/08/2016 12:11:39
From: mollwollfumble
ID: 935952
Subject: re: Golly Game of Life

I know you don’t really care, but I’m going to boast anyway.

Time to complete, 5% random start on a 2048*2048 toroidal grid.
Quicklife algorithm is the generally preferred computer algorithm for problems like this.

Android: Golly using quicklife algorithm 10,000 generations, 106m 50s
Windows: Golly using quicklife algorithm 10,000 generations 23m 43s
Android: Golly using hashlife algorithm 20,000 generations 2m 44s
Windows: Golly using hashlife algorithm 20,000 generations 40s
Cygwin: mollwollfumble’s Fortran algorithm 20,000 generations 6s exactly.

(Does little victory dance)
It’s what mollwollfumble does – speeding up things. Factor of 1000 speedup between quicklife on Android and mollwollfumble’s algorithm. Factor of 6.5 speedup over best Golly algorithm.

Respond here if you want me to post entire code. It’s only ~100 lines long.

Reply Quote