How to use apgsearch?

For scripts to aid with computation or simulation in cellular automata.
Post Reply
User avatar
Hdjensofjfnen
Posts: 1742
Joined: March 15th, 2016, 6:41 pm
Location: re^jθ

How to use apgsearch?

Post by Hdjensofjfnen » August 27th, 2016, 5:58 pm

When I run it, it turns up an error:
Traceback (most recent call last):
File "C:\Users\Justin Tang\Desktop\apgsearch\apgsearch-2014-09-08.py", line 27, in <module>
import golly as g
ImportError: No module named 'golly'

Code: Select all

x = 5, y = 9, rule = B3-jqr/S01c2-in3
3bo$4bo$o2bo$2o2$2o$o2bo$4bo$3bo!

Code: Select all

x = 7, y = 5, rule = B3/S2-i3-y4i
4b3o$6bo$o3b3o$2o$bo!

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

Re: How to use apgsearch?

Post by dvgrn » August 27th, 2016, 7:49 pm

Hdjensofjfnen wrote:When I run it, it turns up an error:
Traceback (most recent call last):
File "C:\Users\Justin Tang\Desktop\apgsearch\apgsearch-2014-09-08.py", line 27, in <module>
import golly as g
ImportError: No module named 'golly'
Don't run it from IDLE or a Python command line -- use File > Run Script in Golly.

User avatar
Hdjensofjfnen
Posts: 1742
Joined: March 15th, 2016, 6:41 pm
Location: re^jθ

Re: How to use apgsearch?

Post by Hdjensofjfnen » August 29th, 2016, 8:31 pm

Now it turns up this error:
The Python library does not have this symbol: Py_InitModule4

Code: Select all

x = 5, y = 9, rule = B3-jqr/S01c2-in3
3bo$4bo$o2bo$2o2$2o$o2bo$4bo$3bo!

Code: Select all

x = 7, y = 5, rule = B3/S2-i3-y4i
4b3o$6bo$o3b3o$2o$bo!

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

Re: How to use apgsearch?

Post by dvgrn » August 29th, 2016, 9:12 pm

Hdjensofjfnen wrote:Now it turns up this error:
The Python library does not have this symbol: Py_InitModule4
Well, we'd better start from the beginning then: what version of Golly? 32-bit or 64-bit? What version of Python -- is it 2.7.x? 32-bit or 64-bit? Make sure Golly and Python match. If you download the default version of Golly from SourceForge, I believe it's still giving you the 32-bit version.

User avatar
Hdjensofjfnen
Posts: 1742
Joined: March 15th, 2016, 6:41 pm
Location: re^jθ

Re: How to use apgsearch?

Post by Hdjensofjfnen » August 30th, 2016, 8:38 pm

* Python 3.4 32 bit
* Golly 1.7 32 bit
I typed in "python34" for the system file query

Code: Select all

x = 5, y = 9, rule = B3-jqr/S01c2-in3
3bo$4bo$o2bo$2o2$2o$o2bo$4bo$3bo!

Code: Select all

x = 7, y = 5, rule = B3/S2-i3-y4i
4b3o$6bo$o3b3o$2o$bo!

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

Re: How to use apgsearch?

Post by dvgrn » August 30th, 2016, 9:15 pm

Hdjensofjfnen wrote:* Python 3.4 32 bit
* Golly 1.7 32 bit
I typed in "python34" for the system file query
Won't work. Python 2.x is what's compatible with Golly. The Golly Gang hasn't made the jump to Python 3.x yet (and we're still in good company -- might take another decade to get everyone converted over, at this rate...)

To say nothing of... "Golly 1.7"? Maybe if you averaged the binaries for Golly 1.4 and Golly 2.0, you could get a 1.7 executable, but I kind of doubt it would execute...?

User avatar
Rhombic
Posts: 1072
Joined: June 1st, 2013, 5:41 pm

Re: How to use apgsearch?

Post by Rhombic » August 31st, 2016, 11:28 am

On a similar note, I'm having trouble with non-totalistic rules, even with the hacked version of apgsearch. It deletes every neighbourhood specification so tLife becomes B3/S234 and so on. Quite unnerving.
SoL : FreeElectronics : DeadlyEnemies : 6a-ite : Rule X3VI
what is “sesame oil”?

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

Re: How to use apgsearch?

Post by praosylen » August 31st, 2016, 4:11 pm

Rhombic wrote:On a similar note, I'm having trouble with non-totalistic rules, even with the hacked version of apgsearch. It deletes every neighbourhood specification so tLife becomes B3/S234 and so on. Quite unnerving.
I've mentioned this in other threads before, and you need to first run isotropic-rulegen.py to allow the RuleLoader algorithm to run the rule, and then enter the rule name with an underscore instead of a slash when you run the actual search. As I have said, I hope to fix this soon.

Edit: Sorry, didn't see the post in the apg 1.0 thread.
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...

Rich Holmes
Posts: 55
Joined: October 31st, 2015, 1:13 am

Re: How to use apgsearch?

Post by Rich Holmes » September 1st, 2016, 1:19 pm

A for awesome wrote: I've mentioned this in other threads before, and you need to first run isotropic-rulegen.py to allow the RuleLoader algorithm to run the rule, and then enter the rule name with an underscore instead of a slash when you run the actual search. As I have said, I hope to fix this soon.
Which other threads? I've tried to search and the forum's search tells me "isotropic-rulegen" is too common a term to search on. Okay then.

Basically if there's an easy to follow recipe (with a little more clear detail than the above) for doing non totalistic rules in apgmera, I'd like to know where to find it.

User avatar
_zM
Posts: 186
Joined: June 26th, 2016, 3:07 pm

Re: How to use apgsearch?

Post by _zM » September 1st, 2016, 1:28 pm

Rich Holmes wrote:
A for awesome wrote: I've mentioned this in other threads before, and you need to first run isotropic-rulegen.py to allow the RuleLoader algorithm to run the rule, and then enter the rule name with an underscore instead of a slash when you run the actual search. As I have said, I hope to fix this soon.
Which other threads? I've tried to search and the forum's search tells me "isotropic-rulegen" is too common a term to search on. Okay then.

Basically if there's an easy to follow recipe (with a little more clear detail than the above) for doing non totalistic rules in apgmera, I'd like to know where to find it.
This entire thread is about the Python versions (vv. 0.x and 1.x) for running directly inside Golly.
moment

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

Re: How to use apgsearch?

Post by dvgrn » September 1st, 2016, 2:38 pm

Rich Holmes wrote:I've tried to search and the forum's search tells me "isotropic-rulegen" is too common a term to search on. Okay then.
Yes, the forum's search algorithm specializes in being annoying -- won't pay attention to quotes around phrases, ignores words that it shouldn't ignore, mysteriously doesn't find things sometimes, you name it. I usually give up after a few tries and just use Google, but sometimes (as in this case) that doesn't work either.

Anyway, if you're looking for isotropic-rule-gen.py, this thread is probably a good place to start.
Rich Holmes wrote:Basically if there's an easy to follow recipe (with a little more clear detail than the above) for doing non totalistic rules in apgmera, I'd like to know where to find it.
There are no such easy recipes, at least for that specific problem as you've stated it.

Technically "apgsearch" is the old Python script that runs directly in Golly, where "apgmera"-as-in-"chimera" is a C++ alternative that runs an order of magnitude faster... but its ability to cleverly recompile itself was not written with isotropic rules in mind.

Isotropic rule support probably won't be added to apgmera for the foreseeable future. At least, not if Calcyman has any sense -- Catagolue+apgmera maintenance already seems like a plenty big enough headache for one person. The source code is out there if anyone wants to tackle the problem.

However, if by "apgmera" you meant "apgsearch in general' -- sort of the reverse of how the Catagolue "apgsearch" page calls apgnano "apgsearch 2.x" and apgmera "apgsearch 3.x" -- then possibly you'll be interested in starting at this post on the Hacking apgsearch thread. At least, that's what's suggested in the "place to start" linked thread above.

I haven't tried running this hacked apgsearch myself, and it appears there are some minor patches that should probably be made to the last published version. Maybe inquire on that thread and see if anyone will post a latest-and-greatest version, or at least some new rumors about when an update will appear.

Rich Holmes
Posts: 55
Joined: October 31st, 2015, 1:13 am

Re: How to use apgsearch?

Post by Rich Holmes » September 1st, 2016, 6:58 pm

Yeah, the Catagolue page led me to think the term "apgsearch" encompassed apgnano and apgmera, hence my post in this forum. Sorry about any confusion. Thanks for the response; I did mean apgmera, so I'll just continue with totalistic rules for now.

