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

Hacking apgsearch

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

Re: Hacking apgsearch

Postby Apple Bottom » August 8th, 2017, 5:58 pm

calcyman wrote:The same applies to those monstrous 256-by-256 '25p' soups obtained by taking the https://en.wikipedia.org/wiki/Kronecker_product of a C1 soup with itself.


Since there's no code in wwei's (second) version of the script to search these, and since the notion of monstrous 256x256 soups somehow appealed to me, I went ahead and wrote support for these myself. The pseudo-symmetry I used is AB_256x256_Test.

Here's a diff against Aidan's v0.54+0.31i; the only real modification is in hashsoup(). The code could easily be adapted to symmetries other than C1, though you'd then have to decide whether to first produce a symmetrical soup and THEN compute the Kronecker product, or compute the Kronecker product first and THEN produce a symmetrical soup, since obviously these operations don't commute.

All typos, thinkos, and brown paper bag bugs in this code are mine.

--- apgsearch-2017-8-07-v0.54+0.31i.py   2017-08-08 21:54:53.572199300 +0200
+++ apgsearch-2017-8-07-v0.54+0.31i-ab1.py   2017-08-08 22:56:40.193205900 +0200
@@ -51,7 +51,7 @@
import urllib2

#Version "number"
-vnum = "v0.54+0.3i"
+vnum = "v0.54+0.31i-ab1"
g2_8 = True

'''#Stores whether the rule is outer-totalistic or not
@@ -296,10 +296,50 @@
             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)
+
     return thesoup

# Checks if symmetry is a valid one.
def check(string):
+    if string == "AB_256x256_Test":
+        return string
+
     symmetries = {"C1": [],
                   "C2": ["1", "2", "4"],
                   "C4": ["1", "4"],
@@ -13203,7 +13243,7 @@
     if not upload:
         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_256x256_Test")
     pseudo = False
     payoshakey = g.getstring("Please enter your key (visit "+get_server_address()+"/payosha256 in your browser).", "#anon") if upload else None
     if not upload:
@@ -13216,7 +13256,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", "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()
@@ -13343,6 +13383,7 @@
     g.new("Symmetry test")

     symmetries = [["32x32", "C1", "8x32", "4x64", "2x128", "1x256"],
+                  ["AB_256x256_Test"],
                   ["C2_1", "C2_2", "C2_4"],
                   ["C4_1", "C4_4"],
                   ["D2_+1", "D2_+2", "D2_x"],
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!
User avatar
Apple Bottom
 
Posts: 1025
Joined: July 27th, 2015, 2:06 pm

Re: Hacking apgsearch

Postby A for awesome » August 8th, 2017, 6:13 pm

Apple Bottom wrote:
--- apgsearch-2017-8-07-v0.54+0.31i.py   2017-08-08 21:54:53.572199300 +0200
+++ apgsearch-2017-8-07-v0.54+0.31i-ab1.py   2017-08-08 22:56:40.193205900 +0200
@@ -51,7 +51,7 @@
import urllib2

#Version "number"
-vnum = "v0.54+0.3i"
+vnum = "v0.54+0.31i-ab1"
g2_8 = True

'''#Stores whether the rule is outer-totalistic or not
@@ -296,10 +296,50 @@
             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)
+
     return thesoup

