|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jaga.evolve.StandardEvolver
A Generational GA with fixed length genotype, fixed size population implementation of the Evolver.
Constructor Summary | |
StandardEvolver(int populationSize,
int initialGenotypeLength,
GeneticOperator[] operators,
double[] operatorProbabilities,
Selector selector,
int numOfElites)
Creates a StandardEvolver. |
|
StandardEvolver(int populationSize,
int initialGenotypeLength,
GeneticOperator[] operators,
double[] operatorProbabilities,
Selector selector,
int numOfElites,
Genotype[] seeds)
Creates a StandardEvolver. |
Method Summary | |
void |
evolve()
runs the evolution process on the population performing: selection, recombination & mutation and elitism |
int |
getGenerations()
returns an int whose value is the number of times the evolve() method was called after the latest poolOfMud() call. |
Genotype |
getGenotype(int i)
gets the genotype at index i in the population |
Population |
getPopulation()
returns current generation (never called during evolve) |
int |
getPopulationSize()
returns the size of the population this Evolver deals with. |
void |
insertGenotype(Genotype g)
inserts this genotype into the current population. |
Genotype |
pickGenotype()
uses the evolver's selector to pick a genotype from the population (probably the previous generation, not from one currently evolving) |
void |
poolOfMud()
Creates the initial random individuals by: 1) Getting a decent randoizer 2) generating [populationSize] random BitSets of length [initialGenotypeLength] |
void |
setPopulation(Population pop)
Sets this evolvers current generation population to this one. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public StandardEvolver(int populationSize, int initialGenotypeLength, GeneticOperator[] operators, double[] operatorProbabilities, Selector selector, int numOfElites)
initialGenotypeLength
- the length of genotypes created in the pool of mud. These may drift from then on if genetic operators that change size are used.operators
- array of GeneticOperator objects to be used.operatorProbabilities
- the probability with which each individual
should reproduce using each of these operators - same array order.public StandardEvolver(int populationSize, int initialGenotypeLength, GeneticOperator[] operators, double[] operatorProbabilities, Selector selector, int numOfElites, Genotype[] seeds)
initialGenotypeLength
- the length of genotypes handled in this evolver.operators
- array of GeneticOperator objects to be used.operatorProbabilities
- the probability with which each individual
should reproduce using each of these operators - same array order.seeds
- Genotypes to be inserted into the initial population.Method Detail |
public void poolOfMud()
poolOfMud
in interface Evolver
public void evolve()
evolve
in interface Evolver
public int getPopulationSize()
Evolver
getPopulationSize
in interface Evolver
public java.lang.String toString()
toString
in class java.lang.Object
public Genotype pickGenotype()
Evolver
pickGenotype
in interface Evolver
public Population getPopulation()
getPopulation
in interface Evolver
public int getGenerations()
getGenerations
in interface Evolver
public Genotype getGenotype(int i)
getGenotype
in interface Evolver
public void insertGenotype(Genotype g)
insertGenotype
in interface Evolver
public void setPopulation(Population pop)
setPopulation
in interface Evolver
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |