/** * FRONTIER — the economics of the NEXT experiment ("should I run another, or stop?"). * * Every other optimizer answers "what should I try next?". For an EXPENSIVE physical experiment * (an assay, a wafer run, a GPU sweep) the question that actually decides the budget is the opposite: * "is the next try WORTH it, or have I already found the practical best?" Spending one more experiment * that gains nothing is real money burned; stopping one too early leaves value on the table. * * FRONTIER turns the discovery trajectory into a STOP / CONTINUE decision support signal — grounded only * in the observed diminishing-returns of THIS run, not a promise about the future. It estimates the * expected improvement of one more experiment from how the best-so-far has been improving (improvements * get rarer + smaller as you converge), compares it to the run's own noise floor, and — if you tell it * the cost of one experiment — frames that gain against the money. Deterministic + total, so the advice * is reproducible and signable alongside the discovery trace. * * Honest by construction: this is decision SUPPORT, not a guarantee. It says "based on your own curve, * the next experiment looks worth it / not worth it", and abstains to UNKNOWN when there isn't enough * history to tell. It never fabricates a dollar figure — money only appears if you supply a real cost. */ import { type Observation, type Goal } from "./engine.js"; export interface StoppingAdvice { n: number; best: number; recentGain: number; expectedGainNext: number; noiseFloor: number; plateau: boolean; recommendation: "CONTINUE" | "STOP" | "UNKNOWN"; confidence: number; rationale: string; costPerExperiment: number | null; spentSoFar: number | null; reasonCode: "too-few" | "still-improving" | "plateaued"; } /** * Decide whether the next experiment is worth running. * @param obs the (experiment, value) history so far, in run order * @param goal "maximize" | "minimize" * @param costPerExperiment optional real cost of ONE experiment (money/time) — only then is $ math shown * @param window how many recent experiments define "recent" gain (default 5) */ export declare function stoppingAdvice(obs: ReadonlyArray, goal?: Goal, costPerExperiment?: number | null, window?: number): StoppingAdvice; export declare function frontierGauntlet(): { score: 0 | 100; checks: Array<{ name: string; pass: boolean; detail: string; }>; }; //# sourceMappingURL=frontier.d.ts.map