/** * THE BRAIN — the closed-loop active-experiment-design engine. * * propose → the most promising UNtried experiment (Bayesian-optimization-lite: a Gaussian-kernel * surrogate predicts the outcome of any candidate; an UCB acquisition trades off exploiting * the best-known region against exploring the uncertain one; exploration DECAYS over the * budget so it explores early and exploits late) * observe → the oracle measures the proposed experiment * update → the observation joins the evidence; the surrogate sharpens * converge → repeat until the budget is spent or the goal is reached * * It learns the shape of an unknown response surface from as FEW experiments as possible — because in the * real world each experiment costs reagents / robot-time / money. Deterministic (seeded), so a run is * reproducible and its signed trace is meaningful. * * ★HONEST: this is a lightweight, dependency-free surrogate (kernel-weighted mean + nearest-point * uncertainty), not a full Gaussian-process with learned hyperparameters. It reliably beats random/grid * on smooth-ish response surfaces (proven in bench.ts); pathological/high-dimensional/very noisy surfaces * need a heavier surrogate — a slot the architecture leaves open. */ import { type Space, type Experiment } from "./space.js"; export type Goal = "maximize" | "minimize"; export interface Observation { experiment: Experiment; value: number; } export interface Step { n: number; experiment: Experiment; value: number; acquisition: number; kappa: number; rationale: string; } export interface DiscoveryResult { best: Observation; history: Step[]; evaluations: number; converged: boolean; goal: Goal; } export interface DiscoverOpts { space: Space; oracle: (e: Experiment) => number | Promise; budget: number; goal?: Goal; seed?: number; target?: number; candidatePool?: number; kappa0?: number; bandwidth?: number; haltonOffset?: number; coldStart?: number; onStep?: (s: Step) => void | Promise; } /** Run the closed discovery loop. Returns the best experiment found + the full reproducible history. */ export declare function discover(opts: DiscoverOpts): Promise; export declare function engineGauntlet(): Promise<{ score: 0 | 100; checks: Array<{ name: string; pass: boolean; detail: string; }>; }>; //# sourceMappingURL=engine.d.ts.map