Thread for your script-related questions

For scripts to aid with computation or simulation in cellular automata.
User avatar
dvgrn
Moderator
Posts: 10612
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI
Contact:

Re: Thread for your script-related questions

Post by dvgrn » April 22nd, 2019, 6:01 pm

googoIpIex wrote:how do I add custom puzzles to Seeds of Destruction?
Copy a puzzle in LifeHistory format from Golly, open the SoD GUI, fiddle with the mousewheel so that the Puzzle/Seed button reads "Puzzle", and click the "Puzzle" button.

-- Unless you mean adding new puzzles to the default set of puzzles that come with the SoDGame. Someone else would have to answer that one. Mysterious things have always gone wrong when I've tried to recompile that Java application... but mostly it's just that all the extra curly braces and semicolons start giving me the cold shudders, and I stop trying too soon.

User avatar
Gustone
Posts: 744
Joined: March 6th, 2019, 2:26 am

Re: Thread for your script-related questions

Post by Gustone » May 10th, 2019, 6:44 am

How do I make Golly recognise Python?

User avatar
Moosey
Posts: 4306
Joined: January 27th, 2019, 5:54 pm
Location: here
Contact:

Re: Thread for your script-related questions

Post by Moosey » May 10th, 2019, 7:49 am

Gustone wrote:How do I make Golly recognise Python?
Just go to the open pattern thing and then go wherever (i.e. basically anywhere on your files) your python script is, whether in Golly or not.
not active here but active on discord

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

Re: Thread for your script-related questions

Post by dvgrn » May 10th, 2019, 9:03 am

Moosey wrote:
Gustone wrote:How do I make Golly recognise Python?
Just go to the open pattern thing and then go wherever (i.e. basically anywhere on your files) your python script is, whether in Golly or not.
Or, if that didn't answer your question -- install Python, making very very sure sure that you install the version of Python 2.7.16 that matches your version of Golly. I.e., 32-bit Python if your Golly is 32-bit, or 64-bit Python if your Golly is 64-bit. You find that out by checking the status bar when you first open Golly.

User avatar
Gustone
Posts: 744
Joined: March 6th, 2019, 2:26 am

.

Post by Gustone » May 10th, 2019, 12:55 pm

.
Last edited by Gustone on June 8th, 2021, 5:10 am, edited 1 time in total.

User avatar
LaundryPizza03
Posts: 2297
Joined: December 15th, 2017, 12:05 am
Location: Unidentified location "https://en.wikipedia.org/wiki/Texas"

Re: Thread for your script-related questions

Post by LaundryPizza03 » August 5th, 2019, 7:20 am

What is the best script for completing a 9c/10 orthogonal spaceship partial? (At least two partials, of width 21, have been found. I know that ntzfind and ntgfind don't work. I'd prefer something fully automated.)

Code: Select all

x = 4, y = 3, rule = B3-q4z5y/S234k5j
2b2o$b2o$2o!
LaundryPizza03 at Wikipedia

User avatar
testitemqlstudop
Posts: 1367
Joined: July 21st, 2016, 11:45 am
Location: in catagolue
Contact:

Re: Thread for your script-related questions

Post by testitemqlstudop » August 5th, 2019, 9:21 pm

If you are going to search for 9c/10 in a broad range of rules then use LLS. Otherwise it might be feasible to incrementally brute-force enumerate which successor row makes the partial "go further".

CoolCreeper39
Posts: 58
Joined: June 19th, 2019, 12:18 pm

Re: Thread for your script-related questions

Post by CoolCreeper39 » August 8th, 2019, 4:17 pm

Is there any way to make a script that checks for the longest-lived methuselahs in a rule, within an n-cell bounding box?

wildmyron
Posts: 1542
Joined: August 9th, 2013, 12:45 am
Location: Western Australia

Re: Thread for your script-related questions

Post by wildmyron » August 9th, 2019, 12:50 am

