org.artoflife.gp.population
Class SelectorGenerationalPopulation
java.lang.Object
|
+--org.artoflife.gp.Population
|
+--org.artoflife.gp.population.GenerationalPopulation
|
+--org.artoflife.gp.population.SelectorGenerationalPopulation
- All Implemented Interfaces:
- java.io.Serializable
- public class SelectorGenerationalPopulation
- extends GenerationalPopulation
A GenerationalPopulation
which culls a configurable random number
of Individuals every generation from the least
fit of the population.
- Author:
- Steve Meyfroidt
- See Also:
- Serialized Form
Constructor Summary |
SelectorGenerationalPopulation(int populationSize,
java.lang.Class individualClass,
int minCull,
int maxCull,
java.util.SortedMap reproducers)
|
Method Summary |
protected void |
cullOneWeakest()
|
protected void |
cullWeakest()
Cull a random number of Individuals between
minCull and maxCull from the least fit
Individuals. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
minCull
protected int minCull
maxCull
protected int maxCull
SelectorGenerationalPopulation
public SelectorGenerationalPopulation(int populationSize,
java.lang.Class individualClass,
int minCull,
int maxCull,
java.util.SortedMap reproducers)
- Parameters:
populationSize
- how many Individuals in this fixed size population?
Must be > 2individualClass
- Class of individuals to create as initial population.
Must be non-nullminCull
- minimum number of Individuals to cull at end of each
generation. Must be > -1maxCull
- maximum number of Individuals to cull at start of each
new generation. Must be >= minCull
cullWeakest
protected void cullWeakest()
- Cull a random number of Individuals between
minCull and maxCull from the least fit
Individuals.
- Specified by:
cullWeakest
in class Population
- See Also:
Population.cullOneWeakest()
cullOneWeakest
protected void cullOneWeakest()
- Specified by:
cullOneWeakest
in class Population
- See Also:
Population.cullOneWeakest()
Copyright © 2002 the Art Of Life team. All Rights Reserved.