Expand description
Interactive Genetic Algorithm (IGA) module
This module provides support for human-in-the-loop evolutionary optimization, where fitness is derived from user preferences rather than an automated function.
§Overview
Interactive GAs are useful when:
- The fitness function cannot be easily formalized
- Human aesthetic judgment is needed (art, design, music generation)
- User preferences are subjective and vary per individual
§Evaluation Modes
The module supports three interaction paradigms:
- Rating: Users assign numeric scores to individual candidates
- Pairwise Comparison: Users pick the better of two candidates
- Batch Selection: Users select their favorites from a presented batch
§Example
ⓘ
use fugue_evo::interactive::prelude::*;
use fugue_evo::prelude::*;
let mut iga = InteractiveGABuilder::<RealVector>::new()
.population_size(12)
.evaluation_mode(EvaluationMode::BatchSelection)
.batch_size(6)
.bounds(bounds)
.selection(TournamentSelection::new(2))
.crossover(SbxCrossover::new(15.0))
.mutation(PolynomialMutation::new(20.0))
.build()?;
loop {
match iga.step(&mut rng) {
StepResult::NeedsEvaluation(request) => {
let response = present_to_user(&request);
iga.provide_response(response);
}
StepResult::GenerationComplete { generation, .. } => {
println!("Generation {} complete", generation);
}
StepResult::Complete(result) => break,
}
}Modules§
- aggregation
- Fitness aggregation models for interactive evaluation
- algorithm
- Interactive Genetic Algorithm implementation
- bradley_
terry - Bradley-Terry model implementation with Maximum Likelihood Estimation
- evaluator
- Core types for interactive evaluation
- prelude
- Prelude for convenient imports
- selection_
strategy - Active learning strategies for intelligent candidate selection
- session
- Session state management for interactive evolution
- traits
- Interactive fitness traits
- uncertainty
- Uncertainty quantification for fitness estimates