Commit df3332d
feat: enhance with genetic algorithm framework, selection, crossover, mutation, elitism, convergence
- Genetic algorithm framework (population, individuals, chromosomes)
- Fitness function abstraction (trait-based, pluggable)
- Selection strategies: roulette wheel, tournament, rank-based
- Crossover operators: single-point, two-point, uniform
- Mutation operators: random replace, swap, scramble, invert, gaussian
- Elitism support (preserve top performers each generation)
- Convergence detection (fitness diversity threshold)
- GA config with tunable parameters
- Generation stats tracking (best/worst/avg fitness, diversity)
- Custom operator support via run_with_operators
- Backward-compatible Engine preserved
- 42 tests passing (21 new + 21 original)1 parent 16f0c1f commit df3332d
1 file changed
Lines changed: 993 additions & 102 deletions
0 commit comments