## Hacking apgsearch

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

### Re: Hacking apgsearch

muzik wrote:Possible pseudosymmetry suggestion: "inflated" soups, where each cell takes up a 2x2 space.

This could be especially useful for rules which simulate margolus rules with 2x2 blocks (although I don't see much evil in searching rules without this property using this pseudosymmetry). It could possibly also be made subject to the additional symmetries and size rectangle (8x32, 4x64, 2x128) options the 1x1-cell soups face, obviously scaled up for it to make sense.

I liked this idea, and since apgsearch 1.x (or 0.54+0.x, really) is very easy to work with I implemented this. Here's a patch against apgsearch 0.54+0.32i (including all the changes in 0.54+0.31i-ab3):

--- apgsearch-2017-8-07-v0.54+0.32i.py   2017-09-01 12:08:32.293824300 +0200
+++ apgsearch-2017-8-07-v0.54+0.32i-ab2.py   2017-09-01 12:28:35.947669300 +0200
@@ -51,7 +51,7 @@
import urllib2

#Version "number"
-vnum = "v0.54+0.32i"
+vnum = "v0.54+0.32i-ab2"
g2_8 = True

'''#Stores whether the rule is outer-totalistic or not
@@ -169,7 +169,16 @@
else:
d = 0

-    for j in xrange(32):
+    jrange = 32
+    if sym == 'AB_sha512_16x32_Test':
+        s = hashlib.sha512(instring).digest()
+        jrange = 64
+
+    if sym == 'AB_sha512_20x20_Test':
+        s = hashlib.sha512(instring).digest()
+        jrange = 50
+
+    for j in xrange(jrange):

t = ord(s[j])

@@ -195,6 +204,12 @@
x = k + 8*(j % 32)
y = int(j / 32)

+            elif (sym == 'AB_sha512_20x20_Test'):
+
+            bitno = k + 8*j
+            x = bitno % 20
+            y = int(bitno / 20)
+
else:
x = k + 8*(j % 2)
y = int(j / 2)
@@ -203,8 +218,21 @@

if ((d == 0) | (x >= y)):

-                    thesoup.append(x)
-                    thesoup.append(y)
+                    if (sym == 'AB_C1_2x2_32x32_Test'):
+
+                        thesoup.append(2*x)
+                        thesoup.append(2*y)
+                        thesoup.append(2*x+1)
+                        thesoup.append(2*y)
+                        thesoup.append(2*x)
+                        thesoup.append(2*y+1)
+                        thesoup.append(2*x+1)
+                        thesoup.append(2*y+1)
+
+                    else:
+
+                        thesoup.append(x)
+                        thesoup.append(y)

if (sym == '32x32'):

@@ -296,10 +324,54 @@
thesoup.append(thesoup[x+1])
thesoup.append(-thesoup[x]-1)

+    if sym == "AB_256x256_Test":
+
+        thearray = [
+            [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+            [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+            [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+            [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+            [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+            [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+            [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+            [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+            [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+            [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+            [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+            [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+            [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+            [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+            [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
+            [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
+        ]
+
+        for j in xrange(0, len(thesoup), 2):
+            x = thesoup[j]
+            y = thesoup[j + 1]
+            thearray[x][y] = 1
+
+        thesoup = [];
+        for j in xrange(256):
+            for k in xrange(256):
+                ax = int(j / 16)
+                ay = int(k / 16)
+                bx = j % 16
+                by = k % 16
+                if (thearray[ax][ay] * thearray[bx][by]) == 1:
+                    thesoup.append(j)
+                    thesoup.append(k)
+
+#    rlepath = g.getdir("temp") + "thesoup.rle"
+#    g.store(thesoup, rlepath)
+#    g.getstring("Quit now and look at the saved soup.", rlepath)
+
return thesoup

# Checks if symmetry is a valid one.
def check(string):
+    if string in ['AB_256x256_Test', 'AB_sha512_16x32_Test', 'AB_sha512_20x20_Test', 'AB_C1_2x2_32x32_Test']:
+        return string
+
symmetries = {"C1": [],
"C2": ["1", "2", "4"],
"C4": ["1", "4"],
@@ -13208,7 +13280,7 @@
rootstring = g.getstring("What seed to use for this search (make this unique)?", datetime.datetime.now().isoformat()+"")
rulestring = g.getstring("Which rule to use?", "B3/S23")
-    symmstring = g.getstring("What symmetries to use?", "C1")
+    symmstring = g.getstring("What symmetries to use?", 'AB_C1_2x2_32x32_Test')
pseudo = False
@@ -13221,7 +13293,7 @@
orignumber = min(orignumber, 100000000)
number = orignumber
initpos = 0
-    if symmstring not in ["1x256", "2x128", "4x64", "8x32", "C1", "C2_1", "C2_2", "C2_4", "C4_1", "C4_4", "D2_+1", "D2_+2", "D2_x", "D4_+1", "D4_+2", "D4_+4", "D4_x1", "D4_x4", "D8_1", "D8_4"]:
+    if symmstring not in ["AB_256x256_Test", "AB_sha512_16x32_Test", "AB_sha512_20x20_Test", "AB_C1_2x2_32x32_Test", "1x256", "2x128", "4x64", "8x32", "C1", "C2_1", "C2_2", "C2_4", "C4_1", "C4_4", "D2_+1", "D2_+2", "D2_x", "D4_+1", "D4_+2", "D4_+4", "D4_x1", "D4_x4", "D8_1", "D8_4"]:
g.exit(symmstring+" is not a valid symmetry option")

soup = Soup()
@@ -13348,6 +13420,7 @@
g.new("Symmetry test")

symmetries = [["32x32", "C1", "8x32", "4x64", "2x128", "1x256"],
+                  ["AB_256x256_Test", "AB_sha512_16x32_Test", 'AB_sha512_20x20_Test', 'AB_C1_2x2_32x32_Test'],
["C2_1", "C2_2", "C2_4"],
["C4_1", "C4_4"],
["D2_+1", "D2_+2", "D2_x"],

The test symmetry I used is called "AB_C1_2x2_32x32_Test" -- a fairly horrible name, admittedly, but it tells you everything you need to know at a glance:

• The "original" soups are C1-symmetric (i.e. asymmetric);
• Each cell gets "inflated" to size 2x2;
• The resulting soup is size 32x32.

This could easily be adapted to arbitrary "inflation factors" and (pseudo-)symmetries, too.
If you speak, your speech must be better than your silence would have been. — Arabian proverb

Catagolue: Apple Bottom • Life Wiki: Apple Bottom • Twitter: @_AppleBottom_

Proud member of the Pattern Raiders!

Apple Bottom

Posts: 941
Joined: July 27th, 2015, 2:06 pm

### Re: Hacking apgsearch

Apologies for the dumb question, but how exactly are patches applied?

I tried saving it as a .py and running it in golly, then running the apgsearch script to see if it had modified it in anyway, but it didn't do anything. Is it supposed to be pasted directly into the script somewhere?
waiting for apgsearch to support one-dimensional rules
muzik

Posts: 2761
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

### Re: Hacking apgsearch

muzik wrote:Apologies for the dumb question, but how exactly are patches applied?

This really isn't a dumb question in Windows-world, though Windows itself may be a little stupid about such things. In Windows a patch is usually some OS-level adjustment to a binary file somewhere.

These text patches are something different -- just a way of explaining what changed in a text file, instead of making a fresh copy of the whole file.

Text patch files are more of a Linux thing, so you have to use something like Cygwin to make them work properly in Windows.

Otherwise you'd have to read the patch file and see where it says to remove things (-) and add things (+), and do all that editing manually -- which is tedious and maybe error-prone, but not impossible, and possibly good Python programming practice.

dvgrn
Moderator

Posts: 4657
Joined: May 17th, 2009, 11:00 pm

### Re: Hacking apgsearch

muzik wrote:Apologies for the dumb question, but how exactly are patches applied?

I tried saving it as a .py and running it in golly, then running the apgsearch script to see if it had modified it in anyway, but it didn't do anything. Is it supposed to be pasted directly into the script somewhere?

Not a dumb question at all. As dvgrn said, you'll want to use patch(1), which is available on Cygwin.

That said, since it'll be easier for everyone, I'll just attach the resulting patched script to this post.

EDIT: everyone who wants to do so is of course welcome to contribute to the AB_*_Test symmetries, BTW -- I'd only ask that if you make functional changes to the script, especially to sample soup generation, you use a different test symmetry please (and one that isn't prefixed with AB_ ideally).
Attachments
apgsearch-2017-8-07-v0.54+0.32i-ab2.zip
If you speak, your speech must be better than your silence would have been. — Arabian proverb

Catagolue: Apple Bottom • Life Wiki: Apple Bottom • Twitter: @_AppleBottom_

Proud member of the Pattern Raiders!

Apple Bottom

Posts: 941
Joined: July 27th, 2015, 2:06 pm

### Re: Hacking apgsearch

Seems to be working pretty much fine for me. Here's hoping the much more speedy apgluxe officially gets this pseudosymmetry in a future patch, possibly with an option to inflate any valid specified symmetry (for example, C1 into C1_2x2, D8_4 into D8_4_2x2)...

On a related note, are there any scripts that can be used to inflate a selected pattern? Drawing soups out manually again using 2x2 blocks is not an enjoyable experience.
waiting for apgsearch to support one-dimensional rules
muzik

Posts: 2761
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

### Re: Hacking apgsearch

Reposting this over here:
A for awesome wrote:
calcyman wrote:
muzik wrote:It would be better if catagolue and/or the hacked version of apgsearch were to check the names of rules, and then attempt to simplify them, preferably sorting the transitions into alphabetical order. Since right now you can create multiple different censuses for the same rule.

That's the job of the client program, i.e. Aidan F Pierce's 'hacked apgsearch'.

Here's a quick patch to do that:

if g2_8:
g.setalgo("QuickLife")
g.setrule(rulestring)
rulestring = g.getrule()

Insert that code directly following the line consisting solely of a commented string of hyphens in apg_main(). All this really does is tell Golly to canonize the rulestring for it.
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

A for awesome

Posts: 1616
Joined: September 13th, 2014, 5:36 pm
Location: 0x-1

### Re: Hacking apgsearch

apgsearch-2017-9-02-v0.54+0.33i.py.zip

Improvements over the previous version:
• Uploads hauls to Catagolue using the canonical isotropic rulestring.
• Roughly 50%–100% faster for rules where object separation takes up a large fraction of the runtime.
• Fixes a longstanding bug whereby blinkers alternating between xp2_5 and xp2_7 phases would be classified as different oscillators depending on their phase.
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

A for awesome

Posts: 1616
Joined: September 13th, 2014, 5:36 pm
Location: 0x-1

### Re: Hacking apgsearch

A for awesome wrote:apgsearch-2017-9-02-v0.54+0.33i.py.zip

And here's my version, with no additional changes, just the existing ones reapplied to 0.54+0.33i:
apgsearch-2017-9-02-v0.54+0.33i-ab1.zip
If you speak, your speech must be better than your silence would have been. — Arabian proverb

Catagolue: Apple Bottom • Life Wiki: Apple Bottom • Twitter: @_AppleBottom_

Proud member of the Pattern Raiders!

Apple Bottom

Posts: 941
Joined: July 27th, 2015, 2:06 pm

### Re: Hacking apgsearch

I've noticed q and s tend to stop working and, as a result, have lost 600 thousand soups and 10 hours of computing time today.
EDIT: I turned caps lock on and off and it seemed to work after that.
This post was brought to you by the letter D, for dishes that Andrew J. Wade won't do. (Also Daniel, which happens to be me.)
Current rule interest: B2ce3-ir4a5y/S2-c3-y

drc

Posts: 1664
Joined: December 3rd, 2015, 4:11 pm
Location: creating useless things in OCA

### Re: Hacking apgsearch

Crazy realisation that there was no point in searching D2_x... for a rule with a D2_x gutter symmetry oscillator, because the oscillator itself is NOT D2_x:
x = 5, y = 6, rule = B2i3-ekq4eijyz5cek6cn7e/S2-n3-aey4aceky5ijkq
2o$obo$2o$3bo$2bobo$2b3o! The symmetry is preserved throughout, so it's clearly not just a unique property of the oscillator: x = 11, y = 12, rule = B2i3-ekq4eijyz5cek6cn7e/S2-n3-aey4aceky5ijkq 4bo$4bo$4bo$2b2o$bo$bo$2o$obo5b3o$2o5bo$3bo3bo$2bob3o$2b3o!

The symmetry is only preserved in certain rules though.

Hence, and seen the potential, can this symmetry be incorporated to the Python version (as unofficial)?
SoL : FreeElectronics : DeadlyEnemies : 6a-ite
what is “sesame oil”?

Rhombic

Posts: 975
Joined: June 1st, 2013, 5:41 pm

### Re: Hacking apgsearch

Rhombic wrote:Hence, and seen the potential, can this symmetry be incorporated to the Python version (as unofficial)?

Something like this? (I've called the new test symmetry "AB_D2_x_skewgutter_Test", since it's skewed in addition to having the empty diagonal lane.)

apgsearch-2017-9-02-v0.54+0.33i-ab2.zip
If you speak, your speech must be better than your silence would have been. — Arabian proverb

Catagolue: Apple Bottom • Life Wiki: Apple Bottom • Twitter: @_AppleBottom_

Proud member of the Pattern Raiders!

Apple Bottom

Posts: 941
Joined: July 27th, 2015, 2:06 pm

### Re: Hacking apgsearch

How about orthogonal and non-skewed diagonal gutters as well?
waiting for apgsearch to support one-dimensional rules
muzik

Posts: 2761
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

### Re: Hacking apgsearch

muzik wrote:How about orthogonal and non-skewed diagonal gutters as well?

Well, that would be possible.

But before attempting to generalize, I think there should be some discussion on systematically naming these gutter symmetries.

My first instinct is to to use some notation that captures a) whether the symmetry's "regular" or "gutter"; and b) what the horizontal/vertical offset (skew) is. Consider this C1 soup:

x = 16, y = 16, rule = B3/S23
2ob2o2b3ob2ob2o$bob2ob3o4b3o$obo3bo2b4obo$3obobo2bo2bobo$3bob2o4b3o$bo 4bob4obo$3bob4o2bo2b2o$o5bo3bo2bo$b2obo2bobob2obo$o3b2o4b2ob3o$2o4bo2b
o$4o2bobob6o$o2bob4o3b2obo$3bobo3b2o2bo$5ob3ob3o2bo$3bo2bobobo2b2o! This might give rise to e.g: D2_x (0,0)-skew gutter symmetry: x = 16, y = 16, rule = B3/S23 bob2o2b3ob2ob2o$o2b2ob3o4b3o$6bo2b4obo$2o2bobo2bo2bobo$2obob2o4b3o$4bo
bob4obo$b5ob2o2bo2b2o$2o4bo3bo2bo$2o3b2o2bob2obo$ob2obo2bob2ob3o$2bo2b obobo$obob3ob2o2b4o$ob3o3bo2bobobo$bo2b2obobob2o$4o2bob2obo3bo$2o4bo2b
ob2obo!

D2_x (0,0)-skew non-gutter symmetry:

x = 16, y = 16, rule = B3/S23
2ob2o2b3ob2ob2o$2ob2ob3o4b3o$2bo3bo2b4obo$2o2bobo2bo2bobo$2obob2o4b3o$4bobob4obo$b8o2bo2b2o$2o4bo3bo2bo$2o3b2o2bob2obo$ob2obo2bob2ob3o$2bo2b
obobo$obob3ob2ob5o$ob3o3bo2b3obo$bo2b2obobob3o$4o2bob2obo3bo$2o4bo2bob 2obo! D2_x (0,1)-skew gutter symmetry: x = 16, y = 17, rule = B3/S23 bob2o2b3ob2ob2o$3b2ob3o4b3o$o5bo2b4obo$4bobo2bo2bobo$2o3b2o4b3o$2obo2b
ob4obo$4bo2b2o2bo2b2o$b5o4bo2bo$2o4bo2bob2obo$2o3b2o3b2ob3o$ob2obo2bo$
2bo2bobobo2b4o$obob3ob2o3bobo$ob3o3bo2bo$bo2b2obobob2o2bo$4o2bob2obo$2o4bo2bob2obo! D2_x (0,1)-skew non-gutter symmetry: x = 16, y = 17, rule = B3/S23 2ob2o2b3ob2ob2o$2ob2ob3o4b3o$3o3bo2b4obo$2bobobo2bo2bobo$2o3b2o4b3o$2o
bo2bob4obo$4bob3o2bo2b2o$b6o3bo2bo$2o4bo2bob2obo$2o3b2o3b2ob3o$ob2obo 2bo$2bo2bobobob5o$obob3ob2ob3obo$ob3o3bo2b3o$bo2b2obobob3obo$4o2bob2ob
o$2o4bo2bob2obo! D2_x (1,2)-skew gutter symmetry: x = 15, y = 18, rule = B3/S23 ob2o2b3ob2ob2o$2b2ob3o4b3o$5bo2b4obo$o2bobo2bo2bobo$4b2o4b3o$2o3bob4ob
o$2obo2b2o2bo2b2o$4bo4bo2bo$b5o2bob2obo$2o4bo2b2ob3o$2o3b2o$ob2obo2bo
2b4o$2bo2bobobo2bobo$obob3ob2o$ob3o3bo2bo2bo$bo2b2obobob2o$4o2bob2obo$
2o4bo2bob2obo!

and so on. (Separating the two halves too much may not make sense for range-1 rules, but there's no reason the notation shouldn't accomodate this in principle.) Same for orthogonal symmetries.

Perhaps this is overkill, though, and "regular", "gutter", "skew" and "skew-gutter" is all we'd need, giving rise to e.g. "D2_x", "D2_xg", "D2_xs", and "D2_xsg" or so (once these are official, anyway!).

Of course, knowing Calcyman he'll come up with a completely different scheme that's much more elegant, general and succinct, and implement it in the next version of apgluxe before we even know it.
If you speak, your speech must be better than your silence would have been. — Arabian proverb

Catagolue: Apple Bottom • Life Wiki: Apple Bottom • Twitter: @_AppleBottom_

Proud member of the Pattern Raiders!

Apple Bottom

Posts: 941
Joined: July 27th, 2015, 2:06 pm

### Re: Hacking apgsearch

Here's another potential pseudosymmetry/symmetry augmentation I've been thinking about for the past couple of weeks: how about "dispersed" or "exploded" soups?

These would basically take a regular soup and spread it out across a wider area, leaving each live cell with zero neighbours, but allowing interactions to take place between cells.
x = 71, y = 31, rule = B/S01234567
42bobobobobobo3bobo7bo2$40bo3bobobobo3bobo5bo2$40bo3bo3bo3bo3bo3bobo3b
o2$40bo3bo5bo5bo3bobo5bobo2$b6ob2o3bo26bobobobo9bo5bobobo3bo$ob4ob2o2b o$obobobobob2obo26bobobo5bobobobo3bo9bo$obo2bo2bob2o2b2o$4o4bo2b3obo9b
o14bobo3bo3bobo7bobobobo$3o2b4obo4bo10bo$2obob2o3b4o13bo12bobobobobo5b
obobobobobobobo$5o2b8o7b6o$obo3bob4o2b2o6b6o12bo3bo7bo3bobobobo5bobo$b ob4o2bob5o11bo$2obo3bo2bo2bobo10bo15bo3bobobobo5bo3bobobobobo$b5ob2obo b2o11bo$bobo2bobob3o27bobo3bo7bo5bo5bo3bo$obob2obo3bo3bo$5bo2b5o2bo26b
obobobobo3bobo3bo3bobo$bo2b2obo4bob2o$42bo3bo5bo3bo3bobobo2$40bo3bo3bo bo3bo7bo7bo2$50bo5bobobobobo5bo2$42bo5bobo3bo9bo3bobo! For reasons obviouses searching Life with such a symmetry augmentation would be about as useful as I have been to the Life community as a whole, but since apgsearch and Catagolue aren't 100% focused on b3s23/C1, it could have some interesting implications in certain other rules. For example, some rules can simulate a Margolus neighbourhood with lone cells identically to rules which use 2x2 blocks (and both types of oscillator can exist in a rule at the same time): x = 23, y = 29, rule = B2c3i/S5i 2o18bo$2o$2o18bo$2o7$2o18bo$2o$2o18bo$2o$2o18bo$2o$2o18bo$2o4$4o16bobo$4o$4o16bobo$4o$4o16bobo$4o$4o16bobo$4o!

It doesn't neccesarily need to be applied to both axes either:

x = 46, y = 31, rule = B/S01234567
30b2o3b2obo3b3o2$30b6o4b2obo2$30b2obobo4b2ob2o2$2o3b2obo3b3o15bo4b7o2b o$6o4b2obo$2obobo4b2ob2o16b4obo2bo5bo$o4b7o2bo$b4obo2bo5bo15bo5bobo$bo
5bobo$b2o3bob8o15b2o3bob8o$bo2bobo3b2o$5bo5bo19bo2bobo3b2o$ob3obo2bobo
bobo$o6b3o2bo2bo19bo5bo$obo7bo2bo$obob2o5bob2o15bob3obo2bobobobo$o4b4o
4b3o$2bo2bo5b5o14bo6b3o2bo2bo$obob2o2b5obo$30bobo7bo2bo2$30bobob2o5bob
2o2$30bo4b4o4b3o2$32bo2bo5b5o2\$30bobob2o2b5obo!

If this ever gets implemented in a 4.x release, it could be denoted using an e, similarly to how the i is used to inflate soups, with one e exploding in one axis, and two es exploding on both. I don't see much point in exploding soups further. It could possibly also be combined with i to create some exotic soups.

That's just a random, stupid idea of mine though.
waiting for apgsearch to support one-dimensional rules
muzik

Posts: 2761
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

### Re: Hacking apgsearch

muzik wrote:Here's another potential pseudosymmetry/symmetry augmentation I've been thinking about for the past couple of weeks: how about "dispersed" or "exploded" soups?

[...]

That's just a random, stupid idea of mine though.

Not a bad idea though. Why not try implementing this in the Python version (which is going to be easier to work with than the C++ versions)? The only thing you really need to modify is the hashsoup() function near the top of the file.
If you speak, your speech must be better than your silence would have been. — Arabian proverb

Catagolue: Apple Bottom • Life Wiki: Apple Bottom • Twitter: @_AppleBottom_

Proud member of the Pattern Raiders!

Apple Bottom

Posts: 941
Joined: July 27th, 2015, 2:06 pm

### Re: Hacking apgsearch

I would give it a shot, but my knowledge of Python is basically zero. Then again, at the same time, that's probably down to laziness on my part.
waiting for apgsearch to support one-dimensional rules
muzik

Posts: 2761
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

### Re: Hacking apgsearch

muzik wrote:I would give it a shot, but my knowledge of Python is basically zero. Then again, at the same time, that's probably down to laziness on my part.

Hey, that's what I said when I first started looking at apgsearch, too. I didn't know any Python -- still don't really, but that's a different story --, and had to google just about anything and everything. It's not that hard, though, so just give it a try.
If you speak, your speech must be better than your silence would have been. — Arabian proverb

Catagolue: Apple Bottom • Life Wiki: Apple Bottom • Twitter: @_AppleBottom_

Proud member of the Pattern Raiders!

Apple Bottom

Posts: 941
Joined: July 27th, 2015, 2:06 pm

### Re: Hacking apgsearch

Apple Bottom wrote:Something like this? (I've called the new test symmetry "AB_D2_x_skewgutter_Test", since it's skewed in addition to having the empty diagonal lane.)

apgsearch-2017-9-02-v0.54+0.33i-ab2.zip

Another rule with skewgutter symmetry:https://catagolue.appspot.com/object/xp13_2728s8/b2i3-cknq4cez5cey7c8s23-e4e5e6-ik7
Results with that symmetry already with C1, I'll check with your Python script.
SoL : FreeElectronics : DeadlyEnemies : 6a-ite
what is “sesame oil”?

Rhombic

Posts: 975
Joined: June 1st, 2013, 5:41 pm

### Re: Hacking apgsearch

muzik wrote:I would give it a shot, but my knowledge of Python is basically zero. Then again, at the same time, that's probably down to laziness on my part.

BTW, I noticed that you've started submitting to a new symmetry type, MB_bad8x8_test. Any chance we might see the code? In addition to simply being curious I'd also like to implement sample soup regeneration for this in the browser extension.
If you speak, your speech must be better than your silence would have been. — Arabian proverb

Catagolue: Apple Bottom • Life Wiki: Apple Bottom • Twitter: @_AppleBottom_

Proud member of the Pattern Raiders!

Apple Bottom

Posts: 941
Joined: July 27th, 2015, 2:06 pm

### Re: Hacking apgsearch

Was trying to generate 1x4 soups, and ended up changing the values of 8x32 to this:

x = k + 8*(j % 1)
y = int(j / 4)

which basically generates crappy high density 8x8 soups.

[strike](If you're willing to aid me in reaching my original goal, I would probably appreciate it.)[/strike] - well that's not really necessary anymore since I've found another solution.
Last edited by muzik on October 4th, 2017, 11:56 am, edited 1 time in total.
waiting for apgsearch to support one-dimensional rules
muzik

Posts: 2761
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

### Re: Hacking apgsearch

muzik wrote:Was trying to generate 1x4 soups, and ended up changing the values of 8x32 to this:

x = k + 8*(j % 1)
y = int(j / 4)

which basically generates crappy high density 8x8 soups.

OK, thanks. I'll process this later tonight.

BTW, for the purpose of reproducability of results -- if you end up changing how these soups are generated, please do use a different symmetry type (anything really, say "MB_bad8x8_v2_test", or even "MB_awesome8x8_test"). I think it's very important that given a rule, symmetry type, root (seed), and sample soup number, there is no ambiguity about what the soup was.

Just saying, because I've been burned by this kind of thing before!

(If you're willing to aid me in reaching my original goal, I would probably appreciate it.)

Sure -- remind me what it was again?

Also, while I'm at it, could you also share how "MB_dense1x8_test" soups are generated? Thanks!
If you speak, your speech must be better than your silence would have been. — Arabian proverb

Catagolue: Apple Bottom • Life Wiki: Apple Bottom • Twitter: @_AppleBottom_

Proud member of the Pattern Raiders!

Apple Bottom

Posts: 941
Joined: July 27th, 2015, 2:06 pm

### Re: Hacking apgsearch

Like this:

if (sym == 'MB_dense1x8_test'):

x = k + 2*(j % 1)
y = int(j / 32)

Also:

if (sym == 'MB_dense2x8_test'):

x = k + 2*(j % 1)
y = int(j / 16)
waiting for apgsearch to support one-dimensional rules
muzik

Posts: 2761
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

### Re: Hacking apgsearch

muzik wrote:Like this: [...]

Thanks. Actually, could you attach the entire script you're using, or provide "real" diffs? I'm too lazy to try and figure out where exactly to fit in those snippets of code to reproduce what you've got.
If you speak, your speech must be better than your silence would have been. — Arabian proverb

Catagolue: Apple Bottom • Life Wiki: Apple Bottom • Twitter: @_AppleBottom_

Proud member of the Pattern Raiders!

Apple Bottom

Posts: 941
Joined: July 27th, 2015, 2:06 pm

### Re: Hacking apgsearch

Apple Bottom wrote:
muzik wrote:Like this: [...]

Thanks. Actually, could you attach the entire script you're using, or provide "real" diffs? I'm too lazy to try and figure out where exactly to fit in those snippets of code to reproduce what you've got.

Both of them just replace 8x32 in my case. Alongside replacing every instance of "8x32" in the script with the respective symmetry name.
waiting for apgsearch to support one-dimensional rules
muzik

Posts: 2761
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

### Re: Hacking apgsearch

muzik wrote:
Apple Bottom wrote:
muzik wrote:Like this: [...]

Thanks. Actually, could you attach the entire script you're using, or provide "real" diffs? I'm too lazy to try and figure out where exactly to fit in those snippets of code to reproduce what you've got.

Both of them just replace 8x32 in my case. Alongside replacing every instance of "8x32" in the script with the respective symmetry name.

Right, thanks. (Turns out it was whitespace that bit me in the behind there. There's sane language design, and then there's Python, sigh.)
If you speak, your speech must be better than your silence would have been. — Arabian proverb

Catagolue: Apple Bottom • Life Wiki: Apple Bottom • Twitter: @_AppleBottom_

Proud member of the Pattern Raiders!

Apple Bottom

Posts: 941
Joined: July 27th, 2015, 2:06 pm

PreviousNext