public class KLandscapes extends GPProblem implements SimpleProblemForm
Parameters
| base.data classname, inherits or == ec.app.klandscapes.KLandscapesData |
(the class for the prototypical GPData object for the KLandscapes problem) |
Parameter bases
| base.data | species (the GPData object) |
| Modifier and Type | Field and Description |
|---|---|
(package private) double |
bestFitness |
(package private) double[][] |
edgeScore |
(package private) int[] |
indices |
(package private) int |
k |
(package private) double[] |
nodeScore |
(package private) String |
P_KVALUE |
(package private) String |
P_PROBLEMNAME |
| Constructor and Description |
|---|
KLandscapes() |
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Creates a new individual cloned from a prototype,
and suitable to begin use in its own evolutionary
context.
|
(package private) double |
computeBestFitness() |
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) double |
fitness(GPNode root) |
(package private) double |
fitnessHelper(GPNode node) |
(package private) int |
getIndex(char c) |
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.
|
(package private) double |
subtreeFitness(GPNode node,
int depth) |
defaultBasecanEvaluate, closeContacts, describe, describe, finishEvaluating, initializeContacts, prepareToEvaluate, reinitializeContactsequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdescribedouble[] nodeScore
double[][] edgeScore
double bestFitness
int k
String P_PROBLEMNAME
String P_KVALUE
int[] indices
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.
int getIndex(char c)
public void evaluate(EvolutionState state, Individual ind, int subpopulation, int threadnum)
SimpleProblemFormevaluate in interface SimpleProblemFormdouble fitness(GPNode root)
double fitnessHelper(GPNode node)
double subtreeFitness(GPNode node, int depth)
double computeBestFitness()
public Object clone()
PrototypeTypically this should be a full "deep" clone. However, you may share certain elements with other objects rather than clone hem, depending on the situation:
Implementations.
public Object clone()
{
try
{
return super.clone();
}
catch ((CloneNotSupportedException e)
{ throw new InternalError(); } // never happens
}
public Object clone()
{
try
{
MyObject myobj = (MyObject) (super.clone());
// put your deep-cloning code here...
}
catch ((CloneNotSupportedException e)
{ throw new InternalError(); } // never happens
return myobj;
}
public Object clone()
{
MyObject myobj = (MyObject) (super.clone());
// put your deep-cloning code here...
return myobj;
}
Copyright © 2014 Evolutionary Computation Laboratory at George Mason University. All rights reserved.