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:
Code: Select all
--- 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:
Code: Select all
--- 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:
Code: Select all
--- 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:
Code: Select all
--- 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"],