User avatar
Scorbie
Posts: 1692
Joined: December 7th, 2013, 1:05 am

Re: How to use apgsearch?

Post by Scorbie » September 2nd, 2016, 10:03 am

dvgrn wrote:
Rich Holmes wrote:I've tried to search and the forum's search tells me "isotropic-rulegen" is too common a term to search on. Okay then.
Yes, the forum's search algorithm specializes in being annoying -- won't pay attention to quotes around phrases, ignores words that it shouldn't ignore, mysteriously doesn't find things sometimes, you name it. I usually give up after a few tries and just use Google, but sometimes (as in this case) that doesn't work either.
(Offtopic warning) I just found google custom search and it looks nice.
https://cse.google.com/cse/publicurl?cx ... qsfofh4z7a
I don't think I can maintain this. Could anybody maintain a google cse search and add game of life sites in general? Thanks.

User avatar
ygh
Posts: 48
Joined: March 18th, 2016, 4:47 pm

Re: How to use apgsearch?

Post by ygh » September 3rd, 2016, 4:54 pm

Mine won't even download using Cygwin.

Code: Select all

$ git clone https://gitlab.com/apgoucher/apgmera.git
-bash: git: command not found

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

Re: How to use apgsearch?

Post by dvgrn » September 3rd, 2016, 5:11 pm

ygh wrote:Mine won't even download using Cygwin.

Code: Select all

