public class Semantic extends GPProblem implements SimpleProblemForm
Parameters
| base.data classname, inherits or == ec.gp.gpdata |
(the class for the prototypical GPData object) |
Parameter bases
| base.data | species (the GPData object) |
| Modifier and Type | Field and Description |
|---|---|
(package private) static String |
P_MAJORITY |
(package private) static String |
P_ORDER |
(package private) static String |
P_PROBLEM_NAME |
(package private) static String |
P_SIZE |
(package private) String |
problemName |
(package private) int |
problemSize |
| Constructor and Description |
|---|
Semantic() |
| Modifier and Type | Method and Description |
|---|---|
void |
describe(EvolutionState state,
Individual ind,
int subpopulation,
int threadnum,
int log)
Part of SimpleProblemForm.
|
void |
evaluate(EvolutionState state,
Individual ind,
int subpopulation,
int threadnum)
Evaluates the individual in ind, if necessary (perhaps
not evaluating them if their evaluated flags are true),
and sets their fitness appropriately.
|
(package private) ArrayList |
getSemanticOutput(GPTree t) |
(package private) boolean |
nodeSameIndexExists(ArrayList p,
int n)
Given a list and an index, check whether a node of that index
exists in the list.
|
(package private) String |
phenotypeToString(ArrayList p) |
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.
|
clone, defaultBasecanEvaluate, closeContacts, describe, finishEvaluating, initializeContacts, prepareToEvaluate, reinitializeContactsstatic final String P_PROBLEM_NAME
static final String P_SIZE
static final String P_ORDER
static final String P_MAJORITY
String problemName
int problemSize
public void setup(EvolutionState state, Parameter base)
PrototypeFor prototypes, setup(...) is typically called once for the prototype instance; cloned instances do not receive the setup(...) call. setup(...) may be called more than once; the only guarantee is that it will get called at least once on an instance or some "parent" object from which it was ultimately cloned.
public void evaluate(EvolutionState state, Individual ind, int subpopulation, int threadnum)
SimpleProblemFormevaluate in interface SimpleProblemFormArrayList getSemanticOutput(GPTree t)
t - Tree to be "executed"boolean nodeSameIndexExists(ArrayList p, int n)
p - List of nodesn - indexpublic void describe(EvolutionState state, Individual ind, int subpopulation, int threadnum, int log)
Problemdescribe in interface SimpleProblemFormdescribe in class ProblemCopyright © 2014 Evolutionary Computation Laboratory at George Mason University. All rights reserved.