## How to use apgsearch?

For scripts to aid with computation or simulation in cellular automata.
Hdjensofjfnen
Posts: 1473
Joined: March 15th, 2016, 6:41 pm
Location: r cis θ

### How to use apgsearch?

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'
"A man said to the universe:
'Sir, I exist!'
'However,' replied the universe,
'The fact has not created in me
A sense of obligation.'" -Stephen Crane

Code: Select all

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


dvgrn
Moderator
Posts: 6271
Joined: May 17th, 2009, 11:00 pm
Contact:

### Re: How to use apgsearch?

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.

Hdjensofjfnen
Posts: 1473
Joined: March 15th, 2016, 6:41 pm
Location: r cis θ

### Re: How to use apgsearch?

Now it turns up this error:
The Python library does not have this symbol: Py_InitModule4
"A man said to the universe:
'Sir, I exist!'
'However,' replied the universe,
'The fact has not created in me
A sense of obligation.'" -Stephen Crane

Code: Select all

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


dvgrn
Moderator
Posts: 6271
Joined: May 17th, 2009, 11:00 pm
Contact:

### Re: How to use apgsearch?

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.

Hdjensofjfnen
Posts: 1473
Joined: March 15th, 2016, 6:41 pm
Location: r cis θ

### Re: How to use apgsearch?

* Python 3.4 32 bit
* Golly 1.7 32 bit
I typed in "python34" for the system file query
"A man said to the universe:
'Sir, I exist!'
'However,' replied the universe,
'The fact has not created in me
A sense of obligation.'" -Stephen Crane

Code: Select all

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


dvgrn
Moderator
Posts: 6271
Joined: May 17th, 2009, 11:00 pm
Contact:

### Re: How to use apgsearch?

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...?

Rhombic
Posts: 1063
Joined: June 1st, 2013, 5:41 pm

### Re: How to use apgsearch?

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”?

A for awesome
Posts: 1949
Joined: September 13th, 2014, 5:36 pm
Location: 0x-1
Contact:

### Re: How to use apgsearch?

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.
x₁=ηx
V ⃰_η=c²√(Λη)
K=(Λu²)/2
Pₐ=1−1/(∫^∞_t₀(p(t)ˡ⁽ᵗ⁾)dt)

$$x_1=\eta x$$
$$V^*_\eta=c^2\sqrt{\Lambda\eta}$$
$$K=\frac{\Lambda u^2}2$$
$$P_a=1-\frac1{\int^\infty_{t_0}p(t)^{l(t)}dt}$$

http://conwaylife.com/wiki/A_for_all

Aidan F. Pierce

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

### Re: How to use apgsearch?

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.

_zM
Posts: 173
Joined: June 26th, 2016, 3:07 pm

### Re: How to use apgsearch?

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.
Creator of multiple rules that may or may not be what you'd expect

dvgrn
Moderator
Posts: 6271
Joined: May 17th, 2009, 11:00 pm
Contact:

### Re: How to use apgsearch?

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?

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.

Scorbie
Posts: 1445
Joined: December 7th, 2013, 1:05 am

### Re: How to use apgsearch?

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.
I don't think I can maintain this. Could anybody maintain a google cse search and add game of life sites in general? Thanks.
Best wishes to you, Scorbie

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

Code: Select all

$git clone https://gitlab.com/apgoucher/apgmera.git -bash: git: command not found  dvgrn Moderator Posts: 6271 Joined: May 17th, 2009, 11:00 pm Location: Madison, WI Contact: ### Re: How to use apgsearch? ygh wrote:Mine won't even download using Cygwin. Code: Select all $ git clone https://gitlab.com/apgoucher/apgmera.git

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.

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

### Re: How to use apgsearch?

Hmm. Yeah, guess that would help.

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?

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

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.

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

### Re: How to use apgsearch?

What's a directory?

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

### Re: How to use apgsearch?

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

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

### Re: How to use apgsearch?

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: 1621
Joined: July 9th, 2009, 2:44 pm

### Re: How to use apgsearch?

@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

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

### Re: How to use apgsearch?

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?

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: 1343
Joined: August 9th, 2013, 12:45 am

### Re: How to use apgsearch?

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 latest version of the 5S Project contains over 226,000 spaceships. There is also a GitHub mirror of the collection. Tabulated pages up to period 160 (out of date) are available on the LifeWiki.

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

### Re: How to use apgsearch?

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.