/** * ⬛ THE NULL ENGINE — the optimizer that is brave enough to say "there is NOTHING to find." * * (Melete's signature, out-of-the-box differentiator. Makes the 108-point audit's #10 "Stochastic Gradient * Vulnerability" + #ม.4 robustness real, and turns them into a selling point.) * * Every optimizer on earth ALWAYS hands you a "best recipe." Feed it pure noise — knobs that have NO real * effect on the outcome — and it will still proudly report "optimum found: temp=91.8, score 9.99!" That number * is a lie: it is simply the LUCKIEST random draw. Acting on it wastes a fortune chasing a phantom. This * silent over-fitting to noise is the single most expensive self-deception in real-world optimization, and * NOBODY guards against it — they all just return a confident answer. * * The NULL ENGINE does the opposite. After it searches, it puts its OWN answer on trial against the NULL * HYPOTHESIS — "your knobs don't actually matter; this peak is just noise." Using a permutation test on the * run's own data (shuffle the score↔recipe link thousands of ways; how often does pure chance beat the * structure we found?), it returns a verdict + a p-value: * • ✓ REAL — the optimum is statistically significant; your variables genuinely drive the outcome. Act on it. * • ⚠ WEAK — borderline; collect more data before trusting it. * • ⬛ NULL — the "best" is indistinguishable from luck; your knobs show no real effect. DO NOT act on it. * * It also wears a NULL MEMBRANE: any broken measurement (NaN · ±Infinity · null · a thrown error) becomes a * null observation, so it never crashes and an Infinity can never masquerade as the best score. * * Honest by construction (DIAKRISIS): the verdict is a standard, calibrated permutation test computed from the * run's OWN observations (no extra oracle calls, no fabricated confidence) — its false-positive rate on pure * noise is bounded by α by construction. It is NOT a claim to optimise the unoptimisable; it is the rare * honesty to tell you when there was never a signal there. The gauntlet proves both directions: REAL signal → * "REAL" ≥97.5% of seeds; pure noise → "NULL" ≥97.5% (false-positive ≤ α) — while a naive optimizer is fooled * into "found an optimum!" on the noise every single time. */ import { type Space, type Experiment } from "./space.js"; import { type Goal, type Observation } from "./engine.js"; export type NullVerdict = "REAL" | "WEAK" | "NULL"; export interface NullEngineResult { best: Observation; verdict: NullVerdict; pValue: number; signalStrength: number; attempts: number; nulls: number; nullRate: number; crashed: boolean; } /** Discover on an unreliable oracle AND put the result on trial against the null hypothesis. */ export declare function nullEngineDiscover(opts: { space: Space; oracle: (e: Experiment) => number; budget: number; goal?: Goal; seed?: number; alpha?: number; }): NullEngineResult; export declare function nullEngineGauntlet(): { score: 0 | 100; checks: Array<{ name: string; pass: boolean; detail: string; }>; }; //# sourceMappingURL=nullengine.d.ts.map