|
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.Replacement<T>
T
- The type of evolvable entity that this operator applies to.public class Replacement<T>
An evolutionary operator that replaces individuals with randomly-generated new individuals, according to some specified probability. The new individuals are not derived from the selected individuals, they are completely random. This operator provides a way to prevent stagnation by occassionally introducing new genetic material into the population.
Constructor Summary | |
---|---|
Replacement(CandidateFactory<T> factory,
NumberGenerator<Probability> replacementProbability)
Creates a replacement operator that replaces individuals according to a variable probability. |
|
Replacement(CandidateFactory<T> factory,
Probability replacementProbability)
Creates a replacement operator that replaces individuals according to the specified probability. |
Method Summary | |
---|---|
List<T> |
apply(List<T> selectedCandidates,
Random rng)
Randomly replace zero or more of the selected candidates with new, independent individuals that are randomly created. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Replacement(CandidateFactory<T> factory, Probability replacementProbability)
factory
- A source of new individuals.replacementProbability
- The probability that any given individual will
be replaced by a new individual. This should typically be quite low. If it is
too high, it will undermine the evolutionary progress.public Replacement(CandidateFactory<T> factory, NumberGenerator<Probability> replacementProbability)
factory
- A source of new individuals.replacementProbability
- A NumberGenerator
that provides
a probability of replacement. The probablity may be constant, or it may change
over time. The probability should typically be quite low. If it is too high,
it will undermine the evolutionary progress.Method Detail |
---|
public List<T> apply(List<T> selectedCandidates, Random rng)
apply
in interface EvolutionaryOperator<T>
selectedCandidates
- The selected candidates, some of these may be
discarded and replaced with new individuals.rng
- A source of randomness.
|
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 |