$ git clone https://gitlab.com/apgoucher/apgmera.git
-bash: git: command not found
If your Cygwin is telling you "command not found", you may just not have installed the git plugin. Run the Cygwin installer again and double-check that you asked for the right packages:
In the apgmera install instructions, Adam wrote:Install Cygwin64 (from http://cygwin.com), ensuring that 'gcc-g++', 'git' and 'make' are checked in the list of plugins to install.

User avatar
ygh
Posts: 48
Joined: March 18th, 2016, 4:47 pm

Re: How to use apgsearch?

Post by ygh » September 4th, 2016, 12:31 pm

Hmm. Yeah, guess that would help. :oops:

Edit: Wait, still not working.

Code: Select all

Me@DESKTOP-HD6VFF2 ~
$ git clone https://gitlab.com/apgoucher/apgmera.git
Cloning into 'apgmera'...
remote: Counting objects: 271, done.
remote: Compressing objects: 100% (135/135), done.
remote: Total 271 (delta 167), reused 227 (delta 136)
Receiving objects: 100% (271/271), 388.55 KiB | 0 bytes/s, done.
Resolving deltas: 100% (167/167), done.
Checking connectivity... done.

Me@DESKTOP-HD6VFF2 ~
$ bash recompile.sh
bash: recompile.sh: No such file or directory
I downloaded literally every possible package, by the way. Took like 10 minutes. So I ruled that possible point of failure out.

Rich Holmes
Posts: 55
Joined: October 31st, 2015, 1:13 am

Re: How to use apgsearch?

Post by Rich Holmes » September 4th, 2016, 12:59 pm

ygh wrote:Hmm. Yeah, guess that would help. :oops:

Edit: Wait, still not working.

Code: Select all

Me@DESKTOP-HD6VFF2 ~
$ git clone https://gitlab.com/apgoucher/apgmera.git
Cloning into 'apgmera'...
remote: Counting objects: 271, done.
remote: Compressing objects: 100% (135/135), done.
remote: Total 271 (delta 167), reused 227 (delta 136)
Receiving objects: 100% (271/271), 388.55 KiB | 0 bytes/s, done.
Resolving deltas: 100% (167/167), done.
Checking connectivity... done.

Me@DESKTOP-HD6VFF2 ~
$ bash recompile.sh
bash: recompile.sh: No such file or directory
I downloaded literally every possible package, by the way. Took like 10 minutes. So I ruled that possible point of failure out.
Did you go into the apgmera directory before entering the bash command? recompile.sh should be in the top level of the apgmera directory. If it's not, git failed you badly but it looks like it did what it should.

User avatar
ygh
Posts: 48
Joined: March 18th, 2016, 4:47 pm

Re: How to use apgsearch?

Post by ygh » September 4th, 2016, 2:36 pm

What's a directory?

Sokwe
Moderator
Posts: 2644
Joined: July 9th, 2009, 2:44 pm

Re: How to use apgsearch?

Post by Sokwe » September 4th, 2016, 8:02 pm

ygh wrote:What's a directory?
Commonly called a "folder". In this case, it's the place where recompile.sh and your other apgmera files are stored.

Before you even run Git, you should change the directory to the location you want your apgmera files to be stored. To do this, run

Code: Select all

cd "FILE_PATH"
where FILE_PATH is replaced by the full path of the folder you want to save the files in. For example, on my computer I would run

Code: Select all

cd "C:\Users\Matthias\Documents\Life"
After you have changed the directory, run Git as instructed. This will create a new folder called "apgmera" which contains all of the apgmera files. Now, before you run "bash recompile.sh", you need to change the directory to the apgmera folder, so do that by again using the change directory command (cd) as above.

Once you are in the apgmera folder, you can finally run "bash recompile.sh".
-Matthias Merzenich

User avatar
ygh
Posts: 48
Joined: March 18th, 2016, 4:47 pm

Re: How to use apgsearch?

Post by ygh » September 4th, 2016, 8:13 pm

We're back to square one.

Code: Select all

Me@DESKTOP-HD6VFF2 /cygdrive/c/Users/Me/Documents/Life/apgmera
$ bash recompile.sh
Skipping updates; use --update to update apgmera automatically.
Rule unspecified; assuming b3s23.
Symmetry unspecified; assuming C1.
Configuring rule b3s23; symmetry C1
Valid rulestring: b3s23
Valid symmetry: C1
Rule integer:     6152
Rule circuit:     [-131-124-450-014-672]
Rule integer:     6152
Rule circuit:     [-131-124-450-014-672]
Rule integer:     6152
Rule circuit:     [-131-124-450-014-672]
Success!
recompile.sh: line 66: make: command not found

Me@DESKTOP-HD6VFF2 /cygdrive/c/Users/Me/Documents/Life/apgmera
$ ./apgmera -n 10000000
-bash: ./apgmera: No such file or directory

Sokwe
Moderator
Posts: 2644
Joined: July 9th, 2009, 2:44 pm

Re: How to use apgsearch?

Post by Sokwe » September 5th, 2016, 8:00 pm

@ygh,
Are you sure that you have make installed? Run "cygcheck -c make" to check. I think that you should get something like this:

Code: Select all

Cygwin Package Information
Package              Version        Status
make                 4.2.1-1        OK
-Matthias Merzenich

User avatar
ygh
Posts: 48
Joined: March 18th, 2016, 4:47 pm

Re: How to use apgsearch?

Post by ygh » September 5th, 2016, 10:28 pm

I don't for some reason, even though I installed every package.

Rich Holmes
Posts: 55
Joined: October 31st, 2015, 1:13 am

Re: How to use apgsearch?

Post by Rich Holmes » September 8th, 2016, 10:29 am

Is there some trick to getting Catagolue to post non totalistic results?

I've been running B37e_S23 and it seems to work fine. But nothing on Catalogue.

http://catagolue.appspot.com/census/b23es23/C1

If I use exactly the same procedure for B35678/S — using isotropic-rules-gen.py to make a B35678_S rules table and then searching that — then that works.

http://catagolue.appspot.com/haul/b3567 ... ommitted=2

I'm doing nothing different except changing the rule table.

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

Re: How to use apgsearch?

Post by wildmyron » September 8th, 2016, 10:51 pm

Rich Holmes wrote:Is there some trick to getting Catagolue to post non totalistic results?

I've been running B37e_S23 and it seems to work fine. But nothing on Catalogue.

http://catagolue.appspot.com/census/b23es23/C1
That rule is submitted as http://catagolue.appspot.com/census/b37-cs23/C1

That's a quirk of the way rule names are canonicalised with the isotropic version of apgsearch.
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.

Rich Holmes
Posts: 55
Joined: October 31st, 2015, 1:13 am

Re: How to use apgsearch?

Post by Rich Holmes » September 9th, 2016, 3:28 pm

wildmyron wrote:
Rich Holmes wrote:Is there some trick to getting Catagolue to post non totalistic results?

I've been running B37e_S23 and it seems to work fine. But nothing on Catalogue.

http://catagolue.appspot.com/census/b23es23/C1
That rule is submitted as http://catagolue.appspot.com/census/b37-cs23/C1

That's a quirk of the way rule names are canonicalised with the isotropic version of apgsearch.
Ah, thanks. Never thought to look for that rule name.

Post Reply