public class WeaselSelector<G extends Gene<?,G>,C extends Comparable<? super C>> extends Object implements Selector<G,C>
The selector always returns populations which only contains "count
"
instances of the best Phenotype
.
Engine
setup for the Weasel program:
final Engine<CharacterGene, Integer> engine = Engine
.builder(fitness, gtf)
// Set the 'WeaselSelector'.
.selector(new WeaselSelector<>())
// Disable survivors selector.
.offspringFraction(1)
// Set the 'WeaselMutator'.
.alterers(new WeaselMutator<>(0.05))
.build();
WeaselMutator
Constructor and Description |
---|
WeaselSelector() |
Modifier and Type | Method and Description |
---|---|
Population<G,C> |
select(Population<G,C> population,
int count,
Optimize opt) |
public WeaselSelector()
© 2007-2017 Franz Wilhelmstötter (2017-08-22 19:30)