mod gpmd

module gpmd

Gap-proportional Metropolis (local descent arm / standalone helper).

Implementation note (not a new global solver): temperature T = (1/2) * max(f - f_best, ε) / d from the D6 sphere-limit window with the best-so-far gap as a proxy; Haario-style scatter + RM scale toward α* ≈ 0.32; terminal polish fraction of the budget. Details: docs/derivations/gpmd_algorithm.org (explicitly not dual-annealing / CMA-ES / field SOTA).

Variables

const ALPHA_TARGET: f64

Model acceptance target α*(θ⋆) ≈ 0.32, at θ=1/2.

const POLISH_FRACTION: f64

Fraction of budget reserved for terminal polish.

const THETA_STAR: f64

Dimensionless operating temperature θ⋆ = 1/2 (inside (0,2) window).

Functions

fn gap_proportional_temp(f: f64, f_best: f64, dim: usize) -> f64

Temperature law (A1): T = θ⋆ · max(f − f_best, ε) / d.

fn gpmd_optimize<O, G>(obj: &O, grad: Option<&G>, budget: usize, seed: u64, x0: Option<ArrayView1<f64>>) -> GpmdResult
where
    O: Objective<f64>,
    G: Gradient<f64>

Public entry: run GPMD under a work-unit budget.

fn run_gpmd<O, G, R>(obj: &O, grad: Option<&G>, budget: usize, seed: u64, x0: Option<ArrayView1<f64>>, rng: &mut R) -> GpmdResult
where
    O: Objective<f64>,
    G: Gradient<f64>,
    R: Rng

Run GPMD with a caller-supplied RNG; see gpmd_optimize for the seeded entry.

Structs and Unions

struct GpmdResult

Result of one GPMD run.

best_pos: Array1<f64>

Best position found.

best_val: f64

Objective value at GpmdResult::best_pos.

n_evals: usize

Objective evaluations charged.

n_grads: usize

Gradient evaluations charged.

n_accept: usize

Accepted proposals.

n_propose: usize

Total proposals.