fugue_evo/hyperparameter/mod.rs
1//! Hyperparameter adaptation mechanisms
2//!
3//! This module provides various approaches to hyperparameter control in evolutionary algorithms,
4//! following Eiben et al.'s classification.
5//!
6//! **Integration status (EV-21):** only two of these are actually wired into a
7//! built-in algorithm today — self-adaptive control (Evolution Strategy) and the
8//! Thompson bandit ([`SimpleGA::run_adaptive`](crate::algorithms::simple_ga::SimpleGA::run_adaptive)).
9//! The deterministic **schedules** ([`schedules`]) and the feedback-driven
10//! **adaptive-control** primitives ([`adaptive`]) are, as shipped, *unintegrated
11//! building blocks*: no default algorithm's run loop consumes them, so you drive
12//! them yourself (e.g. query [`ParameterSchedule::value_at`](schedules::ParameterSchedule::value_at)
13//! each generation and apply the result). They are exercised only by unit tests.
14//! This is the same honest-building-block framing used for the conjugate
15//! posteriors below.
16//!
17//! 1. **Deterministic Control (Schedules)** — [`schedules`]: predetermined
18//! parameter values by generation ([`LinearAnnealing`](schedules::LinearAnnealing),
19//! [`CosineAnnealing`](schedules::CosineAnnealing),
20//! [`ExponentialDecay`](schedules::ExponentialDecay),
21//! [`PolynomialDecay`](schedules::PolynomialDecay),
22//! [`CyclicalSchedule`](schedules::CyclicalSchedule),
23//! [`CompositeSchedule`](schedules::CompositeSchedule),
24//! [`DynamicSchedule`](schedules::DynamicSchedule)). **Unintegrated building
25//! blocks** — not wired into any algorithm's run loop.
26//! 2. **Adaptive Control** — [`adaptive`]: feedback-driven parameter adaptation
27//! ([`OneFifthRule`](adaptive::OneFifthRule),
28//! [`AdaptiveOperatorSelection`](adaptive::AdaptiveOperatorSelection),
29//! [`AdaptiveMutationRate`](adaptive::AdaptiveMutationRate),
30//! [`DiversityBasedAdaptation`](adaptive::DiversityBasedAdaptation)). **Also
31//! unintegrated building blocks** — no built-in algorithm consumes them; the
32//! wired online-adaptation path today is the Thompson bandit in item 4.
33//! 3. **Self-Adaptive Control** — [`self_adaptive`]: parameters encoded in the
34//! genome and evolved; **integrated** into the Evolution Strategy path.
35//! 4. **Bayesian / Bandit Learning**: Parameters are learned online from observed
36//! improvement events. The [`bayesian::ThompsonSamplingTuner`] is **wired into**
37//! [`SimpleGA`](crate::algorithms::simple_ga::SimpleGA) via
38//! [`SimpleGABuilder::adaptive_operators`](crate::algorithms::simple_ga::SimpleGABuilder::adaptive_operators)
39//! and [`SimpleGA::run_adaptive`](crate::algorithms::simple_ga::SimpleGA::run_adaptive);
40//! the conjugate posteriors ([`bayesian::BetaPosterior`], [`bayesian::GammaPosterior`])
41//! and [`bayesian::RunningLogMoments`] are honest, self-describing building blocks.
42
43pub mod adaptive;
44pub mod bayesian;
45pub mod schedules;
46pub mod self_adaptive;
47
48pub mod prelude {
49 pub use super::adaptive::*;
50 pub use super::bayesian::*;
51 pub use super::schedules::*;
52 pub use super::self_adaptive::*;
53}