Files
sim-numerics/measure_records_vs_multiplier.py
T
vvsandClaude Opus 5 8830765454 §3.1 and Tables 2-3 of the canonical .md brought to current data (Valeri's request). §3.1 said the projection's doubling 'is not a tuning constant' and that zero slack 'behaves as bisection'; both are refuted by measurement (stage12 part 3, rerun as measure_budget_factor.py): the canonical total is 2806 for every multiplier >= 1.25, but the wide-bracket total moves monotonically, 2752 at 1.25 to 4006 at 4, and multiplier 1 costs 4817/2997, nowhere near bisection's 7530/3090. So the proposed safeguard is the EARNED projection (credit, C0 = 1 bit: bisection + 1 step, the cheapest endowment within that promise, 8395 -> 7658 -> 6588), as code and verifier had already fixed but no text said; the scheduled projection stays as the one-constant end of the trade. The text says openly that this choice was made after a question, and that it was not made for the numbers - on the canonical set it costs 762 more.
Tables 2-3 regenerated from sweep_full.json by tables_for_md.py with the verifier's own ranking: Chandrupatla's method, missing from both, is FIRST on the canonical set (2785) and second on the wide-bracket set (2423); the proposed rule is 29th (3568) and 10th (3020); Brent 2889/4099 (was 2890/4101). The abstract, §5 text, §5.1, §5.2 (timed configuration named), §7 (records 2527/2523 are under the scheduled projection: 2523 flat for every multiplier 1.25-4, 2527 becomes 2541 at 1.25; under credit the readings give far less, best constant-free total 6494 by 'defect'), §8.4, §8.11 and the conclusion now say so: parity with the tuned methods at the price of one constant, or a constant-free rule with a tighter guarantee that trails on the canonical set. verify_article.py: 279 checks, measured tables recomputed from fresh runs; 762 tests pass twice.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-21 08:03:21 +01:00

47 lines
1.8 KiB
Python

"""Do the section-7 records depend on the projection's multiplier?
The plain projection's canonical total is 2806 for every multiplier from 1.25 to 4
(measure_budget_factor.py). The records 2527 (shape reading, safe) and 2523 (defect
reading, projection) are quoted with the scheduled projection; whether THEY are flat in
the multiplier has to be measured, not inferred from the plain rule.
python -u measure_records_vs_multiplier.py
"""
from __future__ import annotations
from simroot.pure import pure_root
from stage12_validation import load, per_problem, totals
FACTORS = (1.25, 1.5, 2.0, 3.0, 4.0)
RECORDS = {
"shape reading (2527)": dict(similarity="ratio", scale="derived3", guard="safe",
prestep="slope", points="shape"),
"defect reading (2523)": dict(similarity="ratio", scale="derived3", guard="project",
prestep="defect"),
"far end by dissimilarity (5511)": dict(similarity="ratio", scale="derived3",
guard="project", prestep="slope",
direction="dissimilar"),
}
def main():
probs = load()
out = {}
print(f"{'configuration':<34} " + " ".join(f"{f:>13.2f}" for f in FACTORS))
for name, cfg in RECORDS.items():
cells = []
out[name] = {}
for fac in FACTORS:
p = per_problem(lambda f, a, b, xt, mx, _c=cfg, _f=fac: pure_root(
f, a, b, xt, mx, budget_factor=_f, **_c), probs, 200)
t, _ok = totals(p, probs)
out[name][fac] = (t["APS"], t["CHA"])
cells.append(f"{t['APS']:>6d}/{t['CHA']:<6d}")
print(f"{name:<34} " + " ".join(cells))
print("\ncells are APS/CHA totals")
return out
if __name__ == "__main__":
main()