Expand description
Differential Evolution (DE) for bounded, derivative-free optimization.
This implementation uses DE/best/1 with fcmaes extensions: temporal locality
(an extra
improvement trial along the previous move), age-based reinitialization of
stale individuals, oscillating F/CR between generations, optional
normal-distributed sampling around a guess, and mixed-integer “modify”
resampling. It is implemented entirely in Rust; historical implementations
informed compatibility testing, not the public API.
§Reference
R. Storn and K. Price, “Differential Evolution – A Simple and Efficient Heuristic for Global Optimization over Continuous Spaces”, Journal of Global Optimization 11, 341–359 (1997).
§Example
use fcmaes_core::{De, DeParams, Fitness};
let sphere = |x: &[f64]| x.iter().map(|v| v * v).sum::<f64>();
let fit = Fitness::bounded(3, 1, &[-5.0; 3], &[5.0; 3]);
let params = DeParams {
max_evaluations: 2_000,
seed: 42,
..Default::default()
};
let mut de = De::new(fit, &[], &[], None, ¶ms);
let result = de.optimize(&sphere);
assert!(result.y.is_finite());