Hacking apgsearch

For scripts to aid with computation or simulation in cellular automata.
User avatar
pifricted
Posts: 1130
Joined: May 25th, 2024, 10:26 am
Location: Click here to set your location

Re: Hacking apgsearch

Post by pifricted »

I met UnicodeDecodeError:
gbk.PNG
gbk.PNG (38.37 KiB) Viewed 7991 times
...is enjoying his teenage time.
User avatar
Resu
Posts: 819
Joined: May 23rd, 2025, 10:47 am
Location: UTC+14:00
Contact:

Re: Hacking apgsearch

Post by Resu »

pifricted wrote: July 19th, 2025, 8:27 am I met UnicodeDecodeError:
gbk.PNG
I think it's because the script had ' instead of " somewhere.

Code: Select all

x = 31, y = 13, rule = C
8.2X2.3X.3X.X.X$8.X.X.X3.X3.X.X$8.X.X.3X.3X.X.X$8.2X2.X5.X.X.X$8.X.X.
3X.3X.3X$M2.M$4.M$M3.M$.4M$27.2M$27.M.M$29.M$29.2M! [[ AUTOSTART GPS 10 ]]
User avatar
pifricted
Posts: 1130
Joined: May 25th, 2024, 10:26 am
Location: Click here to set your location

Re: Hacking apgsearch

Post by pifricted »

Resu wrote: July 19th, 2025, 8:54 am
pifricted wrote: July 19th, 2025, 8:27 am I met UnicodeDecodeError:
gbk.PNG
I think it's because the script had ' instead of " somewhere.
No, it isn't.

After I replaced all ' to ", it's still get error.

Edit: soloved. Save the codes in gbk formart.
...is enjoying his teenage time.
User avatar
PK22
Posts: 620
Joined: January 25th, 2025, 11:38 am
Location: United Kingdom
Contact:

Re: Hacking apgsearch

Post by PK22 »

Some of the censuses are broken! There are tons of junk objects (presumably from searching bs012345678 and uploading it to the wrong census). I cannot find the haul(s) these junk objects originated from, and hence I cannot determine if it was due to a bug or the work of Uploady McGetYourOwnSymmetry.
It’s affecting the pseudo variants of C1, D4_x4, and D4_x1. I am currently searching these, but none of my hauls appear to be the issue - I checked my hauls for D4_x1, since I am the only person to have contributed (the anonymous haul was me doing testing), and no erroneous objects were there.

Please help find the issue as soon as possible!
User:PK22
Learning miscellaneous programming languages.
User avatar
rabbit
Posts: 245
Joined: March 4th, 2024, 6:00 am
Location: Stuck inside a magician's hat. it hurts so bad

Re: Hacking apgsearch

Post by rabbit »

PK22 wrote: July 21st, 2025, 12:32 pm Please help find the issue as soon as possible!
The two hauls were uploaded by you, and are on this page. Here are their pages.

The false still lifes all come from the same "page" of soups in either haul. I believe this has happened with hacked apgsearch far in the past, but I do not know what it is caused by.
That's the bunny.
Check out my OCA exploration script, crule.lua!
User avatar
PK22
Posts: 620
Joined: January 25th, 2025, 11:38 am
Location: United Kingdom
Contact:

Re: Hacking apgsearch

Post by PK22 »

Since the censuses are now heavily contaminated, should I rename them in future versions of the script, or is there a way to remove objects from the censuses?
User:PK22
Learning miscellaneous programming languages.
User avatar
Resu
Posts: 819
Joined: May 23rd, 2025, 10:47 am
Location: UTC+14:00
Contact:

Re: Hacking apgsearch

Post by Resu »

PK22 wrote: July 14th, 2025, 4:51 pm I can probably implement stdin symmetries, and I would like to add more custom 'symmetries', provided that the 'soups' can be generated by the program. If anyone has any ideas for additional features or symmetries, please post them here or PM me with information about them.
Inflated symmetries would be useful.
User avatar
PK22
Posts: 620
Joined: January 25th, 2025, 11:38 am
Location: United Kingdom
Contact:

Re: Hacking apgsearch

Post by PK22 »

