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

Ikpx and grills

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

Re: Ikpx and grills

Postby dvgrn » January 30th, 2019, 11:25 pm

Moosey wrote:I feel I need a grills module. Where can I find it?
I am on mac
ikpx needs some help..png

Where did you get a copy of ikpx.py from, exactly? Presumably it should have come from here, and it should probably have ended up in a local git repository folder in company with all its friends from that metasat remote repository -- not necessarily in Golly's Scripts/Python folder. There's no "import golly" in ikpx.py, so it's not really directly a Golly-dependent Python script and shouldn't be run inside Golly... all those "print" commands aren't going to do too much in Golly where there's no console window for them to go to.

Start with the readme file in the link and see how far you can get. Big disclaimer: I haven't made my own clone of metasat or tried to get ikpx working in Cygwin (or anywhere else).
User avatar
dvgrn
Moderator
 
Posts: 5347
Joined: May 17th, 2009, 11:00 pm
Location: Madison, WI

Re: Ikpx and grills

Postby wildmyron » January 31st, 2019, 2:11 am

dvgrn wrote:
Moosey wrote:I feel I need a grills module. Where can I find it?
I am on mac
ikpx needs some help..png

Where did you get a copy of ikpx.py from, exactly? Presumably it should have come from here, and it should probably have ended up in a local git repository folder in company with all its friends from that metasat remote repository -- not necessarily in Golly's Scripts/Python folder. There's no "import golly" in ikpx.py, so it's not really directly a Golly-dependent Python script and shouldn't be run inside Golly... all those "print" commands aren't going to do too much in Golly where there's no console window for them to go to.

Start with the readme file in the link and see how far you can get. Big disclaimer: I haven't made my own clone of metasat or tried to get ikpx working in Cygwin (or anywhere else).

In particular, on MacOS ikpx should be run from the terminal - in a similar way to what you've been doing for gfind. In addition to the metasat folder you will need to choose a separate folder for where to store search progress backup files. I would recommend a folder in the same location as the metasat folder, named ikpx for example. I suggest you create a directory for CA search software rather than using the Documents folder. Then installing and using ikpx would look something like this:
cd                # To make sure you are in your home directory
mkdir casearch    # Once only, choose whatever name suits you
cd casearch
git clone https://gitlab.com/apgoucher/metasat.git        # Once only, get a copy of the metasat software (including ikpx.py)
mkdir ikpx        # Once only, to create the ikpx directory
cd metasat
python ikpx.py -d /Users/<username>/casearch/ikpx/c3o -v 'c/3o' -f p1w12k42i'(0.0.0.0.0.3)' | tee ~/casearch/ikpx/c3-ikpx.log

The first time you run ikpx it will take a little while to compile iglucose before starting the search. This search should find the turtle within about 10 seconds, and then carry on searching for c/3 asymmetric ships with a domino frontend. Look for a line starting with "Spaceship completed" to find spaceships in the output.

NOTES:
  • The "| tee ~/casearch/ikpx/c3-ikpx.log" part of the command is to save a copy of the ikpx output to a file (as well as display it on screen).
  • The initial rows parameter is generally not necessary, but it is set to i'(0.0.0.0.0.3)' for this search because the default will only find ships with a single dot in the leading row. This would mean that the turtle and all other even bilaterally symmetric ships would not be found by ikpx.
  • Setting the k parameter for this search to 42 is probably a bit high for a long running search, but it does result in finding the turtle a fair bit quicker than with the default.
  • Partial and completed spaceships are output in ikpx's interleaved row format. To convert the pattern, paste it into Golly and then run ikpx2golly.py (run in Golly, found in the metasat folder)

Edit:
1) I just updated my metasat repository and noticed that ikpx now outputs RLE patterns, so no need to use ikpx2golly.py

2) This search highlights a nice feature of ikpx - that it is able to find ships with a width larger than the search width but which are "locally narrow". The next result is this tagalong to the turtle (previously found by Tim Coe according to comments in p3w14l20.rle, from jslife-moving-objects-update-3sep2017)

x = 12, y = 20
4b2o$2obo2bob2o$2o6b2o$obo4bobo$2b2o2b2o$b2ob2ob2o$3bo2bo$bo6bo$bo6bo
2$b8o$2o6b2o2$3bo$3b2o$5bo3bo$7b4o$7bo3bo$5bo2bobo$6bo!
wildmyron
 
Posts: 1028
Joined: August 9th, 2013, 12:45 am

Re: Ikpx and grills

Postby Hunting » February 1st, 2019, 1:53 am

Does ikpx support other rules?
Plz correct my grammar mistakes. I'm still studying English.

Working on:

* Rule Y Orthogonoid

Favorite gun ever:
#C Favorite Gun. Found by me.
x = 4, y = 6, rule = B2e3i4at/S1c23cijn4a
o2bo$4o3$4o$o2bo!
Hunting
 
Posts: 737
Joined: September 11th, 2017, 2:54 am
Location: Universe

Re: Ikpx and grills

