evolve
A generic, composable genetic algorithm framework for Rust.
Note: This library is a work in progress but is usable in its current state. The final version will include more built-in operators, grammatical evolution, and parallel execution.
evolve provides the building blocks to assemble genetic algorithms from reusable, type-safe components. Operators are composed using combinators — chain them into pipelines, weight them probabilistically, or repeat them to fill a population — all with zero-cost abstractions.
Features
- Fully generic over genome type, fitness type, RNG, and fitness comparator
- Built-in operators for selection, crossover, and mutation
- Composable combinators for structuring the flow of the algorithm
MaximizeandMinimizefitness comparators out of the box- Closures work as fitness evaluators and comparators via blanket trait impls
- No dependencies beyond
rand
Quick Start
use ;
use NonZero;
Custom Operators
Implement GeneticOperator to define your own:
use ;
;
AI Disclosure
AI was used only to assist with writing comments, writing tests, writing examples, and as a rubber duck to discuss ideas with. All final decisions and code were written by a human.