Alright, I am able to start work on development and bug fixing again.
Resu wrote: July 23rd, 2025, 10:30 am Inflated symmetries would be useful.
I will implement these, they shouldn't be too difficult (I just need to take each cell in a cell list as (x, y) and add (2x, 2y), (2x+1, 2y), (2x, 2y+1), (2x+1, 2y+1) to a new cell list for each inflation).
I am considering implementing stdin symmetries, but the problem is that I need to find how to ensure that the RLE can be taken from Catagolue - how exactly does apgsearch v5 do this for stdin symmetries?

To prevent the nightmarish still-life issue from happening again, I will add some basic program-side verification for still lifes, oscillators, and spaceships - I can simply check that the hashes are the same for each object after one full period, and toss out the apgcodes which fail the test. My main worry is that the bug could contaminate official censuses - peer review might(?) prevent faulty objects from being uploaded, but what about for censuses which aren't peer reviewed, like b3s2/C1 or a census for another rule with <10^12 objects?
User:PK22
Learning miscellaneous programming languages.
User avatar
Resu
Posts: 819
Joined: May 23rd, 2025, 10:47 am
Location: UTC+14:00
Contact:

Re: Hacking apgsearch

Post by Resu »

I think this will be useful: a way to automatically switch census so that you can see which census is good for which patterns.
(Possibly uploading a haul per each census, than repeat?)

Code: Select all

x = 31, y = 13, rule = C
8.2X2.3X.3X.X.X$8.X.X.X3.X3.X.X$8.X.X.3X.3X.X.X$8.2X2.X5.X.X.X$8.X.X.
3X.3X.3X$M2.M$4.M$M3.M$.4M$27.2M$27.M.M$29.M$29.2M! [[ AUTOSTART GPS 10 ]]
User avatar
PK22
Posts: 620
Joined: January 25th, 2025, 11:38 am
Location: United Kingdom
Contact:

Re: Hacking apgsearch

Post by PK22 »

(Moving discussion to a thread where it is more relevant)
Resu wrote: July 28th, 2025, 2:37 pm
PK22 wrote: July 28th, 2025, 1:16 pm I don't remember implementing storage of symmetries, what do you mean?
No, I mean storing which symmetry the user chose to search.
I never added such a thing. I did plan to have text files that stored the occurrence data of objects for b3s23 symmetries, but I never implemented it. (The idea was that the program could calculate the scores for each object on the fly based on actual data, without needing a human to manually calculate them based on their rarity relative to the pentadecathlon.) You might be thinking of the long-term caching that I had to remove, where the program stored the decompositions of b3s23 objects, with one text file for pseudo symmetries and one text file for normal symmetries.

I have implemented object verification and inflated symmetries (although they are rather slow), and once I get stdin symmetries working, I will release all the changes as version v1.2 Py3. Should I add long-term decomposition caching, storage of searching history (not to be confused with browsing history), or storage of occurrence data for v1.2?
User:PK22
Learning miscellaneous programming languages.
User avatar
Resu
Posts: 819
Joined: May 23rd, 2025, 10:47 am
Location: UTC+14:00
Contact:

Re: Hacking apgsearch

Post by Resu »

PK22 wrote: July 28th, 2025, 3:40 pm I never added such a thing. I did plan to have text files that stored the occurrence data of objects for b3s23 symmetries, but I never implemented it. (The idea was that the program could calculate the scores for each object on the fly based on actual data, without needing a human to manually calculate them based on their rarity relative to the pentadecathlon.) You might be thinking of the long-term caching that I had to remove, where the program stored the decompositions of b3s23 objects, with one text file for pseudo symmetries and one text file for normal symmetries.
It must at least have a variable that stores what symmetry was entered by the user at the start of the script.

Code: Select all

x = 31, y = 13, rule = C
8.2X2.3X.3X.X.X$8.X.X.X3.X3.X.X$8.X.X.3X.3X.X.X$8.2X2.X5.X.X.X$8.X.X.
3X.3X.3X$M2.M$4.M$M3.M$.4M$27.2M$27.M.M$29.M$29.2M! [[ AUTOSTART GPS 10 ]]
User avatar
PK22
Posts: 620
Joined: January 25th, 2025, 11:38 am
Location: United Kingdom
Contact:

Re: Hacking apgsearch

Post by PK22 »

