|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.encog.ml.ea.opp.selection.TruncationSelection
public class TruncationSelection
Truncation selection chooses a random genome from the top genomes in the population. A percent determines how large this group of top genomes is. http://en.wikipedia.org/wiki/Truncation_selection
Constructor Summary | |
---|---|
TruncationSelection(EvolutionaryAlgorithm theTrainer,
double thePercent)
Construct the truncation selector. |
Method Summary | |
---|---|
EvolutionaryAlgorithm |
getTrainer()
|
int |
performAntiSelection(Random rnd,
Species species)
Selects an unfit genome. |
int |
performSelection(Random rnd,
Species species)
Selects an fit genome. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TruncationSelection(EvolutionaryAlgorithm theTrainer, double thePercent)
theTrainer
- The trainer.thePercent
- The top percent to select from.Method Detail |
---|
public int performSelection(Random rnd, Species species)
performSelection
in interface SelectionOperator
rnd
- A random number generator.species
- The species to select the genome from.
public int performAntiSelection(Random rnd, Species species)
performAntiSelection
in interface SelectionOperator
rnd
- A random number generator.species
- The species to select the genome from.
public EvolutionaryAlgorithm getTrainer()
getTrainer
in interface SelectionOperator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |