Algorithms Reference
This section provides detailed reference documentation for all optimization algorithms in fugue-evo.
Algorithm Overview
| Algorithm | Module | Use Case |
|---|---|---|
| SimpleGA | algorithms::simple_ga | General-purpose optimization |
| CMA-ES | algorithms::cmaes | Continuous non-separable optimization |
| NSGA-II | algorithms::nsga2 | Multi-objective optimization |
| Island Model | algorithms::island | Parallel multimodal optimization |
| EDA/UMDA | algorithms::eda | Probabilistic model-based optimization |
Common Patterns
Builder Pattern
All algorithms use type-safe builders:
let result = SomeAlgorithmBuilder::new()
.population_size(100)
.max_generations(200)
// ... configuration
.build()?
.run(&mut rng)?;
Result Structure
Most algorithms return an EvolutionResult:
pub struct EvolutionResult<G, F> {
pub best_genome: G,
pub best_fitness: F,
pub generations: usize,
pub evaluations: usize,
pub stats: EvolutionStats,
}
Termination
Algorithms support pluggable termination criteria:
.max_generations(200)
// or
.termination(TargetFitness::new(-0.001))
// or
.termination(AnyOf::new(vec![
Box::new(MaxGenerations::new(500)),
Box::new(FitnessStagnation::new(50)),
]))
Algorithm Selection
Problem Type
│
┌──────────────────┼──────────────────┐
│ │ │
Multi-Objective Continuous Discrete/Other
│ │ │
▼ ▼ ▼
NSGA-II Separable? SimpleGA
│
┌────────┼────────┐
│ Yes │ │ No
▼ │ ▼
SimpleGA │ CMA-ES
or EDA │
│
Multimodal?
│
┌────────┼────────┐
│ Yes │ No
▼ ▼
Island Model SimpleGA
See Also
- Choosing an Algorithm - Decision guide
- API Documentation - Full rustdoc reference