Evolution Strategies
NaiveGAflux.evolve
— Functionevolve(e::AbstractEvolution, population)
Return a new population evolved by e
.
New population may or may not contain same individuals as before.
evolve(e::AbstractEvolution, f::AbstractFitness, p::Population)
Return a new population fitted by f
and evolved by e
.
This is done by first replacing each member of p
with a FittedCandidate
with fitness computed by f
.
Then evolve population
into a new population using e
. New population may or may not contain same individuals as before.
NaiveGAflux.NoOpEvolution
— TypeNoOpEvolution <: AbstractEvolution
NoOpEvolution()
Does not evolve the given population.
NaiveGAflux.EliteSelection
— TypeEliteSelection <: AbstractEvolution
EliteSelection(nselect::Integer, evo=NoOpEvolution())
Selects the nselect
highest fitness candidates to be passed on to evo
.
NaiveGAflux.SusSelection
— TypeSusSelection <: AbstractEvolution
SusSelection(nselect, evo, rng=rng_default)
Selects candidates for further evolution using stochastic universal sampling.
NaiveGAflux.TournamentSelection
— TypeTournamentSelection <: AbstractEvolution
TournamentSelection(nselect, k, p::Real, evo, rng=rng_default)
Selects candidates for further evolution using tournament selection.
Holds nselect
tournaments with one winner each where each tournament has k
random candidates from the given population.
Winner of a tournament is selected as the candidate with highest fitness with a probability p
, second highest fitness with a probability p(p-1)
, third highest fitness with a probability of p((p-1)^2)
and so on.
NaiveGAflux.CombinedEvolution
— TypeCombinedEvolution <: AbstractEvolution
CombinedEvolution(evos::AbstractArray)
CombinedEvolution(evos...)
Combines the evolved populations from several AbstractEvolution
s into one population.
NaiveGAflux.EvolutionChain
— TypeEvolutionChain <: AbstractEvolution
EvolutionChain(evos::AbstractArray)
EvolutionChain(evos...)
Chains multiple AbstractEvolution
s in a sequence so that output from the first is input to the next and so on.
NaiveGAflux.PairCandidates
— TypePairCandidates <: AbstractEvolution
PairCandidates(evo::AbstractEvolution)
Creates pairs of candidates in a population and calls evolve(evo, pairs)
where pairs
is the array of pairs.
NaiveGAflux.ShuffleCandidates
— TypeShuffleCandidates
ShuffleCandidates()
ShuffleCandidates(rng)
Shuffles the population using rng
.
Useful with PairCandidates
in case the prior selection does not shuffle the population.
NaiveGAflux.EvolveCandidates
— TypeEvolveCandidates <: AbstractEvolution
EvolveCandidates(fun)
Applies fun(c)
for each candidate c
in a given population.
Useful with MapCandidate
.
NaiveGAflux.AfterEvolution
— TypeAfterEvolution <: AbstractEvolution
AfterEvolution(evo, fun)
Return fun(newpop)
where newpop = evolve(e.evo, pop)
where pop
is original population to evolve.