pulsatrix
Loading...
Searching...
No Matches
survivor_selection.hpp File Reference

Survivor-selection policies for the evolutionary-loop skeleton (evolutionary_loop.hpp): generational replacement, (mu+lambda), (mu,lambda). More...

#include <algorithm>
#include <stdexcept>
#include <vector>
#include "pulsatrix/individual.hpp"
Include dependency graph for survivor_selection.hpp:

Go to the source code of this file.

Namespaces

namespace  pulsatrix
 

Functions

template<typename Genotype , typename FitnessT >
std::vector< Individual< Genotype, FitnessT > > pulsatrix::GenerationalReplacement (const std::vector< Individual< Genotype, FitnessT > > &, std::vector< Individual< Genotype, FitnessT > > offspring, size_t mu)
 Generational replacement (DEAP's eaSimple): the offspring pool becomes the entire next generation; population is ignored (parents never survive).
 
template<typename Genotype , typename FitnessT >
std::vector< Individual< Genotype, FitnessT > > pulsatrix::MuPlusLambdaReplacement (const std::vector< Individual< Genotype, FitnessT > > &population, std::vector< Individual< Genotype, FitnessT > > offspring, size_t mu)
 (mu+lambda) replacement: the next generation is the fittest mu individuals from population union offspring (parents may survive) – more exploitative than (mu,lambda), since a fit parent is never discarded just for being old.
 
template<typename Genotype , typename FitnessT >
std::vector< Individual< Genotype, FitnessT > > pulsatrix::MuCommaLambdaReplacement (const std::vector< Individual< Genotype, FitnessT > > &, std::vector< Individual< Genotype, FitnessT > > offspring, size_t mu)
 (mu,lambda) replacement: the next generation is the fittest mu individuals from offspring only (population/parents are always discarded) – more explorative than (mu+lambda), since it cannot get stuck re-selecting the same elite parent forever.
 

Detailed Description

Survivor-selection policies for the evolutionary-loop skeleton (evolutionary_loop.hpp): generational replacement, (mu+lambda), (mu,lambda).

Note
Research doc research_2026_evolutionary_deep_learning.md ยง1: DEAP's eaSimple, eaMuPlusLambda, and eaMuCommaLambda "reduce to the same six-step skeleton.. differing only in the survivor-selection policy" – this file is exactly that differing piece, factored out so evolutionary_loop.hpp's own loop is written once, not three times.