Expand description
SRD-86 — the core optimizer contract.
This is the service boundary the phase-execution driver uses to drive
an optimizer. It is defined here, in the core runtime, with no
dependency on any optimizer-algorithm crate (SRD-86 §Contract): the
engine owns the contract; algorithm crates (e.g. nmbrs-optimizers)
register implementations against it via inventory and are discovered
at link time — the core never names them.
The contract has two halves:
- what the optimizer needs from the driver: an
Objectiveit can query at a coordinate (the runtime’sPhaseFeedimplements it); - what the driver needs from the optimizer: an
Optimizerthat, over aSearchSpacewithin aBudget, maximizes the objective and returns aReport.
SweepOptimizer (sweep) is the built-in default (the full Cartesian
sweep + best-selection) — the identity until an adaptive method is named.
Algorithm crates submit an OptimizerRegistration; by_name and
describe discover them.
Structs§
- Axis
- One factor of the search space.
- Axis
Impact - Per-axis sensitivity, populated by screening optimizers.
- Budget
- Evaluation budget + reproducibility seed.
- LexSource
- The default lexicographic coordinate stream over a search space: the full
Cartesian product of the discrete-axis detents and the
{lo, hi}corners of continuous axes, in lex order, one coordinate perpull. Thesweepfunctor returns it unchanged (identity). - Observation
- One objective evaluation result.
- Optimizer
Info - Name + markdown doc for one optimizer, for
nmbrs describe optimizers. - Optimizer
Params - Optimizer-specific tuning knobs (resolved by name with a default).
- Optimizer
Registration - An optimizer implementation’s registration, submitted at link time via
inventoryby an algorithm crate (e.g.nmbrs-optimizers). - Pull
Only - Wraps a boxed
PullSourceas a pull-onlyCoordinateSource. - Report
- The result of a search.
- Search
Space - The search space the optimizer explores.
- Sweep
Optimizer - The built-in default optimizer: the identity functor. It returns the default lexicographic stream unchanged — a full Cartesian sweep, the engine’s ordinary parameter enumeration. Always available, no plugin required (SRD-86 A1).
Enums§
- Axis
Kind - The domain of one axis.
- Axis
Value - The realized value an axis takes at a coordinate — the comprehension’s actual value (SRD-86 A4). The model carries labels/detents as-is; numeric casting for metric-space solvers is a solver-internal stub (the runtime bridge), never in this model.
- Changeover
- How an axis’s value is changed at runtime (cost prior; the runtime owns the actual realization — SRD-86 A5).
- Stop
Reason - Why a search ended (maps to a two-axis Outcome at the seam — SRD-86 A8).
Traits§
- Coordinate
Source - A coordinate source the graph executor pulls through (SRD-86). The source
advertises capability decorators; the executor probes them, favoring
the most capable (
FeedbackSource) and requiring at least one. - Feedback
Source - Most-capable decorator — the optimizer primitive. Given the
just-evaluated
(coord, objective)pairs, yield the next batch of coordinates to evaluate, orNonewhen the search is done. The first call receives an empty slice (it produces the initial batch). Batch methods (CMA-ES generation, Hyperband bracket) return several coordinates at once and buffer the matching values across calls. - Objective
- The thing an optimizer queries. The runtime’s
PhaseFeedimplements it by running a probe phase at the coordinate and reading the objective metric. The optimizer maximizesObservation::value. - Optimizer
- A non-derivative, multi-factor optimizer — a stateless functor that
transforms the default lexicographic coordinate stream into a (possibly
adaptive)
CoordinateSource(SRD-86). The search state lives in the produced source, not in the optimizer. - Pull
Source - Least-capable decorator: yield the next batch of coordinates without feedback. The default lexicographic stream and discrete reorderings are pull sources.
Functions§
- by_name
- Resolve an optimizer by name: the built-in
sweep, or a link-time registration. ReturnsNonefor an unknown name. - describe
- Every available optimizer (the built-in
sweep+ all registrations), sorted by name, fornmbrs describe optimizers. - registered_
names - Every registered optimizer name (built-in
sweep+ registrations).