lorapop / code /work /make_smoke_cross.py
bryan7264's picture
Add files using upload-large-folder tool
36357ab verified
Raw History Blame Contribute Delete
628 Bytes
# MIT License, Bryan Cheng, 2026. Smoke design for cross.py run: 8 offspring of the layer design, parents reduced to 4
# (indices taken mod 4) so the CPU smoke fits in the 8 GB agent allocation.
import json, os, shutil
D = json.load(open("results/crosses/q05_layer/design.json"))
k = 4
D["parents"] = D["parents"][:k]
D["assign"] = [[x % k for x in row] for row in D["assign"][:8]]
if os.path.isdir("work/smoke_cross/offspring"):
shutil.rmtree("work/smoke_cross/offspring")
json.dump(D, open("work/smoke_cross/design.json", "w"))
print("parents", D["parents"], "segments", len(D["segments"]), "offspring", len(D["assign"]))