Oh, you mean symmstring. In v1.1.4, it is taken from the user at line 4197, and it is stored by RuleGenerator in a slashed form (B****/S****) as self.slashed (or indirectly by Soup as self.rg.slashed).

EDIT: v1.2 is out now! I believe that it might be too difficult to implement stdin symmetries, so I have skipped them for now.
User:PK22
Learning miscellaneous programming languages.
User avatar
Resu
Posts: 819
Joined: May 23rd, 2025, 10:47 am
Location: UTC+14:00
Contact:

Re: Hacking apgsearch

Post by Resu »

What symmetries does apgsearch Py3 not support that is mentioned here: Apgsearch#Higher_symmetries (other than the GPU symmetries)?

Code: Select all

x = 31, y = 13, rule = C
8.2X2.3X.3X.X.X$8.X.X.X3.X3.X.X$8.X.X.3X.3X.X.X$8.2X2.X5.X.X.X$8.X.X.
3X.3X.3X$M2.M$4.M$M3.M$.4M$27.2M$27.M.M$29.M$29.2M! [[ AUTOSTART GPS 10 ]]
User avatar
PK22
Posts: 620
Joined: January 25th, 2025, 11:38 am
Location: United Kingdom
Contact:

Re: Hacking apgsearch

Post by PK22 »

It supports all of the non-GPU ones mentioned except for the discontinued 25pct and 75pct (but it supports 25p and 75p in place of them).

Edit: The article does mention gutter symmetries, and although a few are supported by apgsearch v5, they aren’t supported here (D2_+1_gO1s(0,1,2), with the last number representing the skew), I could probably implement them. I could also probably implement the diagonal gutter symmetries and perhaps a few others (like gutter D8_1).
User:PK22
Learning miscellaneous programming languages.
User avatar
Resu
Posts: 819
Joined: May 23rd, 2025, 10:47 am
Location: UTC+14:00
Contact:

Re: Hacking apgsearch

Post by Resu »

PK22 wrote: July 14th, 2025, 4:51 pm I can probably implement stdin symmetries, and I would like to add more custom 'symmetries', provided that the 'soups' can be generated by the program. If anyone has any ideas for additional features or symmetries, please post them here or PM me with information about them.
Would it support generations rules?

Code: Select all

x = 31, y = 13, rule = C
8.2X2.3X.3X.X.X$8.X.X.X3.X3.X.X$8.X.X.3X.3X.X.X$8.2X2.X5.X.X.X$8.X.X.
3X.3X.3X$M2.M$4.M$M3.M$.4M$27.2M$27.M.M$29.M$29.2M! [[ AUTOSTART GPS 10 ]]
User avatar
PK22
Posts: 620
Joined: January 25th, 2025, 11:38 am
Location: United Kingdom
Contact:

Re: Hacking apgsearch

Post by PK22 »