# Checks if symmetry is a valid one.
def check(string):
+    if string == "AB_256x256_Test":
+        return string
+
     symmetries = {"C1": [],
                   "C2": ["1", "2", "4"],
                   "C4": ["1", "4"],
@@ -13203,7 +13243,7 @@
     if not upload:
         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_256x256_Test")
     pseudo = False
     payoshakey = g.getstring("Please enter your key (visit "+get_server_address()+"/payosha256 in your browser).", "#anon") if upload else None
     if not upload:
@@ -13216,7 +13256,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", "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()
@@ -13343,6 +13383,7 @@
     g.new("Symmetry test")

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

That alerted me to a (only-mildly)-important point. Everyone, please be so kind as to change the vnum variable in your code to "v0.54+0.31i" if that's the version you have -- I forgot to update that when I posted the newest version.
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
User avatar
A for awesome
 
Posts: 1818
Joined: September 13th, 2014, 5:36 pm
Location: 0x-1

Re: Hacking apgsearch

Postby wwei23 » August 8th, 2017, 6:20 pm

Result unique to 1x256X2+1 at the time of this writing:
https://catagolue.appspot.com/hashsoup/ ... 8336/b3s23
User avatar
wwei23
 
Posts: 935
Joined: May 22nd, 2017, 6:14 pm
Location: The (Life?) Universe

Re: Hacking apgsearch

Postby muzik » August 8th, 2017, 6:39 pm

wwei23 wrote:Result unique to 1x256X2+1 at the time of this writing:
https://catagolue.appspot.com/hashsoup/ ... 8336/b3s23

It releases a LWSS in its uncompiled state, anyway.
Bored of using the Moore neighbourhood for everything? Introducing the Range-2 von Neumann isotropic non-totalistic rulespace!
muzik
 
Posts: 3310
Joined: January 28th, 2016, 2:47 pm
Location: Scotland


Re: Hacking apgsearch

Postby toroidalet » August 8th, 2017, 8:03 pm

wwei23 wrote:Can anyone spot the ov_s16? [link]

Probably a glitch. The sample soup generates the default one, and no (strict) still-life with 16 cells can exceed 40*40. (No 16-cell pseudo-still life can have 1 side exceed 40 cells)
After adding APG_IdentifyTs, it tells me I don't have APG_AdvanceTs. Can someone just give me all the APG_X rules so we don't have to go through this hassle again?
x = 11, y = 5, rule = B2ck3-ij5n78/S01e2ei3-k5ai
8b2o$2o3b2o$bo4bo3bo$2bo2b2o$o7bo!

(Check Gen 2)
User avatar
toroidalet
 
Posts: 964
Joined: August 7th, 2016, 1:48 pm
Location: my computer

Re: Hacking apgsearch

Postby A for awesome » August 8th, 2017, 9:55 pm

toroidalet wrote:After adding APG_IdentifyTs, it tells me I don't have APG_AdvanceTs. Can someone just give me all the APG_X rules so we don't have to go through this hassle again?

@RULE APG_AdvanceTs

*** File autogenerated by saverule. ***


To filter out extraneous results from the output of APG_IdentifyTs.

state 0:  vacuum
state 11:  p3+ on
state 12:  p3+ off
state 13:  T on
state 14:  T off
state 15:  not-T on
state 16:  not-T off


@TABLE


n_states:18
neighborhood:Moore
symmetries:rotate4reflect
var a={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17}
var aa=a
var ab=a
var ac=a
var ad=a
var ae=a
var af=a
var ag=a
var in={1,3,5,15}
var io={2,4,6,16}
var i={1,2,3,4,5,6,15,16}
var o={0,12,14}
var oa=o
var ob=o
var oc=o
var od=o
var oe=o
var of=o
var og=o
var oo={12,14}
var c={0,12,13,14}
var ca=c
var t={13,14}
in,a,aa,ab,ac,ad,ae,af,ag,11
io,a,aa,ab,ac,ad,ae,af,ag,12
#Birth
o,13,13,13,oa,ob,oc,od,oe,13
o,13,13,oa,ob,13,oc,od,oe,13
o,13,13,oa,ob,oc,od,13,oe,13
o,13,13,oa,ob,oc,od,oe,13,13
o,13,oa,13,ob,13,oc,od,oe,13
o,13,oa,ob,13,oc,13,od,oe,13
#Inert
o,13,13,c,ca,oa,ob,oc,od,o
o,13,oa,c,ob,oc,od,oe,of,o
o,13,13,oa,13,ob,13,oc,13,o
o,oa,13,ob,c,oc,od,oe,of,o
o,13,oa,ob,13,oc,od,oe,of,o
o,13,oa,ob,oc,13,od,oe,of,o
o,13,13,oa,13,13,ob,oc,od,o
o,oa,13,ob,13,oc,13,od,13,o
o,oa,13,ob,oc,od,13,oe,of,o
#Survival
13,13,13,o,oa,ob,oc,od,c,13
13,13,o,13,oa,13,ob,oc,od,13
13,13,13,13,o,oa,ob,oc,od,13
13,c,o,oa,13,ob,13,oc,od,13
#Death
13,13,13,13,13,o,oa,ob,oc,14
13,13,13,13,13,13,o,c,oa,14
13,13,o,oa,ob,c,oc,od,oe,14
13,o,13,oa,ob,oc,od,oe,of,14
13,13,13,o,oa,13,ob,oc,13,14
13,o,oa,ob,oc,od,oe,of,og,14
#Not T
0,o,oa,ob,oc,od,oe,of,og,0
oo,o,oa,ob,oc,od,oe,of,og,12
o,a,aa,ab,ac,ad,ae,af,t,16
o,a,aa,ab,ac,ad,ae,t,af,16
13,a,aa,ab,ac,ad,ae,af,t,15
13,a,aa,ab,ac,ad,ae,t,af,15


@COLORS


0    0    0    0
1  255  255  255
2  127  127  127
7    0    0  255
8    0    0  127
9  255    0    0
10 127    0    0
11   0  255    0
12   0  127    0
13 255  255    0
14 127  127    0
17 127    0  127

@RULE APG_AssistTs

*** File autogenerated by saverule. ***


To help filter out extraneous results from the output of APG_IdentifyTs.

state 0:  vacuum
state 11:  p3+ on
state 12:  p3+ off
state 13:  T on
state 14:  T off
state 15:  not-T on
state 15:  not-T off


@TABLE


n_states:18
neighborhood:Moore
symmetries:rotate8reflect
var a={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17}
var aa=a
var ab=a
var ac=a
var ad=a
var ae=a
var af=a
var ag=a
var t={13,14}
var nt={15,16}
13,nt,a,ab,ac,ad,ae,af,ag,15
14,nt,a,ab,ac,ad,ae,af,ag,16
12,t,a,ab,ac,nt,ad,ae,af,16


@COLORS


0    0    0    0
1  255  255  255
2  127  127  127
7    0    0  255
8    0    0  127
9  255    0    0
10 127    0    0
11   0  255    0
12   0  127    0
13 255  255    0
14 127  127    0
17 127    0  127

@RULE APG_ExpungeTs

*** File autogenerated by saverule. ***


To filter out extraneous results from the output of APG_IdentifyTs.

state 0:  vacuum
state 11:  p3+ on
state 12:  p3+ off
state 13:  T on
state 14:  T off
state 17:  about to die


@TABLE


n_states:18
neighborhood:Moore
symmetries:rotate8reflect
var a={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17}
var aa=a
var ab=a
var ac=a
var ad=a
var ae=a
var af=a
var ag=a
var o={0,12,14}
var oa=o
var ob=o
var oc=o
var od=o
var oe=o
var of=o
var og=o
var t={13,14}
13,o,oa,ob,oc,od,oe,of,og,17
13,13,o,oa,ob,oc,od,oe,of,17
13,13,13,o,oa,ob,oc,od,oe,17
13,13,13,o,oa,ob,oc,od,13,17
13,13,o,13,oa,13,ob,oc,od,17
13,13,13,13,13,13,o,13,oa,17
14,o,oa,ob,oc,od,oe,of,og,12
17,a,aa,ab,ac,ad,ae,af,ag,0
t,17,a,aa,ab,ac,ad,ae,af,17


@COLORS


0    0    0    0
1  255  255  255
2  127  127  127
7    0    0  255
8    0    0  127
9  255    0    0
10 127    0    0
11   0  255    0
12   0  127    0
13 255  255    0
14 127  127    0
17 127    0  127
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
User avatar
A for awesome
 
Posts: 1818
Joined: September 13th, 2014, 5:36 pm
Location: 0x-1

Re: Hacking apgsearch

Postby Apple Bottom » August 9th, 2017, 8:32 am

There's occasionally been discussion of using different hash functions to generate larger asymmetric soups, e.g. here, here and here. Here's a straightforward implementation using SHA-512 to generate 16x32 soups; this submits to the AB_sha512_16x32_Test symmetry.

Diff against apgsearch 0.54+0.31i:

--- apgsearch-2017-8-07-v0.54+0.31i.py   2017-08-09 00:24:01.942016800 +0200
+++ apgsearch-2017-8-07-v0.54+0.31i-ab2.py   2017-08-09 14:19:18.442366400 +0200
@@ -51,7 +51,7 @@
import urllib2

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

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

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

         t = ord(s[j])

@@ -296,10 +301,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"]:
+        return string
+
     symmetries = {"C1": [],
                   "C2": ["1", "2", "4"],
                   "C4": ["1", "4"],
@@ -13203,7 +13252,7 @@
     if not upload:
         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_sha512_16x32_Test")
     pseudo = False
     payoshakey = g.getstring("Please enter your key (visit "+get_server_address()+"/payosha256 in your browser).", "#anon") if upload else None
     if not upload:
@@ -13216,7 +13265,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", "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()
@@ -13343,6 +13392,7 @@
     g.new("Symmetry test")

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


Incremental diff against 0.54+0.31i-ab1:

--- apgsearch-2017-8-07-v0.54+0.31i-ab1.py   2017-08-08 22:56:40.193205900 +0200
+++ apgsearch-2017-8-07-v0.54+0.31i-ab2.py   2017-08-09 14:19:18.442366400 +0200
@@ -51,7 +51,7 @@
import urllib2

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

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

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

         t = ord(s[j])

@@ -333,11 +338,15 @@
                     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 == "AB_256x256_Test":
+    if string in ["AB_256x256_Test", "AB_sha512_16x32_Test"]:
         return string

     symmetries = {"C1": [],
@@ -13243,7 +13252,7 @@
     if not upload:
         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?", "AB_256x256_Test")
+    symmstring = g.getstring("What symmetries to use?", "AB_sha512_16x32_Test")
     pseudo = False
     payoshakey = g.getstring("Please enter your key (visit "+get_server_address()+"/payosha256 in your browser).", "#anon") if upload else None
     if not upload:
@@ -13256,7 +13265,7 @@
         orignumber = min(orignumber, 100000000)
     number = orignumber
     initpos = 0
-    if symmstring not in ["AB_256x256_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"]:
+    if symmstring not in ["AB_256x256_Test", "AB_sha512_16x32_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()
@@ -13383,7 +13392,7 @@
     g.new("Symmetry test")

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


Looking back at those older posts, I think investigating 20x20 soups to produce results comparable with Nathaniel's earlier census would also be worthwhile, so I'll take a look at that next.

EDIT: straightforward way of generating 20x20 soups, submitting to AB_sha512_20x20_Test:

Diff against 0.54+0.31i:

--- apgsearch-2017-8-07-v0.54+0.31i.py   2017-08-09 00:24:01.942016800 +0200
+++ apgsearch-2017-8-07-v0.54+0.31i-ab3.py   2017-08-09 14:46:17.988999200 +0200
@@ -51,7 +51,7 @@
import urllib2

#Version "number"
-vnum = "v0.54+0.31i"
+vnum = "v0.54+0.31i-ab3"
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)
@@ -296,10 +311,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']:
+        return string
+
     symmetries = {"C1": [],
                   "C2": ["1", "2", "4"],
                   "C4": ["1", "4"],
@@ -13203,7 +13262,7 @@
     if not upload:
         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_sha512_20x20_Test')
     pseudo = False
     payoshakey = g.getstring("Please enter your key (visit "+get_server_address()+"/payosha256 in your browser).", "#anon") if upload else None
     if not upload:
@@ -13216,7 +13275,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', "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()
@@ -13343,6 +13402,7 @@
     g.new("Symmetry test")

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


Incremental diff against 0.54+0.31-ab2:

--- apgsearch-2017-8-07-v0.54+0.31i-ab2.py   2017-08-09 14:19:18.442366400 +0200
+++ apgsearch-2017-8-07-v0.54+0.31i-ab3.py   2017-08-09 14:46:17.988999200 +0200
@@ -51,7 +51,7 @@
import urllib2

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

'''#Stores whether the rule is outer-totalistic or not
@@ -174,6 +174,10 @@
         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])
@@ -200,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)
@@ -346,7 +356,7 @@

# Checks if symmetry is a valid one.
def check(string):
-    if string in ["AB_256x256_Test", "AB_sha512_16x32_Test"]:
+    if string in ['AB_256x256_Test', 'AB_sha512_16x32_Test', 'AB_sha512_20x20_Test']:
         return string

     symmetries = {"C1": [],
@@ -13252,7 +13262,7 @@
     if not upload:
         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?", "AB_sha512_16x32_Test")
+    symmstring = g.getstring("What symmetries to use?", 'AB_sha512_20x20_Test')
     pseudo = False
     payoshakey = g.getstring("Please enter your key (visit "+get_server_address()+"/payosha256 in your browser).", "#anon") if upload else None
     if not upload:
@@ -13265,7 +13275,7 @@
         orignumber = min(orignumber, 100000000)
     number = orignumber
     initpos = 0
-    if symmstring not in ["AB_256x256_Test", "AB_sha512_16x32_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"]:
+    if symmstring not in ["AB_256x256_Test", "AB_sha512_16x32_Test", 'AB_sha512_20x20_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()
@@ -13392,7 +13402,7 @@
     g.new("Symmetry test")

     symmetries = [["32x32", "C1", "8x32", "4x64", "2x128", "1x256"],
-                  ["AB_256x256_Test", "AB_sha512_16x32_Test"],
+                  ["AB_256x256_Test", "AB_sha512_16x32_Test", 'AB_sha512_20x20_Test'],
                   ["C2_1", "C2_2", "C2_4"],
                   ["C4_1", "C4_4"],
                   ["D2_+1", "D2_+2", "D2_x"],
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!
User avatar
Apple Bottom
 
Posts: 1025
Joined: July 27th, 2015, 2:06 pm

Re: Hacking apgsearch

Postby wwei23 » August 9th, 2017, 9:03 am

Apple Bottom wrote:There's occasionally been discussion of using different hash functions to generate larger asymmetric soups, e.g. here, here and here. Here's a straightforward implementation using SHA-512 to generate 16x32 soups; this submits to the AB_sha512_16x32_Test symmetry.

Diff against apgsearch 0.54+0.31i:

--- apgsearch-2017-8-07-v0.54+0.31i.py   2017-08-09 00:24:01.942016800 +0200
+++ apgsearch-2017-8-07-v0.54+0.31i-ab2.py   2017-08-09 14:19:18.442366400 +0200
@@ -51,7 +51,7 @@
import urllib2

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

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

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

         t = ord(s[j])

@@ -296,10 +301,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"]:
+        return string
+
     symmetries = {"C1": [],
                   "C2": ["1", "2", "4"],
                   "C4": ["1", "4"],
@@ -13203,7 +13252,7 @@
     if not upload:
         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_sha512_16x32_Test")
     pseudo = False
     payoshakey = g.getstring("Please enter your key (visit "+get_server_address()+"/payosha256 in your browser).", "#anon") if upload else None
     if not upload:
@@ -13216,7 +13265,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", "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()
@@ -13343,6 +13392,7 @@
     g.new("Symmetry test")

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


Incremental diff against 0.54+0.31i-ab1:

--- apgsearch-2017-8-07-v0.54+0.31i-ab1.py   2017-08-08 22:56:40.193205900 +0200
+++ apgsearch-2017-8-07-v0.54+0.31i-ab2.py   2017-08-09 14:19:18.442366400 +0200
@@ -51,7 +51,7 @@
import urllib2

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

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

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

         t = ord(s[j])

@@ -333,11 +338,15 @@
                     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 == "AB_256x256_Test":
+    if string in ["AB_256x256_Test", "AB_sha512_16x32_Test"]:
         return string

     symmetries = {"C1": [],
@@ -13243,7 +13252,7 @@
     if not upload:
         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?", "AB_256x256_Test")
+    symmstring = g.getstring("What symmetries to use?", "AB_sha512_16x32_Test")
     pseudo = False
     payoshakey = g.getstring("Please enter your key (visit "+get_server_address()+"/payosha256 in your browser).", "#anon") if upload else None
     if not upload:
@@ -13256,7 +13265,7 @@
         orignumber = min(orignumber, 100000000)
     number = orignumber
     initpos = 0
-    if symmstring not in ["AB_256x256_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"]:
+    if symmstring not in ["AB_256x256_Test", "AB_sha512_16x32_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()
@@ -13383,7 +13392,7 @@
     g.new("Symmetry test")

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


Looking back at those older posts, I think investigating 20x20 soups to produce results comparable with Nathaniel's earlier census would also be worthwhile, so I'll take a look at that next.

EDIT: straightforward way of generating 20x20 soups, submitting to AB_sha512_20x20_Test:

Diff against 0.54+0.31i:

--- apgsearch-2017-8-07-v0.54+0.31i.py   2017-08-09 00:24:01.942016800 +0200
+++ apgsearch-2017-8-07-v0.54+0.31i-ab3.py   2017-08-09 14:46:17.988999200 +0200
@@ -51,7 +51,7 @@
import urllib2

#Version "number"
-vnum = "v0.54+0.31i"
+vnum = "v0.54+0.31i-ab3"
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)
@@ -296,10 +311,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']:
+        return string
+
     symmetries = {"C1": [],
                   "C2": ["1", "2", "4"],
                   "C4": ["1", "4"],
@@ -13203,7 +13262,7 @@
     if not upload:
         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_sha512_20x20_Test')
     pseudo = False
     payoshakey = g.getstring("Please enter your key (visit "+get_server_address()+"/payosha256 in your browser).", "#anon") if upload else None
     if not upload:
@@ -13216,7 +13275,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', "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()
@@ -13343,6 +13402,7 @@
     g.new("Symmetry test")

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


Incremental diff against 0.54+0.31-ab2:

--- apgsearch-2017-8-07-v0.54+0.31i-ab2.py   2017-08-09 14:19:18.442366400 +0200
+++ apgsearch-2017-8-07-v0.54+0.31i-ab3.py   2017-08-09 14:46:17.988999200 +0200
@@ -51,7 +51,7 @@
import urllib2

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

'''#Stores whether the rule is outer-totalistic or not
@@ -174,6 +174,10 @@
         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])
@@ -200,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)
@@ -346,7 +356,7 @@

# Checks if symmetry is a valid one.
def check(string):
-    if string in ["AB_256x256_Test", "AB_sha512_16x32_Test"]:
+    if string in ['AB_256x256_Test', 'AB_sha512_16x32_Test', 'AB_sha512_20x20_Test']:
         return string

     symmetries = {"C1": [],
@@ -13252,7 +13262,7 @@
     if not upload:
         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?", "AB_sha512_16x32_Test")
+    symmstring = g.getstring("What symmetries to use?", 'AB_sha512_20x20_Test')
     pseudo = False
     payoshakey = g.getstring("Please enter your key (visit "+get_server_address()+"/payosha256 in your browser).", "#anon") if upload else None
     if not upload:
@@ -13265,7 +13275,7 @@
         orignumber = min(orignumber, 100000000)
     number = orignumber
     initpos = 0
-    if symmstring not in ["AB_256x256_Test", "AB_sha512_16x32_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"]:
+    if symmstring not in ["AB_256x256_Test", "AB_sha512_16x32_Test", 'AB_sha512_20x20_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()
@@ -13392,7 +13402,7 @@
     g.new("Symmetry test")

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

22<sqrt(512)<23, why not do 22*22 soups?
User avatar
wwei23
 
Posts: 935
Joined: May 22nd, 2017, 6:14 pm
Location: The (Life?) Universe

Re: Hacking apgsearch

Postby Apple Bottom » August 9th, 2017, 9:44 am

wwei23 wrote:22<sqrt(512)<23, why not do 22*22 soups?


As I wrote in the very post you quoted, "I think investigating 20x20 soups to produce results comparable with Nathaniel's earlier census would also be worthwhile".
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!
User avatar
Apple Bottom
 
Posts: 1025
Joined: July 27th, 2015, 2:06 pm

Re: Hacking apgsearch

Postby wwei23 » August 9th, 2017, 9:50 am

Apple Bottom wrote:
wwei23 wrote:22<sqrt(512)<23, why not do 22*22 soups?


As I wrote in the very post you quoted, "I think investigating 20x20 soups to produce results comparable with Nathaniel's earlier census would also be worthwhile".

22*22 would be a good investigation, though, am I right?
User avatar
wwei23
 
Posts: 935
Joined: May 22nd, 2017, 6:14 pm
Location: The (Life?) Universe

Re: Hacking apgsearch

Postby Apple Bottom » August 9th, 2017, 7:34 pm

And now for something completely different -- I tried implementing support for 4x64 soups in apgmera 3.28 earlier, and ran into some unexpected problems when the results almost, but not QUITE matched those produced by apgsearch 0.54+0.31i.

Chances are I've overlooked something -- OTOH I haven't touched anything other than the hashsoup function in apgmera. In particular, I've left the object detection/separation/classification logic alone, and as such there is a remote chance that the discrepancy is due to some subtle bug in apgsearch 0.54+0.31i instead.

Details are here; I'd appreciate any help, pointers and thoughts that will help us get to the bottom of this.
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!
User avatar
Apple Bottom
 
Posts: 1025
Joined: July 27th, 2015, 2:06 pm


Re: Hacking apgsearch

Postby Apple Bottom » August 10th, 2017, 1:09 pm

wwei23 wrote:https://catagolue.appspot.com/census/b3s23/AB_4x64_Test
I thought we already had a 4x64 method.


You probably didn't read it, but as I explained in my follow-up post in the apgsearch 3.1 thread:

  • apgsearch 1.1 and apgmera 3.28 do not produce the exact same census results for 4x64 soups; and
  • I therefore do not want to submit results to the main 4x64 census, at least until we figure out why there is a discrepancy and/or it is decided that the discrepancies (which also affect 8x32, BTW) do not matter. Furthermore,
  • the name "AB_4x64_Test" should give you a clue as to what this pseudo-symmetry is for: testing.
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!
User avatar
Apple Bottom
 
Posts: 1025
Joined: July 27th, 2015, 2:06 pm

Re: Hacking apgsearch

Postby muzik » August 11th, 2017, 8:25 am

Will 256x256 soups ever be supported, especially for rules like B3/S which die out extremely rapidly?
Bored of using the Moore neighbourhood for everything? Introducing the Range-2 von Neumann isotropic non-totalistic rulespace!
muzik
 
Posts: 3310
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

Re: Hacking apgsearch

Postby wwei23 » August 12th, 2017, 1:50 pm

The 1x256X2+1 census is accumulating objects at a prodigious rate. Does anyone think that they can set up a system to alert me when a new object is found(By new, I mean first appearance in 1x256X2+1.)?
EDIT:
I've passed 6 BILLION objects! Does anyone want to help me collect more?
User avatar
wwei23
 
Posts: 935
Joined: May 22nd, 2017, 6:14 pm
Location: The (Life?) Universe

Re: Hacking apgsearch

Postby Apple Bottom » August 15th, 2017, 7:19 am

Some kind of bug appears to be left in 0.54+0.31i; soup-searching B2e3ai4a5j6n/S2-n3ijr4it finds, among other things, an empty object, supposedly a period-1001 oscillator: xp1001_0.
Last edited by Apple Bottom on August 17th, 2017, 4:49 pm, edited 2 times in total.
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!
User avatar
Apple Bottom
 
Posts: 1025
Joined: July 27th, 2015, 2:06 pm

Re: Hacking apgsearch

Postby muzik » August 15th, 2017, 11:40 am

Currently searching a rule in hopes of the first catalogued photons. Seems to be working, despite saying 0 soups a second.
Bored of using the Moore neighbourhood for everything? Introducing the Range-2 von Neumann isotropic non-totalistic rulespace!
muzik
 
Posts: 3310
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

Re: Hacking apgsearch

Postby drc » August 15th, 2017, 11:43 am

muzik wrote:Currently searching a rule in hopes of the first catalogued photons. Seems to be working, despite saying 0 soups a second.

Make sure to actively check the search window for quadratics and dirty siderakes.

That was the only thing stopping me from doing that weeks ago
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
User avatar
drc
 
Posts: 1664
Joined: December 3rd, 2015, 4:11 pm
Location: creating useless things in OCA

Re: Hacking apgsearch

Postby muzik » August 15th, 2017, 11:45 am

drc wrote:
muzik wrote:Currently searching a rule in hopes of the first catalogued photons. Seems to be working, despite saying 0 soups a second.

Make sure to actively check the search window for quadratics and dirty siderakes.

That was the only thing stopping me from doing that weeks ago

I doubt this rule has any. A lot of related rules did, but this one seems safe.

I'm going out for dinner right now anyway, here's hoping a revolutionary haul gets uploaded and my house doesn't burn down because my computer is making mildly concerning noises.
Bored of using the Moore neighbourhood for everything? Introducing the Range-2 von Neumann isotropic non-totalistic rulespace!
muzik
 
Posts: 3310
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

Re: Hacking apgsearch

Postby wwei23 » August 15th, 2017, 11:53 am

I'm past 7000000000 objects!
User avatar
wwei23
 
Posts: 935
Joined: May 22nd, 2017, 6:14 pm
Location: The (Life?) Universe

Re: Hacking apgsearch

Postby muzik » August 15th, 2017, 1:56 pm

Back, and it seems the soups completed counter has reset to a few thousands implying the haul was done and submitted, but nothing new seems to be popping up on Catagolue.
Bored of using the Moore neighbourhood for everything? Introducing the Range-2 von Neumann isotropic non-totalistic rulespace!
muzik
 
Posts: 3310
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

Re: Hacking apgsearch

Postby A for awesome » August 15th, 2017, 3:55 pm

muzik wrote:Back, and it seems the soups completed counter has reset to a few thousands implying the haul was done and submitted, but nothing new seems to be popping up on Catagolue.

It seems to have worked! Next time, try D2_x — I suspect, but couldn't say for sure, whether it's faster.
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
User avatar
A for awesome
 
Posts: 1818
Joined: September 13th, 2014, 5:36 pm
Location: 0x-1

Re: Hacking apgsearch

Postby muzik » August 15th, 2017, 4:07 pm

A for awesome wrote:
muzik wrote:Back, and it seems the soups completed counter has reset to a few thousands implying the haul was done and submitted, but nothing new seems to be popping up on Catagolue.

It seems to have worked! Next time, try D2_x — I suspect, but couldn't say for sure, whether it's faster.

Wait, you can see the haul?
Bored of using the Moore neighbourhood for everything? Introducing the Range-2 von Neumann isotropic non-totalistic rulespace!
muzik
 
Posts: 3310
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

Re: Hacking apgsearch

Postby A for awesome » August 15th, 2017, 4:07 pm

muzik wrote:Wait, you can see the haul?

https://catagolue.appspot.com/census/b2a3r4is/C1
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
User avatar
A for awesome
 
Posts: 1818
Joined: September 13th, 2014, 5:36 pm
Location: 0x-1

PreviousNext

Return to Scripts

Who is online

Users browsing this forum: No registered users and 1 guest