Module io.jenetics.ext
Package io.jenetics.ext
Class MpLEvolutionStrategy<G extends Gene<?,G>,C extends Comparable<? super C>>
java.lang.Object
io.jenetics.ext.MpLEvolutionStrategy<G,C>
- Type Parameters:
G
- the gene typeC
- the fitness result type
- All Implemented Interfaces:
Engine.Setup<G,
C>
public final class MpLEvolutionStrategy<G extends Gene<?,G>,C extends Comparable<? super C>>
extends Object
implements Engine.Setup<G,C>
Setup for a (μ + λ)-Evolution Strategy. Applying this setup is done in the
following way.
And is equivalent to the following builder setup.
final var engine = Engine.builder(problem)
.setup(new MpLEvolutionStrategy<>(μ, λ, p))
.build();
final var engine = Engine.builder(problem)
.populationSize(λ)
.survivorsSize(μ)
.offspringSelector(new TruncationSelector<>(μ))
.alterers(new Mutator<>(p))
.build();
- Since:
- 6.0
- Version:
- 6.0
-
Constructor Summary
ConstructorDescriptionMpLEvolutionStrategy
(int mu, int lambda) Create a new (μ + λ)-Evolution Strategy with the given parameters.MpLEvolutionStrategy
(int mu, int lambda, double mutationProbability) Create a new (μ + λ)-Evolution Strategy with the given parameters. -
Method Summary
-
Constructor Details
-
MpLEvolutionStrategy
Create a new (μ + λ)-Evolution Strategy with the given parameters.- Parameters:
mu
- the number of the fittest individuals to be selectedlambda
- the population countmutationProbability
- the mutation probability- Throws:
IllegalArgumentException
- ifmu < 2
orlambda < mu
ormutationProbability not in [0, 1]
-
MpLEvolutionStrategy
Create a new (μ + λ)-Evolution Strategy with the given parameters. The mutation probability is set toAlterer.DEFAULT_ALTER_PROBABILITY
.- Parameters:
mu
- the number of the fittest individuals to be selectedlambda
- the population count- Throws:
IllegalArgumentException
- ifmu < 2
orlambda < mu
ormutationProbability not in [0, 1]
-
-
Method Details
-
apply
- Specified by:
apply
in interfaceEngine.Setup<G extends Gene<?,
G>, C extends Comparable<? super C>>
-