Expand description
Evolution as inference: the PPL-native layer (requires the ppl feature)
This module makes “evolutionary algorithms as probabilistic programs”
literal. Given a fitness f and a prior program p(x) over genomes
(a prior::GenomePrior — any fugue Model<G>), the Boltzmann/Gibbs
posterior
π_β(x) ∝ p(x) · exp(β · f(x))is itself a fugue program (prior.model().bind(|g| factor(β·f(g)))), and
every sampler here is fugue’s own inference machinery run against it:
model::EvolutionModelassembles the target program; all densities are obtained by running/replaying it (no hand-written density code).mh::EvolutionChaindelegates tofugue::adaptive_single_site_mh— typed proposals move every site kind (Bool/U64/Usize/I64/F64), fixing the historical F64-only dead-chain bug.smc::EvolutionSMCdelegates tofugue::adaptive_smc_with_kernel: adaptive likelihood-tempering (β applied exactly once), ESS-driven resampling, per-particle MH rejuvenation, an optional population-coupled crossover kernel, and an unbiased log-evidence estimate.bayesian_ga::BayesianAdaptiveGAkeeps the Thompson-sampling operator selection (conjugate Beta/Gamma posteriors, now backed byrand_distr).
effect_handlers retains the genuine fugue::Handler implementations
(TraceScoringHandler, RecordingHandler) and the operator observation
hooks; trace_operators retains the value-level trace operators.
See examples/bayesian_evolution.rs for an end-to-end pipeline.
Modules§
- bayesian_
ga - A single-level Bayesian adaptive genetic algorithm
- effect_
handlers - Fugue
Handlers and operation hooks for evolutionary operators - grammar
- Expression trees as probabilistic grammars: genetic programming as exact Bayesian inference
- likelihood
- Likelihoods as programs
- mh
- Metropolis–Hastings over the Boltzmann target, delegated to fugue
- model
- The Boltzmann posterior over genomes, as a fugue program
- pareto
- Multi-objective optimization as Bayesian inference: the Pareto posterior
- prelude
- prior
- Priors over genomes as probabilistic programs
- smc
- Tempered SMC over the Boltzmann posterior, built on fugue’s SMC engine
- trace_
operators - Trace-based genetic operators