A in the method (extrapolate='steps', default 'none' = published bit for bit): NOT accepted into the proposed rule by the declared stop rule - X2 fails. Proposed rule without -> with A: APS 2806 -> 2967 (X2 FAIL), CHA 3220 -> 2925 (X1 pass), flat fun3-6 1823 -> 1524 (X4 pass), guarantee intact, 0 violations in 39 family cells (X3 pass). The per-problem edge over Chandrupatla on APS is lost (87/24/42, p=9e-5 -> 42/62/49, p=0.53).

X5: dissimilar+slope with A reaches 2859+2545 = 5404 over both sets, the best total this line has measured (was 5511; Chandrupatla 5228) - but again by trading the canonical set (2726 -> 2859) for the wide brackets (2785 -> 2545). The one-step replay (APS no harm) did not carry over: its bracket-halving metric rewards overshooting the root, which on a simple root costs superlinear convergence in the full run - the declared one-step limitation, now measured. Among the nine functions A helps only the tent (6026 -> 5892) and slightly ratio_soft.

Also: pin 'strictly fewer evaluations on every flat problem' was wrong for 6(x-2)^5 on [0,10] - both runs are budget-bound (90 of the guaranteed 91); corrected to the measured claim. verify_article 286/286, 836 tests pass twice.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
vvs
2026-09-21 12:11:06 +01:00
co-authored by Claude Opus 5
parent a25cffad1d
commit 99be33a632
6 changed files with 293 additions and 9 deletions
+49 -8
View File
@@ -85,10 +85,10 @@ def itp_oracle(f, a, b, xtol, maxfev):
return best if best is not None else (0.5 * (a + b), maxfev, False)
# Competitors are taken at the better of SciPy's implementation and ours,
# problem by problem, wherever SciPy ships the method. Ours turned out to be
# the cheaper of the two - 6991 against brentq's 7004, 5209 against
# _chandrupatla's 5228 - so quoting the library alone would have flattered us.
# Competitors are the LIBRARY wherever SciPy ships the method (since 2026-09-21):
# Brent = brentq, Chandrupatla = elementwise.find_root. Until then they were the
# per-problem better of the library and ours, which let a tolerance slip in our
# Chandrupatla (a bracket twice as wide) leak into the reported numbers.
BASELINES = {
"bisection": bisection, "regula_falsi": regula_falsi,
"illinois": illinois, "pegasus": pegasus,
@@ -115,11 +115,13 @@ def make_method(spec):
points = spec[6] if len(spec) > 6 else "recent"
direction = spec[7] if len(spec) > 7 else "distance"
exponent = spec[8] if len(spec) > 8 else "none"
extrapolate = spec[9] if len(spec) > 9 else "none"
def m(f, a, b, xtol, maxfev):
return pure_root(f, a, b, xtol, maxfev, similarity=sim,
scale=scale, guard=guard, space=space, prestep=prestep,
points=points, direction=direction, exponent=exponent)
points=points, direction=direction, exponent=exponent,
extrapolate=extrapolate)
return m
@@ -133,6 +135,9 @@ def label(spec):
tag = f"{tag}+shape"
if len(spec) > 7 and spec[7] != "distance":
tag = f"{tag}+dissim"
if len(spec) > 9 and spec[9] != "none":
# the pair (off, on) must be distinguishable in a results file
tag = f"{tag}+ext"
if len(spec) > 8 and spec[8] != "none":
# the exponent must be visible in the label: (far, none) is false position and
# (far, order) is the hypothesis, and a results file that cannot tell them apart
@@ -205,6 +210,39 @@ def build_grid_log(smoke):
for sim in sims for sc in ("derived", "derived3") for gu in guards]
def _preflight_extrap_mode():
"""Fail LOUDLY if extrapolate is not deployed (see _preflight_log_mode)."""
x, _n, ok = pure_root(lambda t: t - 1.0, 0.0, 3.0, 1e-10, 100, similarity="ratio",
scale="derived3", guard="project", extrapolate="steps")
if not (ok and abs(x - 1.0) < 1e-8):
raise SystemExit("extrapolate preflight FAILED: refusing to report zeros")
def build_grid_extrap(smoke):
"""PREREG 2026-09-21: step extrapolation (A) inside the method, every cell as a pair
(none, steps). Tent with every reading and every guard; all nine functions without
readings, so the law across the grid is visible with and without A."""
_preflight_extrap_mode()
guards = ("project", "credit") if smoke else GUARD_MODES
readings = [("none", "recent", "distance")] if smoke else [
("none", "recent", "distance"), ("slope", "recent", "distance"),
("slope", "shape", "distance"), ("slope", "recent", "dissimilar"),
("defect", "recent", "distance")]
specs = []
for gu in guards:
for pre, pts, dirn in readings:
for ex in ("none", "steps"):
specs.append(("pure", "ratio", "derived3", gu, "x", pre, pts, dirn,
"none", ex))
sims = ["sqrt"] if smoke else [s for s in sorted(PURE_SIMS) if s != "ratio"]
for sim in sims:
for gu in guards:
for ex in ("none", "steps"):
specs.append(("pure", sim, "derived3", gu, "x", "none", "recent",
"distance", "none", ex))
return specs
def _preflight_decision_mode():
"""Fail LOUDLY if the decision readings are not deployed (see _preflight_log_mode)."""
for md in ("band", "defect", "simpair"):
@@ -335,10 +373,12 @@ def main():
capmode = "--cap" in sys.argv # scale selected between the two computed ones
ordermode = "--order" in sys.argv # slot 1: the similarity read BY PLACE
decmode = "--decision" in sys.argv # slot 2: the reading in the DECISION place
extmode = "--extrap" in sys.argv # A in the method: step extrapolation
combomode = "--combo" in sys.argv # modes A and B together
pointsmode = "--points" in sys.argv # mode A: triple by shape
dirmode = "--direction" in sys.argv # mode B: far end by dissimilarity
specs = (build_grid_decision(smoke) if decmode else
specs = (build_grid_extrap(smoke) if extmode else
build_grid_decision(smoke) if decmode else
build_grid_order(smoke) if ordermode else
build_grid_cap(smoke) if capmode else
build_grid_combo(smoke) if combomode else
@@ -362,8 +402,9 @@ def main():
# the published sweep_full.json is what verify_article.py checks the paper
# against, so the log grid never writes into it
if decmode or ordermode or capmode or combomode or pointsmode or dirmode:
base = ("sweep_decision" if decmode else
if extmode or decmode or ordermode or capmode or combomode or pointsmode or dirmode:
base = ("sweep_extrap" if extmode else
"sweep_decision" if decmode else
"sweep_order" if ordermode else
"sweep_cap" if capmode else
"sweep_combo" if combomode else