Warning: any large haul in B3ai4cet5c6c7c/S2a3-kqr4eqt5i6cei78 is likely to flood the xp section of the Catagolue census.
Here is a Python function that does the first step of combined haul uploading:
For a script that can merge and upload hauls, any programming language will work for me, but if someone did make such a script, I'd prefer Python. Thanks!
Code: Select all
import itertools, os, random
RULE = "b3ai4cet5c6c7cs2a3-kqr4eqt5i6cei78"
NUM_SOUPS = 1000
STDIN_SYMMETRY_NAME = "block_corral_16x16_50x50_C1_stdin"
PAYOSHA256_KEY = "#anon"
RECOMPILE_APGSEARCH = False
def block_corral_soup(rule: str) -> str:
header = f"x = 50, y = 50, rule = {rule}"
alive_cells = [(0, 0), (0, 1), (1, 0), (1, 1), (0, 48), (0, 49), (1, 48), (1, 49), (6, 0), (6, 1), (7, 0), (7, 1), (6, 48), (6, 49), (7, 48), (7, 49), (12, 0), (12, 1), (13, 0), (13, 1), (12, 48), (12, 49), (13, 48), (13, 49), (18, 0), (18, 1), (19, 0), (19, 1), (18, 48), (18, 49), (19, 48), (19, 49), (24, 0), (24, 1), (25, 0), (25, 1), (24, 48), (24, 49), (25, 48), (25, 49), (30, 0), (30, 1), (31, 0), (31, 1), (30, 48), (30, 49), (31, 48), (31, 49), (36, 0), (36, 1), (37, 0), (37, 1), (36, 48), (36, 49), (37, 48), (37, 49), (42, 0), (42, 1), (43, 0), (43, 1), (42, 48), (42, 49), (43, 48), (43, 49), (48, 0), (48, 1), (49, 0), (49, 1), (48, 48), (48, 49), (49, 48), (49, 49), (0, 6), (1, 6), (0, 7), (1, 7), (48, 6), (49, 6), (48, 7), (49, 7), (0, 12), (1, 12), (0, 13), (1, 13), (48, 12), (49, 12), (48, 13), (49, 13), (0, 18), (1, 18), (0, 19), (1, 19), (48, 18), (49, 18), (48, 19), (49, 19), (0, 24), (1, 24), (0, 25), (1, 25), (48, 24), (49, 24), (48, 25), (49, 25), (0, 30), (1, 30), (0, 31), (1, 31), (48, 30), (49, 30), (48, 31), (49, 31), (0, 36), (1, 36), (0, 37), (1, 37), (48, 36), (49, 36), (48, 37), (49, 37), (0, 42), (1, 42), (0, 43), (1, 43), (48, 42), (49, 42), (48, 43), (49, 43)]
for x, y in itertools.product(range(17, 33), range(17, 33)):
if random.random() < 0.5:
alive_cells.append((x, y))
encoding_string = ["b" * 50 + "$"] * 50
for cell in alive_cells:
unedited_row = encoding_string[cell[1]]
encoding_string[cell[1]] = unedited_row[:cell[0]] + "o" + unedited_row[cell[0] + 1:]
encoding_string = "".join(encoding_string)
while "b$" in encoding_string:
encoding_string = encoding_string.replace("b$", "$")
run_length_encoding = ""
current_character = encoding_string[:1]
run_length = 0
for character in encoding_string:
if character != current_character:
run_length_encoding += (str(run_length) if run_length > 1 else "") + current_character
current_character = character
run_length = 0
run_length += 1
run_length_encoding += "!"
return header + "\n" + run_length_encoding
print("Generating soups...")
SOUPS = [block_corral_soup(RULE) for i in range(NUM_SOUPS)]
SOUP_FILENAME = f"block_corral{random.randint(1, 2**20)}.txt"
with open(SOUP_FILENAME, mode="w", encoding="utf-8") as file:
file.write("\n".join(SOUPS))
print(f"Successfully generated {NUM_SOUPS} soups")
if RECOMPILE_APGSEARCH:
os.system(f"arch -x86_64 ./recompile.sh --rule {RULE} --symmetry {STDIN_SYMMETRY_NAME}")
os.system(f"./apgluxe -n {NUM_SOUPS} --rule {RULE} --symmetry {STDIN_SYMMETRY_NAME} -k {PAYOSHA256_KEY} -i 1 < {SOUP_FILENAME}")
os.remove(SOUP_FILENAME)
The stdin script generates soups that are a 16x16 soup and blocks that block the soup from exploding, with a total bounding box of 50x50. The blocks are spaced 4 cells apart, though blocks spaced 3 cells apart may result in more oscillators. (Blocks spaced 1 cell apart are likely going to cause slowdowns with object separation.)