logarithmic march MEASURED and REFUTED: APS 6940 vs the published 2806 (2.5x worse), CHA 3115 vs the 2857 target, two sets 10414 vs <6026; the mechanism did work in the predicted direction (CHA 4516 -> 3115 = 1.45x) but the canonical set pays for it — the same trade that ended the four previous attempts, now measured for the transform too. Guarantee intact everywhere (over2x = 0)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -45,3 +45,46 @@
|
||||
|
||||
Ослабление пред-регистрированного гейта после его провала — приём, которым легко обмануть себя,
|
||||
поэтому он делается только по явному решению, и оба варианта записаны здесь заранее.
|
||||
|
||||
**Решение Валерия: вариант B** — G2 заменён измеримым G2′, единица `s = xtol` зафиксирована выводом
|
||||
(поправка 1 пред-регистрации).
|
||||
|
||||
---
|
||||
|
||||
## 2. 🔴 Измерено: логарифмический марш НЕ платит. Линия закрывается
|
||||
|
||||
Режим реализован как `space="log"` в `pure_root` (по умолчанию `"x"`, опубликованный тракт
|
||||
побитово не тронут — пиннится тестом); свип 126 конфигураций × 199 задач по тому же протоколу
|
||||
(`sweep_full.evaluate`, тот же XTOL/MAXFEV/ACC, провал = полный бюджет, проверка границы `2×` на
|
||||
каждом прогоне), результат в своём файле `sweep_log.json`. Сравнение — по-наборно, правилом статьи,
|
||||
и внутри семейства сторожей, несущих гарантию.
|
||||
|
||||
| проверка | цель | измерено | вердикт |
|
||||
|---|---|---|---|
|
||||
| **G2′** цена на APS-154 не растёт | ≤ 2806 | **6940** | 🔴 FAIL — в 2.5 раза дороже |
|
||||
| **L3** Chandrupatla-45 ≤ 2857 | 2857 | **3115** | 🔴 FAIL |
|
||||
| два набора вместе | < 6026 | **10 414** | 🔴 FAIL |
|
||||
| **L1** широкие скобки дешевле ≥2× | ≥2× | 4516 → 3115 = **1.45×** | 🔴 FAIL |
|
||||
| решено | ≥193/199 | **193/199** | 🟢 PASS |
|
||||
| гарантия `2⌈log₂(w/xtol)⌉+3` | не нарушена | `over2x = 0` во всех конфигурациях | 🟢 PASS |
|
||||
|
||||
Лучшие конфигурации: APS — `log.ratio_soft.derived.step/safe` 6940 (153/154); CHA —
|
||||
`log.ratio_soft.derived.credit` 3115 (40/45). Опубликованное x-пространство: APS
|
||||
`pure.ratio.derived3.none` **2806**, CHA `pure.sqrt.bracket.project` 4516.
|
||||
|
||||
**Содержательный итог.** Механизм сработал в предсказанную сторону: на широких скобках марш
|
||||
действительно дешевле (4516 → 3115), то есть мультипликативное движение — правильный диагноз
|
||||
регима. Но цена на каноническом наборе выросла в 2.5 раза, а это ровно тот трейд, на котором
|
||||
закончились все четыре прежние попытки (`NEXT_PAPER_logarithmic.md` §«что уже пробовали»). Теперь он
|
||||
измерен и для логарифмической замены: **пятая попытка провалилась тем же способом**, и это, а не
|
||||
числа, — главный вывод линии.
|
||||
|
||||
**Что теперь ЗАПРЕЩЕНО повторять (пятый пункт к прежним четырём):** глобальная замена переменной с
|
||||
единицей `xtol` — APS 6940 против 2806, CHA 3115 против цели 2857. Локальное переключение между
|
||||
пространствами по наблюдаемому признаку закрыто отдельно: это пункт 2-4 прежних запретов (детекторы
|
||||
режима), все провалены.
|
||||
|
||||
**Открытым остаётся только одно направление**, и оно не про похожесть: разрыв на CHA закрывает
|
||||
Chandrupatla-1997 (2423 против наших 4516) при **нуле** настроечных констант, то есть существующий
|
||||
алгоритм уже делает то, чего мы добиваемся, и объяснение его преимущества — отдельная задача
|
||||
(качество пробы, `stage4_why.py`), а не новая шкала шага.
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
"""Compare the logarithmic-space grid against the PUBLISHED x-space grid, under the
|
||||
identical protocol (both sweeps use sweep_full.evaluate, same XTOL/MAXFEV/ACC, failures
|
||||
charged the full budget, the 2x bound counted per run).
|
||||
|
||||
python -u compare_log_vs_x.py sweep_full.json sweep_log.json
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import sys
|
||||
|
||||
|
||||
def best(rows, key, kind):
|
||||
sel = [r for r in rows if (r["spec"][0] == "pure") == (kind != "base")]
|
||||
if kind == "base":
|
||||
sel = [r for r in rows if r["spec"][0] == "base"]
|
||||
if not sel:
|
||||
return None
|
||||
return min(sel, key=lambda r: (r[key]["n"] - r[key]["solved"], r[key]["total"]))
|
||||
|
||||
|
||||
def two_set(r):
|
||||
return r["APS"]["total"] + r["CHA"]["total"], r["APS"]["solved"] + r["CHA"]["solved"]
|
||||
|
||||
|
||||
def per_set_best(rows, setname):
|
||||
"""The PAPER'S ranking rule, applied within one set: fewest unsolved, then fewest
|
||||
evaluations. Ranking across the two sets by (solved, cost) is NOT the paper's rule
|
||||
and picks a config that buys one extra solve for thousands of evaluations — that
|
||||
mistake produced a misleading 'x-space best' on 2026-09-20."""
|
||||
return min(rows, key=lambda r: (r[setname]["n"] - r[setname]["solved"], r[setname]["total"]))
|
||||
|
||||
|
||||
def main(x_path, log_path):
|
||||
xs = json.load(open(x_path, encoding="utf8"))
|
||||
lg = json.load(open(log_path, encoding="utf8"))
|
||||
print(f"{'grid':>10} {'set':>4} {'configuration':<34} {'solved':>9} {'total fev':>10} {'over2x':>7}")
|
||||
for name, data in (("x-space", xs), ("log-space", lg)):
|
||||
pure = [r for r in data if r["spec"][0] == "pure"]
|
||||
if not pure:
|
||||
continue
|
||||
for setname in ("APS", "CHA"):
|
||||
b = per_set_best(pure, setname)
|
||||
print(f"{name:>10} {setname:>4} {b['label']:<34} "
|
||||
f"{b[setname]['solved']}/{b[setname]['n']:>3} {b[setname]['total']:10d} "
|
||||
f"{b[setname]['over']:7d}")
|
||||
# the two-set figure the prereg's 6026 target refers to: the best config by total
|
||||
# among those that solve the most problems in EACH set at the paper's own optimum
|
||||
print()
|
||||
rows = []
|
||||
for name, data in (("x-space", xs), ("log-space", lg)):
|
||||
pure = [r for r in data if r["spec"][0] == "pure"]
|
||||
if not pure:
|
||||
continue
|
||||
b = min(pure, key=lambda r: (r["APS"]["n"] - r["APS"]["solved"]
|
||||
+ r["CHA"]["n"] - r["CHA"]["solved"],
|
||||
r["APS"]["total"] + r["CHA"]["total"]))
|
||||
tot, solved = two_set(b)
|
||||
over = b["APS"]["over"] + b["CHA"]["over"]
|
||||
print(f"{name:>10} two-set best: {b['label']:<30} solved {solved}/199 "
|
||||
f"APS {b['APS']['total']:6d} CHA {b['CHA']['total']:6d} total {tot:6d} over {over}")
|
||||
rows.append((name, b, tot, solved, over))
|
||||
# the baselines the targets are stated against
|
||||
for nm in ("itp", "brent", "toms748", "chandrupatla", "bisection"):
|
||||
cand = [r for r in xs if r["spec"][0] == "base" and r["label"].startswith(nm)]
|
||||
if not cand:
|
||||
continue
|
||||
b = min(cand, key=lambda r: (399 - (r["APS"]["solved"] + r["CHA"]["solved"]),
|
||||
r["APS"]["total"] + r["CHA"]["total"]))
|
||||
tot, solved = two_set(b)
|
||||
print(f"{'baseline':>10} {b['label']:<34} "
|
||||
f"{b['APS']['solved']}/{b['APS']['n']} {b['APS']['total']:7d} "
|
||||
f"{b['CHA']['solved']}/{b['CHA']['n']} {b['CHA']['total']:7d} "
|
||||
f"{solved}/399 {tot:8d} {b['APS']['over'] + b['CHA']['over']:7d}")
|
||||
|
||||
# The prereg's 6026 target is stated WITH the guarantee intact, so the comparison must
|
||||
# stay inside the guarantee-bearing guards; and each verdict compares LIKE WITH LIKE
|
||||
# (the same set, the same guard family) — comparing two different configurations gave a
|
||||
# false PASS on 2026-09-20.
|
||||
GUAR = ("credit", "project", "safe")
|
||||
print("\nguarantee-bearing guards only (credit/project/safe):")
|
||||
bests = {}
|
||||
for name, data in (("x-space", xs), ("log-space", lg)):
|
||||
pure = [r for r in data if r["spec"][0] == "pure" and r["spec"][3] in GUAR]
|
||||
if not pure:
|
||||
continue
|
||||
b2 = min(pure, key=lambda r: (r["APS"]["n"] - r["APS"]["solved"]
|
||||
+ r["CHA"]["n"] - r["CHA"]["solved"],
|
||||
r["APS"]["total"] + r["CHA"]["total"]))
|
||||
tot, solved = two_set(b2)
|
||||
bests[name] = (b2, tot, solved)
|
||||
print(f" {name:>9}: {b2['label']:<32} solved {solved}/199 "
|
||||
f"APS {b2['APS']['total']:6d} CHA {b2['CHA']['total']:6d} total {tot:6d} "
|
||||
f"over {b2['APS']['over'] + b2['CHA']['over']}")
|
||||
print(f" {'':>9} per-set APS best {per_set_best(pure, 'APS')['label']:<28} "
|
||||
f"{per_set_best(pure, 'APS')['APS']['total']:6d} | "
|
||||
f"CHA best {per_set_best(pure, 'CHA')['label']:<28} "
|
||||
f"{per_set_best(pure, 'CHA')['CHA']['total']:6d}")
|
||||
|
||||
if len(bests) == 2:
|
||||
bx, tx, _sx = bests["x-space"]
|
||||
bl, tl, sl = bests["log-space"]
|
||||
apx = per_set_best([r for r in xs if r["spec"][0] == "pure" and r["spec"][3] in GUAR], "APS")
|
||||
apl = per_set_best([r for r in lg if r["spec"][0] == "pure" and r["spec"][3] in GUAR], "APS")
|
||||
chl = per_set_best([r for r in lg if r["spec"][0] == "pure" and r["spec"][3] in GUAR], "CHA")
|
||||
print("\nTARGETS (PREREG): two sets < 6026, CHA <= 2857, solved >= 193/199, guarantee intact")
|
||||
print(f" VERDICT G2' (APS must not grow, per-set best vs per-set best): "
|
||||
f"{'PASS' if apl['APS']['total'] <= apx['APS']['total'] else 'FAIL'} "
|
||||
f"(log {apl['APS']['total']} vs x {apx['APS']['total']})")
|
||||
print(f" VERDICT L3 (CHA <= 2857): {'PASS' if chl['CHA']['total'] <= 2857 else 'FAIL'} "
|
||||
f"(log {chl['CHA']['total']})")
|
||||
print(f" VERDICT two sets < 6026: {'PASS' if tl < 6026 else 'FAIL'} "
|
||||
f"(log {tl}, x {tx})")
|
||||
print(f" VERDICT solved >= 193: {'PASS' if sl >= 193 else 'FAIL'} ({sl}/199)")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main(sys.argv[1] if len(sys.argv) > 1 else "sweep_full.json",
|
||||
sys.argv[2] if len(sys.argv) > 2 else "sweep_log.json")
|
||||
@@ -0,0 +1,76 @@
|
||||
sweep: 126 configurations x 199 problems (FULL, LOG-SPACE)
|
||||
10/126 done, 1s elapsed
|
||||
20/126 done, 1s elapsed
|
||||
30/126 done, 1s elapsed
|
||||
40/126 done, 1s elapsed
|
||||
50/126 done, 2s elapsed
|
||||
60/126 done, 2s elapsed
|
||||
70/126 done, 2s elapsed
|
||||
80/126 done, 3s elapsed
|
||||
90/126 done, 3s elapsed
|
||||
100/126 done, 3s elapsed
|
||||
110/126 done, 3s elapsed
|
||||
120/126 done, 3s elapsed
|
||||
126/126 done, 4s elapsed
|
||||
|
||||
wrote sweep_log.json (4s total)
|
||||
|
||||
====================================================================================
|
||||
APS: 154 problems (top 20 of 126)
|
||||
====================================================================================
|
||||
configuration solved total fev over 2x
|
||||
------------------------------------------------------------------------------------
|
||||
log.ratio_soft.derived.step 153/154 6940 0
|
||||
log.ratio_soft.derived.safe 153/154 6940 0
|
||||
log.ratio_soft.derived3.safe 153/154 7022 0
|
||||
log.ratio_soft.derived3.step 153/154 7022 0
|
||||
log.ratio_soft.derived3.both 153/154 7260 0
|
||||
log.ratio_soft.derived.both 153/154 7394 0
|
||||
log.ratio.derived3.none 153/154 7502 0
|
||||
log.ratio.derived3.project 153/154 7502 0
|
||||
log.ratio.derived.both 153/154 7525 0
|
||||
log.ratio.derived3.both 153/154 7535 0
|
||||
log.ratio.derived.step 153/154 7555 0
|
||||
log.ratio.derived.safe 153/154 7555 0
|
||||
log.ratio.derived3.step 153/154 7603 0
|
||||
log.ratio.derived3.safe 153/154 7603 0
|
||||
log.exp_abs.derived.both 153/154 7612 0
|
||||
log.ratio_soft.derived.credit 153/154 7613 0
|
||||
log.ratio.derived.credit 153/154 7637 0
|
||||
log.ratio_soft.derived.none 153/154 7644 0
|
||||
log.ratio_soft.derived.project 153/154 7644 0
|
||||
log.ratio_soft.derived3.credit 153/154 7647 0
|
||||
|
||||
====================================================================================
|
||||
CHA: 45 problems (top 20 of 126)
|
||||
====================================================================================
|
||||
configuration solved total fev over 2x
|
||||
------------------------------------------------------------------------------------
|
||||
log.ratio_soft.derived.credit 40/45 3115 0
|
||||
log.cbrt.derived3.credit 40/45 3121 0
|
||||
log.sqrt.derived3.credit 40/45 3122 0
|
||||
log.ratio.derived3.credit 40/45 3125 0
|
||||
log.ratio.derived.credit 40/45 3126 0
|
||||
log.cbrt.derived.credit 40/45 3130 0
|
||||
log.cosine.derived.credit 40/45 3130 0
|
||||
log.cosine.derived3.credit 40/45 3130 0
|
||||
log.exp_abs.derived.credit 40/45 3130 0
|
||||
log.exp_sq.derived.credit 40/45 3130 0
|
||||
log.exp_sq.derived3.credit 40/45 3130 0
|
||||
log.exp_abs.derived3.credit 40/45 3130 0
|
||||
log.rat_sq.derived3.credit 40/45 3130 0
|
||||
log.rat_sq.derived.credit 40/45 3130 0
|
||||
log.rational.derived.credit 40/45 3130 0
|
||||
log.ratio_soft.derived3.credit 40/45 3130 0
|
||||
log.rational.derived3.credit 40/45 3130 0
|
||||
log.sqrt.derived.credit 40/45 3130 0
|
||||
log.ratio_soft.derived.both 40/45 3428 0
|
||||
log.ratio_soft.derived.step 40/45 3474 0
|
||||
|
||||
====================================================================================
|
||||
THE STAGE-0C LAW ACROSS THE GRID
|
||||
====================================================================================
|
||||
scale=derived slope c=1 (linear) mean total 11778 mean solved 193.0/199
|
||||
scale=derived slope c=0 (quadratic) mean total 19322 mean solved 192.7/199
|
||||
scale=derived3 slope c=1 (linear) mean total 12126 mean solved 193.0/199
|
||||
scale=derived3 slope c=0 (quadratic) mean total 18772 mean solved 193.0/199
|
||||
@@ -159,10 +159,26 @@ def evaluate(spec):
|
||||
return res
|
||||
|
||||
|
||||
def _preflight_log_mode():
|
||||
"""Fail LOUDLY if the log mode is not actually available.
|
||||
|
||||
`evaluate` catches every exception and charges the full budget, so a stale
|
||||
deployment (an old simroot/pure.py without `space`) looks exactly like a method
|
||||
that solves nothing: on 2026-09-20 that produced a whole sweep of 39800 = 199 x
|
||||
MAXFEV before the cause was found. One call up front turns that into an error."""
|
||||
x, _n, ok = pure_root(lambda t: t - 1.0, 0.0, 3.0, 1e-10, 100,
|
||||
similarity="ratio", scale="derived3", guard="credit",
|
||||
space="log")
|
||||
if not (ok and abs(x - 1.0) < 1e-8):
|
||||
raise SystemExit("log mode preflight FAILED: the mode is present but does not solve "
|
||||
"a linear problem — refusing to run a sweep that would report zeros")
|
||||
|
||||
|
||||
def build_grid_log(smoke):
|
||||
"""The logarithmic-space grid (PREREG 2026-09-20). Baselines are NOT recomputed:
|
||||
their numbers are already in sweep_full.json and re-running known expensive
|
||||
controls is waste. Only the derived scales are admissible in u-space."""
|
||||
_preflight_log_mode()
|
||||
sims = ["ratio", "cbrt"] if smoke else sorted(PURE_SIMS)
|
||||
guards = ("credit", "project") if smoke else GUARD_MODES
|
||||
return [("pure", sim, sc, gu, "log")
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user