|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectec.Evaluator
ec.coevolve.MultiPopCoevolutionaryEvaluator
MultiPopCoevolutionaryEvaluator.java
MultiPopCoevolutionaryEvaluator is an Evaluator which performs competitive or cooperative coevolution. Competitive coevolution is where individuals' fitness is determined by testing them against individuals from other subpopulation. Cooperative coevolution is where individuals form teams together with members of other subpopulations, and the individuals' fitness is computed based on the performance of such teams. This evaluator assumes that the problem can only evaluate groups of individuals containing one individual from each subpopulation. Individuals are evaluated regardless of whether or not they've been evaluated in the past.
Your Problem is responsible for updating up the fitness appropriately with values usually obtained from teaming up the individual with different partners from the other subpopulations. MultiPopCoevolutionaryEvaluator expects to use Problems which adhere to the GroupedProblemForm interface, which defines a new evaluate(...) function, plus a preprocess(...) and postprocess(...) function.
This coevolutionary evaluator is single-threaded -- maybe we'll hack in multithreading later. It allows any number of subpopulations (implicitly, any number of individuals being evaluated together). The order of individuals in the subpopulation may be changed during the evaluation process.
Parameters
base.subpop.X.num-rand-ind int >= 0 |
(the number of random individuals from subpopulation X to be selected as partners for evaluating individuals in other subpopulations -- individuals are selected at random, with replacement, and they are usually different for each of the individuals in the other subpopulations) |
base.subpop.X.num-elites int >= 0 |
(the number of elite individuals from subpopulation X to be selected as partners for evaluating individuals in other subpopulations) |
base.subpop.X.num-ind int >= 0 |
(the number of individuals from subpopulation X in the previous generation to be selected as partners for evaluating individuals in other subpopulations -- individuals are selected, with replacement, by using SelectionMethods described next, and they are usually different for each of the individuals in the other subpopulations) |
base.subpop.X.select instance of ec.SelectionMethod |
(the SelectionMethod used to select partners from the individuals in subpopulation X at the previous generation) |
Field Summary | |
static java.lang.String |
P_NUM_ELITE
|
static java.lang.String |
P_NUM_IND
|
static java.lang.String |
P_NUM_RAND_IND
|
static java.lang.String |
P_SELECTIONMETHOD
|
static java.lang.String |
P_SUBPOP
|
Fields inherited from class ec.Evaluator |
P_IAMSLAVE, P_MASTERPROBLEM, p_problem, P_PROBLEM |
Constructor Summary | |
MultiPopCoevolutionaryEvaluator()
|
Method Summary | |
void |
afterCoevolutionaryEvaluation(EvolutionState state,
Population population,
GroupedProblemForm prob)
|
void |
beforeCoevolutionaryEvaluation(EvolutionState state,
Population population,
GroupedProblemForm prob)
|
void |
evaluatePopulation(EvolutionState state)
Evaluates the fitness of an entire population. |
void |
loadElites(EvolutionState state,
Subpopulation subpop,
int whichSubpop)
|
void |
performCoevolutionaryEvaluation(EvolutionState state,
Population population,
GroupedProblemForm prob)
|
boolean |
runComplete(EvolutionState state)
Returns true if an ideal individual has been found or some other run result has shortcircuited the run so that it should end prematurely right now. |
void |
setup(EvolutionState state,
Parameter base)
Sets up the object by reading it from the parameters stored in state, built off of the parameter base base. |
Methods inherited from class ec.Evaluator |
initializeContacts, reinitializeContacts |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String P_SUBPOP
public static final java.lang.String P_NUM_RAND_IND
public static final java.lang.String P_NUM_ELITE
public static final java.lang.String P_NUM_IND
public static final java.lang.String P_SELECTIONMETHOD
Constructor Detail |
public MultiPopCoevolutionaryEvaluator()
Method Detail |
public void setup(EvolutionState state, Parameter base)
Setup
setup
in interface Setup
setup
in class Evaluator
public boolean runComplete(EvolutionState state)
Evaluator
runComplete
in class Evaluator
public void evaluatePopulation(EvolutionState state)
Evaluator
evaluatePopulation
in class Evaluator
public void beforeCoevolutionaryEvaluation(EvolutionState state, Population population, GroupedProblemForm prob)
public void performCoevolutionaryEvaluation(EvolutionState state, Population population, GroupedProblemForm prob)
public void afterCoevolutionaryEvaluation(EvolutionState state, Population population, GroupedProblemForm prob)
public void loadElites(EvolutionState state, Subpopulation subpop, int whichSubpop)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |