|
Watchmaker Framework for Evolutionary Computation API (Version 0.7.1) |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.uncommons.watchmaker.framework.operators.SplitEvolution<T>
T
- The type of evolved entity dealt with by this operator.public class SplitEvolution<T>
Compound evolutionary operator that allows the evolution of a population to be split into two separate streams. A percentage of the population will be evolved according to one specified operator and the remainder according to another operator. When both streams have been executed, the resulting offspring will be returned as a single combined population.
This kind of separation is common in a genetic programming context where, for example, 10% of the population is mutated and the remaining 90% undergoes cross-over independently.
To split evolution into more than two streams, multiple SplitEvolution operators
can be combined. By combining SplitEvolution operators with
EvolutionPipeline
operators, elaborate evolutionary schemes can be
constructed.
Constructor Summary | |
---|---|
SplitEvolution(EvolutionaryOperator<T> operator1,
EvolutionaryOperator<T> operator2,
double weight)
|
|
SplitEvolution(EvolutionaryOperator<T> operator1,
EvolutionaryOperator<T> operator2,
NumberGenerator<Double> weightVariable)
|
Method Summary | |
---|---|
List<T> |
apply(List<T> selectedCandidates,
Random rng)
Applies one evolutionary operator to part of the population and another to the remainder. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SplitEvolution(EvolutionaryOperator<T> operator1, EvolutionaryOperator<T> operator2, double weight)
operator1
- The operator that will apply to the first part of the
population (as determined by the weight
parameter).operator2
- The operator that will apply to the second part of the
population (as determined by the weight
parameter).weight
- The proportion (as a real number between zero and 1 exclusive)
of the population that will be evolved by operator1
. The
remainder will be evolved by operator2
.public SplitEvolution(EvolutionaryOperator<T> operator1, EvolutionaryOperator<T> operator2, NumberGenerator<Double> weightVariable)
operator1
- The operator that will apply to the first part of the
population (as determined by the weightVariable
parameter).operator2
- The operator that will apply to the second part of the
population (as determined by the weightVariable
parameter).weightVariable
- A random variable that provides the ratio for
dividing the population between the two evolutionary streams. Must
only generate values in the range 0 < ratio < 1.Method Detail |
---|
public List<T> apply(List<T> selectedCandidates, Random rng)
apply
in interface EvolutionaryOperator<T>
selectedCandidates
- A list of the candidates that survived to be
eligible for evolution.rng
- A source of randomness passed to each of the two delegate
evolutionary operators.
|
Watchmaker Framework for Evolutionary Computation API (Version 0.7.1) |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |