Skip to main content

Crate rlx_bbo

Crate rlx_bbo 

Source
Expand description

Black-box optimization + FMQ/QGBS search (domain-agnostic f64 objectives).

For compiled flow-map policies and RLX-graph FMQ training, use rlx-rl.

Re-exports§

pub use bo::Acquisition;
pub use bo::BoConfig;
pub use bo::bo;
pub use gp::GpPosterior;
pub use gp::Kernel;
pub use gp::cholesky;

Modules§

acquisition
Acquisition functions for Bayesian optimisation.
bo
Top-level Bayesian optimisation loop.
gp
Gaussian-process posterior with RBF and Matérn kernels.
sampling
Low-discrepancy / space-filling samplers for design-of-experiments.
tpe
Tree-structured Parzen Estimator (Bergstra et al. 2011, Optuna).

Structs§

AdamOptConfig
AdamOptResult
BboSolution
Bbox
CmaesConfig
EsConfig
GraphOptConfig
GraphOptResult
GraphOptSpec
Parameter bundle for adam_opt_graph.
LinearFlowMap
One-step flow map X_{0,1}(a₀) = a₀ + W·a₀ + b (linear MVP analogue).
LinearSurrogate
Affine Q(x) ≈ b + w·x trained by ridge regression on logged trajectories.
PsoConfig
QSteerConfig
QgbsConfig
TrajectoryRecord
One design point along an optimization or placement run.

Enums§

GraphOptError

Constants§

DEFAULT_KAPPA
Stability constant for normalized gradient steps (paper κ₁).

Functions§

adam_opt_1d
adam_opt_graph
Compile grad_with_loss on fwd and run Adam.
adam_opt_nd
append_jsonl
cmaes
Diagonal CMA-ES. Minimizes f.
diagonal_flow_pairs
Extract (action, target_velocity) pairs for diagonal flow matching: v* ≈ a₁ − a₀.
eta_eff_twin
Adaptive trust radius from twin critic disagreement (paper eq. 13, batch-normalized δ).
find_param_node
Resolve a single Op::Param node by name.
find_param_nodes
Resolve param nodes in the same order as names.
finite_diff_grad
Centered finite-difference gradient of f at x.
fit_from_trajectory_jsonl
fit_linear_surrogate
Ridge fit: minimize ‖Xw − y‖² + λ‖w‖² with bias column.
fmq_surrogate_step
FMQ-style online step using surrogate grad: x ← x − η ∇Q / ‖∇Q‖.
gradcheck_graph
Central-difference gradcheck for fwd w.r.t. optimize params.
load_flow_map
load_jsonl
load_surrogate
one_plus_one_es
pso
q_guided_beam_search
Q-guided beam search (QGBS): renoise → optional trust steer → keep top beam by f.
q_steered_search
Q-steered search: anchor at x_ref, trust-region gradient steps + random exploration.
q_steered_search_twin
Q-steered search with twin objectives: cheap (e.g. prescreen) and expensive (e.g. ngspice).
q_steered_search_with_grad
Q-steered search with a caller-supplied gradient (e.g. rlx AD); skips finite differences.
random_search
save_flow_map
save_surrogate
search_by_method
Run random search, Q-steer, or QGBS from a string tag ("bbo", "qsteer", "qgbs").
train_from_jsonl
Offline train from JSONL trajectories; returns flow map + training MSE.
trust_region_q_step
One trust-region step toward lower f (minimization): x_ref − η · ∇f / (‖∇f‖ + κ).