feat(algorithms): add GeneticAlgorithm — single-objective generational GA
Canonical generational GA with elitism: each generation runs binary tournament selection (using `tournament_select_single_objective`) on the current population, applies the variation operator pair-wise to produce offspring, evaluates them, then replaces the population while preserving the top `elitism` members from the previous generation (elitism prevents fitness regression on a single seed). Single-objective only. Generic over decision type — pair with `SimulatedBinaryCrossover + PolynomialMutation` for real-valued, single-point crossover + bit-flip for binary, etc. Tests: convergence on Sphere1D, deterministic reruns, panic on multi-objective, panic on `population_size < 2`, panic on `elitism > population_size`.
This commit is contained in:
+4
-4
@@ -22,8 +22,8 @@ pub use crate::operators::{
|
||||
};
|
||||
|
||||
pub use crate::algorithms::{
|
||||
DifferentialEvolution, DifferentialEvolutionConfig, HillClimber, HillClimberConfig,
|
||||
Moead, MoeadConfig, Nsga2, Nsga2Config, Nsga3, Nsga3Config, Paes, PaesConfig,
|
||||
RandomSearch, RandomSearchConfig, SimulatedAnnealing, SimulatedAnnealingConfig,
|
||||
Spea2, Spea2Config,
|
||||
DifferentialEvolution, DifferentialEvolutionConfig, GeneticAlgorithm,
|
||||
GeneticAlgorithmConfig, HillClimber, HillClimberConfig, Moead, MoeadConfig, Nsga2,
|
||||
Nsga2Config, Nsga3, Nsga3Config, Paes, PaesConfig, RandomSearch, RandomSearchConfig,
|
||||
SimulatedAnnealing, SimulatedAnnealingConfig, Spea2, Spea2Config,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user