feat(algorithms): add DifferentialEvolution (DE/rand/1/bin)
Optional v1 algorithm requested by the user (spec §12.4): - Vec<f64> decisions only. - Single-objective only — panics with a clear message otherwise. - Standard DE/rand/1/bin: for each target i, sample distinct r1, r2, r3; mutant = x[r1] + F * (x[r2] - x[r3]); apply binomial crossover with at least one forced index; greedy replacement on direction-correct comparison. - Bounds taken from the embedded RealBounds (mutants are clamped to the per-variable range so the trial vector stays feasible). - Seed-deterministic; tests verify reproducibility, that DE improves on the initial random population for a sphere problem, and that multi-objective use panics.
This commit is contained in:
+2
-1
@@ -19,5 +19,6 @@ pub use crate::pareto::{
|
||||
pub use crate::operators::{BitFlipMutation, GaussianMutation, RealBounds, SwapMutation};
|
||||
|
||||
pub use crate::algorithms::{
|
||||
Nsga2, Nsga2Config, Paes, PaesConfig, RandomSearch, RandomSearchConfig,
|
||||
DifferentialEvolution, DifferentialEvolutionConfig, Nsga2, Nsga2Config, Paes, PaesConfig,
|
||||
RandomSearch, RandomSearchConfig,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user