/** * THE PORTFOLIO BRAIN — the production engine. Self-allocating, robust on every landscape, build-once. * * No-Free-Lunch: no single optimiser wins everywhere. So instead of betting on one algorithm, the * portfolio runs several strategy ARMS (kernel-ucb, cmaes, resonance, random) and a multi-armed BANDIT * (UCB1) spends each expensive experiment on whichever arm is delivering the most IMPROVEMENT on THIS * problem right now. On a smooth low-D surface it converges to the Bayesian arm; on a rugged or high-D * surface it shifts budget to evolution; if an arm stops helping the bandit starves it. The result is an * engine that adapts to the problem instead of forcing the problem to fit the engine — so it keeps * working across domains without being re-engineered. Each experiment's trace records which arm proposed * it, so the discovery provenance shows the brain's adaptive reasoning. * * ★HONEST: the portfolio is not magically better than its best arm on a given problem — its guarantee is * ROBUSTNESS (never far behind the best arm, automatically, with no per-problem tuning), which is exactly * what a production system needs. The bandit pays a small exploration overhead to buy that robustness. */ import { type Space, type Experiment } from "./space.js"; import { type Goal, type Step, type DiscoveryResult } from "./engine.js"; import { type Arm } from "./arms.js"; export interface PortfolioOpts { space: Space; oracle: (e: Experiment) => number | Promise; budget: number; goal?: Goal; seed?: number; target?: number; arms?: Arm[]; explore?: number; onStep?: (s: Step) => void | Promise; } export interface ArmStat { name: string; pulls: number; meanReward: number; improvements: number; } export interface PortfolioResult extends DiscoveryResult { armStats: ArmStat[]; } /** Run the self-allocating portfolio discovery loop. */ export declare function portfolioDiscover(opts: PortfolioOpts): Promise; export interface PortfolioGauntlet { score: 0 | 100; checks: Array<{ name: string; pass: boolean; detail: string; }>; } export declare function portfolioGauntlet(): Promise; //# sourceMappingURL=portfolio.d.ts.map