PREREG_flat_twice outcome: stage 1 passed (twice-in-a-row fires on 27.8% of model steps on the flat families, 8.7% on APS, 4.3% on fun1; flat/APS ratio 3.20 against the single flag's 2.47), stage 2 FAILED: under the projection APS 2806 -> 2803 (W2 holds, the per-problem edge over Chandrupatla kept at 83/28/42) but CHA 3220 -> 3341 and the flat families 1823 -> 1975 (W1, W4 fail); with G2 the same. Under safe/step the twice gate is inert (3390 -> 3388) where the single one gave 3037.

Mechanism: the flat cycle is undershoot, undershoot, crossing, near-empty step. The single flag fires after the first undershoot and replaces the second - a useless step; the twice flag fires after the second and replaces the CROSSING, the one step of the cycle that collapses the bracket. The second undershoot's r is ~0.26, next to the 1/4 threshold, so the pair often does not even form. Again a detectability gain that did not carry to run cost. Next candidate (not pre-registered): the unkept promise AND a creep - the same step moving the same way as the previous one.

Removed a vacuous pin I had written (s2 <= max(s1, s2)). Regression on the branch: 935 pass twice; the only red test is the paper-number check.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
vvs
2026-09-21 13:45:20 +01:00
co-authored by Claude Opus 5
parent 6a8bb2315f
commit 9884b21204
7 changed files with 156 additions and 16 deletions
+8 -7
View File
@@ -9,8 +9,8 @@ import json
from analyze_extrap import FAMILY, FLAT, fam_sum, h2h, load, sign_p
def main():
rows = load("sweep_flat.json")
def main(path="sweep_flat.json", gate="flat"):
rows = load(path)
cha = {r["label"]: r for r in load("sweep_full.json")}["chandrupatla"]
cell = {}
for r in rows:
@@ -19,7 +19,7 @@ def main():
print("tent, 3-point, pairs (no gate -> flat gate) APS CHA both flat fun3-6")
for gu in ("none", "step", "bracket", "both", "project", "safe", "credit"):
for ext in ("none", "pattern"):
a, b = cell[("ratio", gu, ext, "none")], cell[("ratio", gu, ext, "flat")]
a, b = cell[("ratio", gu, ext, "none")], cell[("ratio", gu, ext, gate)]
print(f" {gu:<8} {'+G2' if ext == 'pattern' else ' '} "
f"{a['APS']['total']:5d}->{b['APS']['total']:<5d} {a['CHA']['total']:5d}->"
f"{b['CHA']['total']:<5d} {a['APS']['total'] + a['CHA']['total']:5d}->"
@@ -28,8 +28,8 @@ def main():
f"over {b['APS']['over'] + b['CHA']['over']}")
print("\nVERDICTS")
for ext, name in (("none", "proposed rule"), ("pattern", "proposed rule + G2")):
a, b = cell[("ratio", "project", ext, "none")], cell[("ratio", "project", ext, "flat")]
fam = [r for k, r in cell.items() if k[3] == "flat" and k[1] in FAMILY]
a, b = cell[("ratio", "project", ext, "none")], cell[("ratio", "project", ext, gate)]
fam = [r for k, r in cell.items() if k[3] == gate and k[1] in FAMILY]
viol = sum(r["APS"]["over"] + r["CHA"]["over"] for r in fam)
low = sum(1 for r in fam if r["APS"]["solved"] + r["CHA"]["solved"] < 193)
z1 = b["CHA"]["total"] < a["CHA"]["total"]
@@ -44,10 +44,11 @@ def main():
f"p={sign_p(w, l):.2g}" + (" ACCEPTED" if z1 and z2 and z3 else " not accepted"))
print("\nnine functions, projection, no gate -> flat gate, both sets:")
for sim in sorted({k[0] for k in cell}):
a, b = cell[(sim, "project", "none", "none")], cell[(sim, "project", "none", "flat")]
a, b = cell[(sim, "project", "none", "none")], cell[(sim, "project", "none", gate)]
print(f" {sim:<11} {a['APS']['total'] + a['CHA']['total']:6d} -> "
f"{b['APS']['total'] + b['CHA']['total']:6d}")
if __name__ == "__main__":
main()
import sys
main(*sys.argv[1:3]) if len(sys.argv) > 2 else main()