Resu wrote: August 6th, 2025, 10:18 am
PK22 wrote: July 14th, 2025, 4:51 pm I can probably implement stdin symmetries, and I would like to add more custom 'symmetries', provided that the 'soups' can be generated by the program. If anyone has any ideas for additional features or symmetries, please post them here or PM me with information about them.
Would it support generations rules?
That would probably take a lot of coding which I am not skilled enough to do (e.g creating the rules used for decomposing objects, adapting the function which takes an object's apgcode, etc).
User:PK22
Learning miscellaneous programming languages.
User avatar
Resu
Posts: 819
Joined: May 23rd, 2025, 10:47 am
Location: UTC+14:00
Contact:

Re: Hacking apgsearch

Post by Resu »

apgsearch Py3 v1.2.1 gives this error if you don't have the python module requests:

Code: Select all

ModuleNotFoundError: No module named 'requests'

Code: Select all

x = 31, y = 13, rule = C
8.2X2.3X.3X.X.X$8.X.X.X3.X3.X.X$8.X.X.3X.3X.X.X$8.2X2.X5.X.X.X$8.X.X.
3X.3X.3X$M2.M$4.M$M3.M$.4M$27.2M$27.M.M$29.M$29.2M! [[ AUTOSTART GPS 10 ]]
User avatar
PK22
Posts: 620
Joined: January 25th, 2025, 11:38 am
Location: United Kingdom
Contact:

Re: Hacking apgsearch

Post by PK22 »

Ok, this is really weird. The latest version of my script is uploading erroneous hauls, because it cannot properly census switch engines. The bizarre part is that I can reproduce this error on Ubuntu, but not on Windows 11???

I will record my observations and thoughts in this post, but if you have any clue what the issue is, please let me know.
EDIT: I did a test with Wine and Windows Golly, and I ran into the same error. This suggests that the problem is with Linux.
User:PK22
Learning miscellaneous programming languages.
User avatar
PK22
Posts: 620
Joined: January 25th, 2025, 11:38 am
Location: United Kingdom
Contact:

Re: Hacking apgsearch

Post by PK22 »

Here are precompiled binaries for all pseudo-symmetries with apgsearch v5:
windows-executables.7z
(1.33 MiB) Downloaded 74 times
linux-executables.7z
(1.8 MiB) Downloaded 72 times
They upload to Pseudo_<symmetry>_Test2 (some of the original censuses are contaminated with erroneous objects).
User:PK22
Learning miscellaneous programming languages.
Disaster16439
Posts: 338
Joined: June 30th, 2023, 9:17 am
Location: Teyvat

Re: Hacking apgsearch

Post by Disaster16439 »

I want to run 3-glider-stdin, but I searched the forums and have not seen any code. I’m wondering if anyone has the code. Thanks!

Code: Select all

x=0,y=0,rule=B34q/S23-k
14b3o$13bo3bo$13b2ob2o9$15bo$15bo$b2o12bo12b2o$obo25bobo$o10b3o3b3o10b
o$obo25bobo$b2o12bo12b2o$15bo$15bo9$13b2ob2o$13bo3bo$14b3o!
[[ LOOP 200 THEME POISON AUTOSTART T 0 PAUSE 0.3 ]]
I’m sandless :D
User avatar
PK22
Posts: 620
Joined: January 25th, 2025, 11:38 am
Location: United Kingdom
Contact:

Re: Hacking apgsearch

Post by PK22 »

Disaster16439 wrote: April 20th, 2026, 8:05 pm I want to run 3-glider-stdin, but I searched the forums and have not seen any code. I’m wondering if anyone has the code. Thanks!
You can either:
a). Get the 5Glider_stdin script here, then modify the line which sets the glider count before compilation. Then run:

Code: Select all

./recompile.sh —rule <your_rule> —symmetry 3Glider_stdin
./<compiled_program_name> | ./apgluxe <arguments>
Alternatively, you can get shipcolls here, which is better as recompilation is not necessary for different glider counts, and run:

Code: Select all

./recompile.sh —rule <your_rule> —symmetry 3Glider_stdin
./shipcolls -g <rle_of_spaceship> -t 0 -r <your_rule> -n <number_of_ships> | ./apgluxe <arguments>
User:PK22
Learning miscellaneous programming languages.
User avatar
Entity Valkyrie 2
Posts: 2122
Joined: February 26th, 2019, 7:13 pm
Contact:

Re: Hacking apgsearch

Post by Entity Valkyrie 2 »

How exactly does stdin work? I don't know how to do a custom Catagolue search.
Bx222 IS MY WORST ENEMY.

HyperConway — explore cellular automata on HyperRogue's hyperbolic tiling

Creator of the rule StateInvestigator
Please click here for my own pages (and oscillator stamp collections)
User avatar
PK22
Posts: 620
Joined: January 25th, 2025, 11:38 am
Location: United Kingdom
Contact:

Re: Hacking apgsearch

Post by PK22 »

Entity Valkyrie 2 wrote: April 30th, 2026, 12:47 am How exactly does stdin work? I don't know how to do a custom Catagolue search.
If you recompile apgsearch for a symmetry with “stdin” (case insensitive) in the name, then it will read RLEs from standard input and census them.
Example:

Code: Select all

./recompile.sh —rule b3s23 —symmetry test_stdin
./apgluxe -n 1000000 -k <your_key> < soup_rles.txt
./rle_outputting_program | ./apgluxe -n 1000000 -k <your_key>
See Tutorials/Catagolue stdin symmetry for more details.
User:PK22
Learning miscellaneous programming languages.
Post Reply