Moosey wrote: ↑December 1st, 2019, 8:32 pm
Gonna cross-post the call for a search program:
Moosey wrote: ↑December 1st, 2019, 8:19 pm
There has been some discussion of the rule B2-ae3aej4ez/S03ac4aikqryz78 on the discord. Can anybody make a search script that searches through objects like these ("exploded polyominoes") and reports spaceships found?
<snip>
Here's a fuzey exploded soup generator - intended to be used as a stdin soup generator for apgsearch. It generates (exploded) soups of a size width * height, with one active pattern located centrally near the left side. There are 2^(width * height - 1) unique soups and the script will randomly sample this search space. For small sizes (width * height < 20, or width * height < 25 for long searches) it might be preferable to enumerate the soups instead of randomly sampling them. This can be done by modifying the script to generate the soup using "n" as the seed in place of "s". I leave it to interested parties to continue the search and running the search with the appropriate parameters for Nsoups, width, height.
Instructions in the code. The parameters for Nsoups will submit 4 hauls with 25000 soups each. I chose 25000 [Edit: was 30000] for the example haul size, but this is somewhat arbitrary. It's a matter of balancing haul submission rate (so not too small else Catagolue unhappy) with the 1 sample soup per object per haul limitation of stdin symmetries (so not too large else too many sample soups lost)
Code: Select all
#fuzey_soups.py
"""
Exploded soups generator for INT rule "Fuzey"
Usage: python fuzey_soups.py [sym] [slop] [<Nsoups> [<width> <height>]]
If the "sym" argument s specified then bilaterally symmetric soups are generated
If the "slop" argument is specified then some dots will be offset by 1 cell
Default Nsoups: 10000, default width: 4, default height: 5
On cells (dots) are located on a grid of step 5, and with slop there is a
20% chance of dots being displaced by 1 cell.
Active pattern "o2$o" placed at randomly chosen grid location:
([0, 5], [0, 5 *(height - 1)])
Example usage with apgluxe:
$ cd apgmera
$ ./recompile.sh --rule b2-ae3aej4ezs03ac4aikqryz78 --symmetry stdin_fuzey
$ mv apgluxe apgluxe-stdin_fuzey
$ python fuzey_soups.py sym 100000 6 4 | ./apgluxe-stdin_fuzey -t 0 -L 0 -n 25000 -k <key>
This will generate 100000 symmetric exploded soups of length 6 and
half-width 4, which will be submitted to Catagolue in 4 hauls of 250000 soups
"""
from __future__ import print_function
import sys
import lifelib
import itertools
import random
PY3 = sys.version_info[0] > 2
if PY3:
xrange = range
symm = False
slop = False
Nsoups = 10000
width = 4
height = 5
i = 1
while i < len(sys.argv):
if sys.argv[i] == "sym":
symm = True
elif sys.argv[i] == "slop":
slop = True
elif sys.argv[i].isdigit():
Nsoups = int(sys.argv[i])
if len(sys.argv) > i + 1:
width = int(sys.argv[i + 1])
height = int(sys.argv[i + 2])
i += 2
else:
sys.exit('Invalid argument')
i += 1
lt = lifelib.load_rules("B2-ae3aej4ez/S03ac4aikqryz78").lifetree(memory=1000)
activePat = lt.pattern("obo")(-1, 0)
blankPat = lt.pattern("b")
xx = range(0, 5 * width, 5)
yy = range(0, 5 * height, 5)
xxyy = list(itertools.product(xx, yy))
for n in xrange(Nsoups):
soup = lt.pattern("")
# Place the active pattern
s = random.randint(0, 2*height -1)
xa, ya = 5 * (s // height), 5 * (s % height)
soup += activePat(xa, ya)
# Generate the exploded soup
s = random.randrange(2**len(xxyy))
for b, xy in enumerate(xxyy):
if xy == (xa, ya):
continue
if 1 & (s >> b):
# Set the cell at this position, but allow some slop in positioning
dx, dy = 0, 0
if slop:
ss = random.random()
if ss < 0.05: dx = -1
elif ss < 0.1: dx = 1
elif ss < 0.15 and xy[1] > 0: dy = -1
elif ss < 0.2 and xy[1] > 0: dy = 1
soup[xy[0] + dx, xy[1] + dy] = 1
if symm:
soup += soup('flip_y')
print(soup.rle_string())
Results appear here:
https://catagolue.appspot.com/census/b2 ... tdin_fuzey
I ran one haul with about 20000 soups. No new spaceship periods have shown up so far but there are several new (?) oscillator periods including a p70, p294, and a (boring) p532
Edit: script is now Python2/Python3 compatible
Edit 2: updated instructions
Edit 3: updated script again - added two arguments: "sym" to generate symmetric soups and "slop" to generate soups with some dots offset by 1 cell
Still no new spaceship periods appeared, but several new oscillator periods in the census.