"""The omega curve. Prints all of it, which is the point. omega sets the CPPN's bandwidth. `unseen.md` found a 17x swing between two hand-picked values and every chess number sits at one of them, unexamined. This decides which of two things that is: a knob that was set wrong (broad plateau -> document it, choose per domain, leave AffectiveCPPN alone) or an architectural defect (narrow, domain-dependent optimum -> a learned or multi-scale frequency is a mechanism question worth asking). THE TRAP, stated so it cannot be walked into: this reports the whole curve. Picking the omega that beats table+interp and quoting that number would be tuning a mechanism until it wins, which is the move AGENTS.md exists to forbid. """ import glob, json, re, statistics as st REF = {"random": 0.00016, "band": 0.00006} # table+interp, from unseen.md def load(path): return [r for r in json.load(open(path))["rows"] if r["arm"] == "rp"] for kind in ("random", "band"): files = sorted(glob.glob(f"results/sweep_{kind}_w*.json"), key=lambda f: float(re.search(r"_w([\d.]+)\.json", f).group(1))) if not files: print(f"{kind}: nothing yet") continue print(f"\n{'=' * 78}\n{kind.upper()} hold-out — omega curve, 8 seeds" f" (table+interp reference: {REF[kind]:.5f})\n{'=' * 78}") print(f"{'omega':>6} {'seen':>10} {'unseen':>10} {'u/s':>6} {'vs ref':>8} " f"{'seeds10} per-seed unseen") for f in files: w = float(re.search(r"_w([\d.]+)\.json", f).group(1)) rs = load(f) seen, uns = st.mean([r["seen"] for r in rs]), st.mean([r["unseen"] for r in rs]) beat = sum(1 for r in rs if r["unseen"] < REF[kind]) per = " ".join(f"{r['unseen']:.5f}" for r in sorted(rs, key=lambda r: r["seed"])) print(f"{w:>6g} {seen:10.5f} {uns:10.5f} {uns / seen:6.2f} " f"{uns / REF[kind]:8.2f}x {beat:>7}/8 {per}")