CoolCreeper39 wrote:Is there any way to make a script that checks for the longest-lived methuselahs in a rule, within an n-cell bounding box?
This is definitely possible. The most optimized published program for methuselah searching is this one by simeks. It is CGoL only and written in C (and assembly?), but if you're interested in optimized algorithms it's the best I'm aware of.

There are probably more general implementations published somewhere here, but I can't seem to find any after a brief search through the forums. You'll need two main parts to for this script:

- An enumeration of all patterns (of a given cell count?) within a given bounding box. A naive implementation of this is very simple, but you'll want to avoid testing the same pattern multiple times.

- A way to run a pattern to stabilisation and detect when the pattern stabilised. This is the tricky bit, particularly given the need to deal with linear growth. You could look at apgsearch for ideas as well as simeks program. apgsearch actually has two algorithms for this process: stabilise3() to give an estimate of the time to stabilisation (almost always an overestimate except for patterns in very long lived rules) and methudetect() which gives a fairly accurate stabilisation time (but is only used for CGoL).
The 5S project (Smallest Spaceships Supporting Specific Speeds) is now maintained by AforAmpere. The latest collection is hosted on GitHub and contains well over 1,000,000 spaceships.

Semi-active here - recovering from a severe case of LWTDS.

User avatar
muzik
Posts: 5614
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

Re: Thread for your script-related questions

Post by muzik » January 27th, 2020, 5:25 pm

I gave my computer a good 100 hours with FredkinModN.py to generate a modulo 3 triangular grid replication rule, and got this as an output:

Code: Select all

x = 1, y = 1, rule = Fredkin_mod3_triangularMoore_emulated
o!
The pattern stays symmetrical, and there's certaintly a lot of dying that happens on each generation 3^n, but this really doesn't feel right, as the pattern should be a sawtooth and replicator. Is the script at fault here, or is there some weird quirk of the triangular grid or 3-state rules or otherwise that causes parity rules to be like this in these cases?

Hunting
Posts: 4395
Joined: September 11th, 2017, 2:54 am

Re: Thread for your script-related questions

Post by Hunting » February 7th, 2020, 4:45 am

What is lifelib?

User avatar
Ian07
Moderator
Posts: 891
Joined: September 22nd, 2018, 8:48 am
Location: New Jersey, US

Re: Thread for your script-related questions

Post by Ian07 » February 7th, 2020, 7:00 am

Hunting wrote:
February 7th, 2020, 4:45 am
What is lifelib?
lifelib

Hunting
Posts: 4395
Joined: September 11th, 2017, 2:54 am

Re: Thread for your script-related questions

Post by Hunting » February 7th, 2020, 7:13 am

Ian07 wrote:
February 7th, 2020, 7:00 am
Hunting wrote:
February 7th, 2020, 4:45 am
What is lifelib?
lifelib
Wow thanks.

Now I had it, and then

Code: Select all

Traceback (most recent call last):
  File "afascss.py", line 45, in <module>
    lt = lifelib.load_rules(args.rule).lifetree()
  File "D:\Python37\lib\site-packages\python_lifelib-2.2.20-py3.7.egg\lifelib\au
tocompile.py", line 294, in load_rules
    soname = compile_rules(*rules, **kwargs)
  File "D:\Python37\lib\site-packages\python_lifelib-2.2.20-py3.7.egg\lifelib\au
tocompile.py", line 230, in compile_rules
    ccargs = get_compiler() + obtain_arguments(soname, **kwargs)
  File "D:\Python37\lib\site-packages\python_lifelib-2.2.20-py3.7.egg\lifelib\au
tocompile.py", line 144, in get_compiler
    return get_local_bash() + ['g++']
  File "D:\Python37\lib\site-packages\python_lifelib-2.2.20-py3.7.egg\lifelib\au
tocompile.py", line 128, in get_local_bash
    return [os.path.join(get_cygwin_dir(), 'bin', 'bash.exe'), os.path.join(life
lib_dir, 'cygbash.sh')]
  File "D:\Python37\lib\site-packages\python_lifelib-2.2.20-py3.7.egg\lifelib\au
tocompile.py", line 33, in get_cygwin_dir
    raise ValueError("Cygwin directory unknown; please call lifelib.add_cygdir(r
'D:\\path\\to\\cygwin64') or lifelib.install_cygwin()")
ValueError: Cygwin directory unknown; please call lifelib.add_cygdir(r'D:\path\t
o\cygwin64') or lifelib.install_cygwin()
and yes I just installed cygwin


what happened?

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

Re: Thread for your script-related questions

Post by dvgrn » February 7th, 2020, 8:54 am

Hunting wrote:
February 7th, 2020, 7:13 am
what happened?
It's really helpful if you can include the command that you ran to cause the error, as well as the error message.

Did you read the error message, and did you try what the last couple of lines say to try?

Hunting
Posts: 4395
Joined: September 11th, 2017, 2:54 am

Re: Thread for your script-related questions

Post by Hunting » February 7th, 2020, 9:30 am

dvgrn wrote:
February 7th, 2020, 8:54 am
Hunting wrote:
February 7th, 2020, 7:13 am
what happened?
It's really helpful if you can include the command that you ran to cause the error, as well as the error message.

Did you read the error message, and did you try what the last couple of lines say to try?
Solved, all solved now. Currently, I'm stuck on the Compiling lifelib shared object process. 99%. 99%. 99%. And nothing happened.

User avatar
dexter1
Posts: 71
Joined: February 26th, 2020, 8:46 am

Re: Thread for your script-related questions

Post by dexter1 » February 26th, 2020, 9:34 am

LSSS memory-, disk-, and threadusage

Hello all, first post on this forum.

Being a long time fan of GoL i decided to participate in finding new patterns for B3/S23/C1 most notably spaceships and oscillators.
I realize that a lot of work has been done in terms of scripts and programs in finding these patterns and a lot of archived material is present for me to check against. Great!

In order to find new patterns, i decided to familiarize myself with the current tools used in patterns searching. So far i have started using:
- WLS
- JLS
- gfind
- Logic Life Search (LLS) with various SAT solvers (glucose-syrup/minisat/lingeling and derivatives)
- Life Slice Ship Search (LSSS)

Apart form WLS i run everything in Linux. I have a dedicated machine for this: (dual Xeon 4C/8T so 16 threads in total, 16Gb memory, about 250GB diskspace)

Among all programs i compiled and ran, LSSS is the most taxing program i have come across. Compiling with Rust went fine and for a test run i tried to search for Copperhead so i created a search_P10H1V0EVEN8.sh hoping to attempt to find it.

Unfortunately after a couple of days the program exits with "error: Os { code: 28, kind: Other, message: "No space left on device" }" and sure enough, it filled all of the 200 GB free space i had left.

I have 11 .partial.txt files already done (0011.partial.txt, 0013.partial.txt till 0031.partial.txt) but 0033 bombed out.

From Ganglia, a tool for monitoring system load and disk and memory usage, i see that LSSS is using all 16 threads, but not constantly all of the time. Also the memory usage varies strongly and at one point necessitated me to stop the search and added 8GB of extra memory to cope with the increased usage.

Before i allocate a second disk for this, i am wondering if i am doing something wrong, either in my choice of the test pattern (Copperhead, being a slow ship with high period) or the parameters (margin 8 , midline=--even_midline --velocity (1,0)c/10 in B3/S23)

Can a person who is experienced with LSSS have a quick look at my search script? I've attached it in this post.
search_P10H1V0EVEN8.zip
(2.85 KiB) Downloaded 188 times
Frank Everdij

AforAmpere
Posts: 1334
Joined: July 1st, 2016, 3:58 pm

Re: Thread for your script-related questions

Post by AforAmpere » February 26th, 2020, 12:13 pm

I think what may have happened is that the amount of information in the slice files dramatically increased as a result of the fairly high with with such a low velocity search. Try running (1,0)c/10 with margin=5, and seedcolumn=0. It finishes in about 12 minutes with my 6 core machine, so it should be pretty fast for you. The program does not report a ship when it is done, so you have to check to see if it found anything from the partials periodically.
I manage the 5S project, which collects all known spaceship speeds in Isotropic Non-totalistic rules. I also wrote EPE, a tool for searching in the INT rulespace.

Things to work on:
- Find (7,1)c/8 and 9c/10 ships in non-B0 INT.
- EPE improvements.

User avatar
dexter1
Posts: 71
Joined: February 26th, 2020, 8:46 am

Re: Thread for your script-related questions

Post by dexter1 » February 26th, 2020, 1:29 pm

Thanks AforAmpere for the assistance.

It took a bit of time to interpret the partial pattern, but sure enough a copperhead emerged at 0151.partial.txt after about 6 minutes:

Code: Select all

       *        
       *        
   *  *         
 * ** ***       
** **      **   
** **      **
It turns out that the even symmetric row is copied at the bottom, which is why i initially thought there was something wrong.

Note that the machine used is an old 2010 workstation, but the amount of threads seem to be quite beneficial for this LSSS search program, so i'm glad i got hold of it.
Frank Everdij

User avatar
LaundryPizza03
Posts: 2297
Joined: December 15th, 2017, 12:05 am
Location: Unidentified location "https://en.wikipedia.org/wiki/Texas"

Re: Thread for your script-related questions

Post by LaundryPizza03 » February 26th, 2020, 5:25 pm

Someone found a (2,1)c/5 and a (2,1)c/6 in Day and Night using LSSS. What is this?

Code: Select all

x = 4, y = 3, rule = B3-q4z5y/S234k5j
2b2o$b2o$2o!
LaundryPizza03 at Wikipedia

User avatar
praosylen
Posts: 2443
Joined: September 13th, 2014, 5:36 pm
Location: Pembina University, Home of the Gliders
Contact:

Re: Thread for your script-related questions

Post by praosylen » February 26th, 2020, 6:55 pm

LaundryPizza03 wrote:
February 26th, 2020, 5:25 pm
Someone found a (2,1)c/5 and a (2,1)c/6 in Day and Night using LSSS. What is this?
Here's the thread for it. This is the same program that found the scholar IIRC.
former username: A for Awesome
praosylen#5847 (Discord)

The only decision I made was made
of flowers, to jump universes to one of springtime in
a land of former winter, where no invisible walls stood,
or could stand for more than a few hours at most...

GUYTU6J
Posts: 2200
Joined: August 5th, 2016, 10:27 am
Location: 拆哪!I repeat, CHINA! (a.k.a. 种花家)
Contact:

Re: Thread for your script-related questions

Post by GUYTU6J » March 5th, 2020, 9:51 pm

Is transfer.py released to the public? If yes, where do I get a copy?

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

Re: Thread for your script-related questions

Post by dvgrn » March 5th, 2020, 10:06 pm

GUYTU6J wrote:
March 5th, 2020, 9:51 pm
Is transfer.py released to the public? If yes, where do I get a copy?
It's part of the Shinjuku GitHub repository, here. Clone the repository as a starting point.

globins
Posts: 6
Joined: March 11th, 2020, 2:07 pm

Re: Thread for your script-related questions

Post by globins » March 11th, 2020, 3:10 pm

Which search program is the best for completing (or finding) partial spaceship results in rules other than B3/S23? I noticed an interesting orthogonal partial in a random soup in B36/S1258, but I don't know which program to download to attempt to complete it. Also, would it be best to use a different program for diagonal ships than for orthogonal ones?

User avatar
yujh
Posts: 3066
Joined: February 27th, 2020, 11:23 pm
Location: I'm not sure where I am, so please tell me if you know
Contact:

Re: Thread for your script-related questions

Post by yujh » March 14th, 2020, 5:30 am

C++ isn't working and neither does python. :(
Any exe files for spaceship searches, or lua that works the same with golly?
Rule modifier

B34kz5e7c8/S23-a4ityz5k
b2n3-q5y6cn7s23-k4c8
B3-kq6cn8/S2-i3-a4ciyz8
B3-kq4z5e7c8/S2-ci3-a4ciq5ek6eik7

Bored of Conway's Game of Life? Try Pedestrian Life -- not pedestrian at all!

wildmyron
Posts: 1542
Joined: August 9th, 2013, 12:45 am
Location: Western Australia

Re: Thread for your script-related questions

Post by wildmyron » March 16th, 2020, 3:01 am

globins wrote:
March 11th, 2020, 3:10 pm
Which search program is the best for completing (or finding) partial spaceship results in rules other than B3/S23? I noticed an interesting orthogonal partial in a random soup in B36/S1258, but I don't know which program to download to attempt to complete it. Also, would it be best to use a different program for diagonal ships than for orthogonal ones?
This is a complex question but I'll attempt to answer it and also answer your question from the zfind thread at the same time.
globins wrote:
March 15th, 2020, 2:04 pm
You recommended using gfind for larger widths. What's the difference between that and qfind?
Here's a brief description of the different search programs, for more comprehensive (and accurate) descriptions you should read up on the references which you can find from the links I've provided. Sorry these aren't the most direct references, but information on many of these programs is a bit scattered.

gfind is a hybrid BFS/DFS search program which supports searching for spaceships in outer-totalistic (OT) CA rules. It builds up partial spaceships row by row, but uses small look up tables to determine the CA evolution across the whole row. The breadth first search (BFS) phase of the search fills a search queue with all the partials found up to the current length (also called depth). The depth first search (DFS) phase of the search examines each partial and attempts to extend it to the current deepening level. Any partials which can't be extended are discarded. At the end of the DFS phase the deepening level is incremented and the search returns to the BFS phase. In this way the search can find (almost) all spaceships roughly ordered from shortest to longest.

zfind is a purely DFS search. It's great advantage is that the lookup tables used return the evolution of the whole row in one lookup. This necessarily makes the tables much larger than for gfind which is why the maximum search width is restricted. Because the search is depth first the first spaceship found may be very long, or very short, and the search could spend a long time exploring unsuccessful partials before finding a ship or it could get lucky and find a ship very quickly.
A particularly useful discussion of some of the internals of zfind can be found here: https://conwaylife.com/forums/viewtopic ... 499#p41499

ntzfind is a later version of zfind with two main improvements: It has better performance combined with reduced RAM requirements due to reductions in the LUT size (as well as on demand creation of the LUT) and it natively supports isotropic non-totalistic (INT) rules as well as OT rules.

qfind is a hybrid between gfind and zfind. It is primarily based on gfind and uses the same hybrid BFS/DFS strategy, but it uses zfind's whole row LUT approach to determine the evolution of the rows. qfind also uses multi-threading to parallelise the DFS phase of the search.

The main alternative to these dedicated spaceship searching programs are JLS and WLS which are based on the Lifesrc algorithm. These programs search cell by cell and are generally slower, but much more flexible in setting up custom searches.

As far as extending partials goes: ntzfind and qfind make this fairly easy, but doing so with gfind is tricky. Extending partials with JLS and WLS is straightforward.

And for searching diagonal spaceships gfind or JLS/WLS are the best option. zfind and qfind can search for diagonal spaceships with speeds of 1c/P, but don't support diagonal symmetry.

A brief overview of other CA search software can be found here: https://conwaylife.com/wiki/Tutorials/Software
The 5S project (Smallest Spaceships Supporting Specific Speeds) is now maintained by AforAmpere. The latest collection is hosted on GitHub and contains well over 1,000,000 spaceships.

Semi-active here - recovering from a severe case of LWTDS.

Post Reply