PREREG_defect_contra_flat outcome (smoke, all 199 problems). Goal (below Chandrupatla on both) NOT reached by any cell: best CHA 2537 vs 2441. Best total: defect+flatanalogmem APS 2530 / CHA 2561 = 5091 < Chandrupatla 5228 (first time), C1-C3 hold; ablation: defect earns APS +284 (costs CHA 9), remembered analogy earns CHA +649 (costs APS 7). contra earned without defect (APS 2806 -> 2785, CHA 3220 -> 3198; with the remembered analogy 2792 / 2537, the best CHA), redundant with defect (defect+contra = defect). fun9: 105 -> 81 (Chandrupatla 55). Remaining CHA gap 120: flat +88, fun1 +20, fun9 +26. Server regression x2: 1116 passed, 1 failed = the paper-number check.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+38
-9
@@ -744,11 +744,25 @@ def pure_root(f, a, b, xtol, maxfev, similarity="ratio", scale="derived",
|
||||
"{'derived3', 'derived3_cap', 'bracket', 'far'}")
|
||||
if space not in SPACES:
|
||||
raise ValueError(f"unknown space {space!r}")
|
||||
if prestep not in ("none", "progress", "slope", "band", "defect", "simpair", "flat",
|
||||
"flat2", "flatcreep", "flatstick", "flatstickmid", "flatstickexit",
|
||||
"flatjudge", "flatanalog", "flatanalogmem"):
|
||||
# PREREG_defect_contra_flat 2026-09-21: a composite prestep "a+b+c" takes at most one
|
||||
# component per category - decision {defect}, contradiction {contra}, flat regime
|
||||
# {flatanalog, flatanalogmem}. A single prestep keeps its old meaning exactly: the
|
||||
# category variables below then carry the same string the old tests compared.
|
||||
if "+" in prestep:
|
||||
parts = prestep.split("+")
|
||||
cats = ({"defect"}, {"contra"}, {"flatanalog", "flatanalogmem"})
|
||||
if (len(parts) != len(set(parts)) or any(not any(p in c for c in cats) for p in parts)
|
||||
or any(sum(p in c for p in parts) > 1 for c in cats)):
|
||||
raise ValueError(f"unknown composite prestep {prestep!r}")
|
||||
elif prestep not in ("none", "progress", "slope", "band", "defect", "simpair", "flat",
|
||||
"flat2", "flatcreep", "flatstick", "flatstickmid", "flatstickexit",
|
||||
"flatjudge", "flatanalog", "flatanalogmem", "contra"):
|
||||
raise ValueError(f"unknown prestep {prestep!r}")
|
||||
if prestep in ("band", "defect", "simpair") and scale not in (
|
||||
parts = prestep.split("+")
|
||||
pre_dec = next((p for p in parts if p in ("band", "defect", "simpair")), "none")
|
||||
pre_flat = next((p for p in parts if p in ("flatanalog", "flatanalogmem")), "none")
|
||||
pre_contra = "contra" in parts
|
||||
if pre_dec != "none" and scale not in (
|
||||
"derived3", "derived3_cap", "derived3_m", "bracket", "far"):
|
||||
# the decision reads a TRIPLE; under the two-point scale there is no third point
|
||||
# to read a configuration from, and reading one from elsewhere would hide that
|
||||
@@ -964,13 +978,13 @@ def pure_root(f, a, b, xtol, maxfev, similarity="ratio", scale="derived",
|
||||
if exponent == "order" else None)
|
||||
z_now = _read_z(abs(fx), sc, exponent, m_loc)
|
||||
step = None
|
||||
if prestep in ("band", "defect", "simpair"):
|
||||
if pre_dec != "none":
|
||||
# THE DECISION PLACE (PREREG 2026-09-21, slot 2). Same slot as the
|
||||
# slope gate, a different reading of it: the question is not whether
|
||||
# the slope has settled but whether the CONFIGURATION deserves the
|
||||
# model. The triple is the recency triple, so only the reading
|
||||
# changes against the slope-gate cells.
|
||||
if _decide_refuse(prestep, S, z_now, x, fx, x_prev, f_prev,
|
||||
if _decide_refuse(pre_dec, S, z_now, x, fx, x_prev, f_prev,
|
||||
x_prev2, f_prev2):
|
||||
step = 0.5 * (A + B) - x
|
||||
pre_refused += 1
|
||||
@@ -1019,7 +1033,9 @@ def pure_root(f, a, b, xtol, maxfev, similarity="ratio", scale="derived",
|
||||
else:
|
||||
step = 0.5 * (A + B) - x
|
||||
pre_refused += 1
|
||||
if step is None and prestep in ("flatanalog", "flatanalogmem"):
|
||||
if pre_flat != "none":
|
||||
# PREREG_defect_contra_flat: no "step is None" here - the memory must
|
||||
# see every state even when the decision place already halves it.
|
||||
# PREREG_flat_analogy 2026-09-21. A pure power is similar to itself
|
||||
# under zoom: its configuration RECURS, while a simple root's tends
|
||||
# to the line. Enter on the unkept promise only when the current
|
||||
@@ -1033,7 +1049,7 @@ def pure_root(f, a, b, xtol, maxfev, similarity="ratio", scale="derived",
|
||||
cur = _config3(x, fx, x_prev, f_prev, x_prev2, f_prev2)
|
||||
flag = (sticky_m is None and last_model and f_prev != 0.0
|
||||
and fx / f_prev >= 0.25)
|
||||
if prestep == "flatanalogmem":
|
||||
if pre_flat == "flatanalogmem":
|
||||
if _analogous_and_steep(cur, configs):
|
||||
analogy_seen = True
|
||||
enter = flag and analogy_seen
|
||||
@@ -1046,6 +1062,19 @@ def pure_root(f, a, b, xtol, maxfev, similarity="ratio", scale="derived",
|
||||
if cur is not None:
|
||||
configs.append(cur)
|
||||
if sticky_m is not None:
|
||||
if step is None:
|
||||
pre_refused += 1
|
||||
step = 0.5 * (A + B) - x
|
||||
if step is None and pre_contra and x != x_prev:
|
||||
# PREREG_defect_contra_flat 2026-09-21 (contra). The bracket says
|
||||
# which way f must go between its ends; the last two points say which
|
||||
# way it goes here. Opposite signs: the local picture contradicts
|
||||
# the bracket (fun9: a near-cancelling end reads the root as close,
|
||||
# and 17 model steps in a row double |f|), so the model is not
|
||||
# trusted and this evaluation halves. Two signs compared.
|
||||
loc = (fx - f_prev) / (x - x_prev)
|
||||
brk = (FB - FA) / (B - A)
|
||||
if loc != 0.0 and (loc > 0.0) != (brk > 0.0):
|
||||
step = 0.5 * (A + B) - x
|
||||
pre_refused += 1
|
||||
if step is None and prestep == "flatjudge":
|
||||
@@ -1168,7 +1197,7 @@ def pure_root(f, a, b, xtol, maxfev, similarity="ratio", scale="derived",
|
||||
w_before = abs(B - A)
|
||||
mid_now, lin_mid = 0.5 * (A + B), 0.5 * (FA + FB) # before the bracket moves
|
||||
fnew = g(x_new)
|
||||
if (prestep in ("flatstickexit", "flatanalog", "flatanalogmem") and sticky_m is not None
|
||||
if ((prestep == "flatstickexit" or pre_flat != "none") and sticky_m is not None
|
||||
and x_new == mid_now
|
||||
and abs(fnew - lin_mid) < abs(fnew)):
|
||||
# PREREG_flat_exit 2026-09-21. A midpoint evaluated in the regime is judged
|
||||
|
||||
Reference in New Issue
Block a user