|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--gpsys.Population
A Population holds all the Individuals of a generation. Additional information is maintained such as the current generation number, the average fitness and complexity of the Individuals, and the best individual in the Population.
| Field Summary | |
double |
averageComplexity
The average number of nodes in the Individuals of the Population. |
Fitness |
averageFitness
The average fitness of the Population. |
Individual |
bestGeneration
The fittest Individual in the Population. |
Individual |
bestRun
The fittest Individual of the Run. |
private CrossoverBookkeeping |
bookkeepingInfo
Used for implementing a minimal memory generational evolution engine. |
private static int |
CROSSOVER
Used internally to signal a crossover operation. |
long |
crossovers
Total number of crossovers performed. |
int |
generation
The current generation number. |
GPParameters |
gpParameters
The GP parameters for the problem. |
private static int |
MUTATION
Used internally to signal a mutation operation. |
long |
mutations
Total number of mutations performed. |
Individual[] |
p
The Individuals in this population. |
private static int |
REPRODUCTION
Used internally to signal a reproduction operation. |
long |
reproductions
Total number of reproductions performed. |
| Constructor Summary | |
Population(GPParameters gpParameters)
|
|
| Method Summary | |
void |
evolve()
Evolve the current population via the steady state or generational engine depending on the value of the engine parameter. |
void |
evolveGenerational()
|
void |
evolveSteadyState()
|
private Individual |
executeCrossoverOperation(int mum,
int dad)
Execute a crossover operation using specified parents. |
private Individual |
executeMutationOperation(int mum)
Execute a mutation operation using specified parent. |
private Individual |
executeReproductionOperation(int mum)
Execute a reproduction operation using the specified parent. |
void |
report(java.io.PrintWriter pw)
Print a report of the population using the specified PrintWriter. |
private int |
selectBest()
Select the best individual from a tournament. |
private int |
selectGeneticOperation()
Randomly select a new Genetic Operation to be performed using the selection probabilities specified in the GPParameters object via the variable pMutation and pReproduction. |
private int |
selectWorst()
Select the worst individual from a tournament. |
private void |
sort(int[] indexList)
Sort an array of indices to Individuals so that the first index references the best Individual, and the last the worst. |
private int[] |
tournamentSelect()
Perform tournament selection. |
void |
updateStats()
Update the statistics for the Population. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public Individual[] p
public int generation
public Individual bestGeneration
public Individual bestRun
public Fitness averageFitness
public double averageComplexity
public GPParameters gpParameters
public long reproductions
public long mutations
public long crossovers
private transient CrossoverBookkeeping bookkeepingInfo
private static final int REPRODUCTION
private static final int MUTATION
private static final int CROSSOVER
| Constructor Detail |
public Population(GPParameters gpParameters)
| Method Detail |
public void evolve()
public void evolveSteadyState()
public void evolveGenerational()
private Individual executeCrossoverOperation(int mum,
int dad)
mum - index of the first parent involved in the crossover.father - index of the secong parent involved in the crossover.private Individual executeMutationOperation(int mum)
mum - index of the parent involved in the mutation.private Individual executeReproductionOperation(int mum)
mum - index of the parent involved in the mutation.private int selectGeneticOperation()
private int selectBest()
private int selectWorst()
private int[] tournamentSelect()
private void sort(int[] indexList)
The - array of indices to Individuals to be sorted.public void updateStats()
public void report(java.io.PrintWriter pw)
The - PrintWriter to use to write the report.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||