org.encog.ml.ea.opp.selection
public class TruncationSelection extends Object implements SelectionOperator, Serializable
| Constructor and Description |
|---|
TruncationSelection(EvolutionaryAlgorithm theTrainer,
double thePercent)
Construct the truncation selector.
|
| Modifier and Type | Method and Description |
|---|---|
EvolutionaryAlgorithm |
getTrainer() |
int |
performAntiSelection(Random rnd,
Species species)
Selects an unfit genome.
|
int |
performSelection(Random rnd,
Species species)
Selects an fit genome.
|
public TruncationSelection(EvolutionaryAlgorithm theTrainer, double thePercent)
theTrainer - The trainer.thePercent - The top percent to select from.public int performSelection(Random rnd, Species species)
performSelection in interface SelectionOperatorrnd - A random number generator.species - The species to select the genome from.public int performAntiSelection(Random rnd, Species species)
performAntiSelection in interface SelectionOperatorrnd - A random number generator.species - The species to select the genome from.public EvolutionaryAlgorithm getTrainer()
getTrainer in interface SelectionOperatorCopyright © 2014. All Rights Reserved.