public abstract class GPProblem extends Problem implements SimpleProblemForm
Parameters
| base.stack classname, inherits or = ec.ADFStack |
(the class for the GPProblem's ADF Stack) |
| base.data classname, inherits and != ec.GPData |
(the class for the GPProblem's basic GPData type) |
Default Base
gp.problem
Parameter bases
| base.stack | (stack) |
| base.data | (data) |
| Modifier and Type | Field and Description |
|---|---|
GPData |
input
The GPProblem's GPData
|
static String |
P_DATA |
static String |
P_GPPROBLEM |
static String |
P_STACK |
ADFStack |
stack
The GPProblem's stack
|
| Constructor and Description |
|---|
GPProblem() |
| 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.
|
Parameter |
defaultBase()
GPProblem defines a default base so your subclass doesn't
absolutely have to.
|
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.
|
canEvaluate, closeContacts, describe, describe, finishEvaluating, initializeContacts, prepareToEvaluate, reinitializeContactsequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdescribe, evaluatepublic static final String P_GPPROBLEM
public static final String P_STACK
public static final String P_DATA
public ADFStack stack
public GPData input
public Parameter defaultBase()
defaultBase in interface PrototypedefaultBase in class Problempublic 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 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.