|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.encog.ml.ea.opp.selection.TournamentSelection
public class TournamentSelection
Tournament select can be used to select a fit (or unfit) genome from a species. The selection is run a set number of rounds. Each round two random participants are chosen. The more fit participant continues to the next round. http://en.wikipedia.org/wiki/Tournament_selection
| Constructor Summary | |
|---|---|
TournamentSelection(EvolutionaryAlgorithm theTrainer,
int theRounds)
Construct a tournament selection. |
|
| Method Summary | |
|---|---|
int |
getRounds()
|
EvolutionaryAlgorithm |
getTrainer()
|
int |
performAntiSelection(Random rnd,
Species species)
Selects an unfit genome. |
int |
performSelection(Random rnd,
Species species)
Selects an fit genome. |
void |
setRounds(int rounds)
Set the number of rounds. |
void |
setTrainer(EvolutionaryAlgorithm trainer)
Set the trainer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TournamentSelection(EvolutionaryAlgorithm theTrainer,
int theRounds)
theTrainer - The trainer.theRounds - The number of rounds to use.| Method Detail |
|---|
public int getRounds()
public EvolutionaryAlgorithm getTrainer()
getTrainer in interface SelectionOperator
public int performAntiSelection(Random rnd,
Species species)
performAntiSelection in interface SelectionOperatorrnd - A random number generator.species - The species to select the genome 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 void setRounds(int rounds)
rounds - The number of rounds.public void setTrainer(EvolutionaryAlgorithm trainer)
trainer - The trainer.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||