Postby wildmyron » February 1st, 2019, 3:07 am

Hunting wrote:Does ikpx support other rules?

No, it does not. From earlier in the thread:
calcyman wrote:
velcrorex wrote:Thanks. That's gotten me to other errors which have been addressed elsewhere in the thread.

I might as well ask: This looks like it's the Conway's Life rule only. To change the rule, I see in lines 98 + 99 in grills.py there's the rule specified. Is that the only line I would need to change, or are there other places?


Basically, it's currently impossible to change the rule.
wildmyron
 
Posts: 1028
Joined: August 9th, 2013, 12:45 am

Re: Ikpx and grills

Postby Hunting » February 1st, 2019, 3:59 am

Oh. If it could be extended, will be more useful.
Plz correct my grammar mistakes. I'm still studying English.

Working on:

* Rule Y Orthogonoid

Favorite gun ever:
#C Favorite Gun. Found by me.
x = 4, y = 6, rule = B2e3i4at/S1c23cijn4a
o2bo$4o3$4o$o2bo!
Hunting
 
Posts: 737
Joined: September 11th, 2017, 2:54 am
Location: Universe

Re: Ikpx and grills

Postby testitemqlstudop » February 19th, 2019, 1:23 pm

MetaSAT always crashes on the scripts/head_and_tail.sh part; after compiling march_cc, march_cc throws a segmentation fault and MetaSAT can't copy the "/tmp/cubes" and "/tmp/learnt" files.
zdr wrote:Nice archive.
I am the Retrograde Anomaly.
They will not win.
User avatar
testitemqlstudop
 
Posts: 485
Joined: July 21st, 2016, 11:45 am
Location: very very very very boats

Re: Ikpx and grills

Postby wildmyron » February 20th, 2019, 4:14 am

testitemqlstudop wrote:MetaSAT always crashes on the scripts/head_and_tail.sh part; after compiling march_cc, march_cc throws a segmentation fault and MetaSAT can't copy the "/tmp/cubes" and "/tmp/learnt" files.

I just ran through the instructions from the README with a SAT problem generated by LLS and there were no issues.

From where did you get the cnf file you are trying to find a solution for?

What was the output of scripts/preprocess.sh?

Did you end up with a file named simplified.cnf in the working directory? Presumably yes, otherwise march_cc would have given you an error, not segfaulted.

Does the content of simplified.cnf look reasonable? If you don't know what it should look like, you could post it here.
wildmyron
 
Posts: 1028
Joined: August 9th, 2013, 12:45 am

Re: Ikpx and grills

Postby testitemqlstudop » February 20th, 2019, 9:40 am

simplified.cnf was about 90% of the size of lls_problem.cnf (approx. 230 MB)
I tried with smaller problems, though, and march_cc just segfaults even quicker.

What computer architecture are you on?
zdr wrote:Nice archive.
I am the Retrograde Anomaly.
They will not win.
User avatar
testitemqlstudop
 
Posts: 485
Joined: July 21st, 2016, 11:45 am
Location: very very very very boats

Re: Ikpx and grills

Postby wildmyron » February 20th, 2019, 11:22 am

I'm running Ubuntu under Windows Subsystem for Linux on an x86_64 system (Core i5 i think). My SAT problems were much smaller than yours though. Sorry, not at that system now, but I think the LLS command I used to generate the cnf file was "./lls -r B2ce/S0 -s p3 -b 40 20 --dry_run --save_dimacs" (latest commit on the develop branch). It took glucose-syrup about 11 minutes to prove it unsatisfiable, and about 24 minutes for the iglucose installed by metasat (both using a single thread). So it's not exactly a candidate for metasat and to be honest I tried a few different numbers for how many segments to split the problem into and it seemed that it was going to take much longer than 25 minutes to complete (I didn't let it finish). In any case, even if this isn't an ideal problem, the toolchain worked.

Edit: Could it be that march_cc is running out of memory?
wildmyron
 
Posts: 1028
Joined: August 9th, 2013, 12:45 am

Re: Ikpx and grills

Postby testitemqlstudop » February 20th, 2019, 12:13 pm

Huh, odd. The march_cc that came with metasat compiled but after running segfaulted - without any noticeable cause.

Ah well!
zdr wrote:Nice archive.
I am the Retrograde Anomaly.
They will not win.
User avatar
testitemqlstudop
 
Posts: 485
Joined: July 21st, 2016, 11:45 am
Location: very very very very boats

Re: Ikpx and grills

Postby googoIpIex » Today, 6:16 pm

On my current PC (not a Pi), in cygwin all I get when running ikpx is:
Leo@HAL2300 ~/metasat
$ python ikpx.py -e split -d c/8o -d /c8/1 -f p3w12a100 -l c8o.rle

****************************************************************

Incremental Knightship Partial Extend (ikpx)

****************************************************************



googoIpIex
 
Posts: 88
Joined: February 28th, 2019, 4:49 pm
Location: Sqrt(-1)

Previous

Return to Scripts

Who is online

Users browsing this forum: No registered users and 3 guests