public class CompetitiveMaxOnes extends Problem implements GroupedProblemForm
| Constructor and Description |
|---|
CompetitiveMaxOnes() |
| Modifier and Type | Method and Description |
|---|---|
void |
evaluate(EvolutionState state,
Individual[] ind,
boolean[] updateFitness,
boolean countVictoriesOnly,
int[] subpops,
int threadnum)
Evaluates the individuals found in ind together.
|
void |
postprocessPopulation(EvolutionState state,
Population pop,
boolean[] updateFitness,
boolean countVictoriesOnly)
Finish processing the population (such as fitness information) after evaluation.
|
void |
preprocessPopulation(EvolutionState state,
Population pop,
boolean[] updateFitness,
boolean countVictoriesOnly)
Set up the population pop (such as fitness information) prior to evaluation.
|
canEvaluate, clone, closeContacts, defaultBase, describe, describe, finishEvaluating, initializeContacts, prepareToEvaluate, reinitializeContacts, setuppublic void preprocessPopulation(EvolutionState state, Population pop, boolean[] updateFitness, boolean countVictoriesOnly)
GroupedProblemFormcountVictoriesOnly will be set if Individuals' fitness is to be based on whether they're the winner of a test, instead of based on the specifics of the scores in the tests. This really only happens for Single-Elimination Tournament one-population competitive coevolution.
prepareForFitnessAssessment will indicate which subpopulations will have their fitness values updated this time around, during postprocessPopulation. It may not be the same as updateFitness[] in evaluate(...).
If you are basing fitness on trials, this method should create the initial trials if the prepareForFitnessAssessment[...] is true for that subpopulation.
preprocessPopulation in interface GroupedProblemFormpublic void postprocessPopulation(EvolutionState state, Population pop, boolean[] updateFitness, boolean countVictoriesOnly)
GroupedProblemFormcountVictoriesOnly will be set if Individuals' fitness is to be based on whether they're the winner of a test, instead of based on the specifics of the scores in the tests. This really only happens for Single-Elimination Tournament one-population competitive coevolution. If this is set, probably would leave the Fitnesses as they are here (they've been set and incremented in evaluate(...)), but if it's not set, you may want to set the Fitnesses to the maximum or average or the various trials performed.
assessFitness will indicate which subpopulations should have their final fitness values assessed. You should not clear the trials of individuals for which assessFitness[] is false. Instead allow trials to accumulate and ultimately update the fitnesses later when the flag is set. assessFitness[] may not be the same as updateFitness[] in evaluate(...).
postprocessPopulation in interface GroupedProblemFormpublic void evaluate(EvolutionState state, Individual[] ind, boolean[] updateFitness, boolean countVictoriesOnly, int[] subpops, int threadnum)
GroupedProblemFormcountVictoriesOnly will be set if Individuals' fitness is to be based on whether they're the winner of a test, instead of based on the specifics of the scores in the tests. This really only happens for Single-Elimination Tournament one-population competitive coevolution. If this is set, you should increment the Fitness of the winner each time. If it's not set, you should update Fitness as you see fit, then set the final Fitness in preprocessPopulation.
evaluate in interface GroupedProblemFormCopyright © 2014 Evolutionary Computation Laboratory at George Mason University. All rights reserved.