public class RandomBranch extends GPNodeBuilder
Chellapilla, K. 1998. Evolving Modular Programs without Crossover. in Proceedings of the Third Annual Genetic Programming Conference (GP98), J.R. Koza et al, editors. San Fransisco: Morgan Kaufmann. 23--31.
This algorithm attempts to create a tree of size requestedSize, or "slightly less". If the pipeline does not specify a size it wants (it uses NOSIZEGIVEN), the algorithm picks a size at random from either [minSize...maxSize] or from sizeDistribution (one of the two must be defined), and attempts to create a tree of that size or "slightly less".
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
P_RANDOMBRANCH |
CHECK_BOUNDARY, maxSize, minSize, NOSIZEGIVEN, P_MAXSIZE, P_MINSIZE, P_NUMSIZES, P_SIZE, sizeDistribution
Constructor and Description |
---|
RandomBranch() |
Modifier and Type | Method and Description |
---|---|
Parameter |
defaultBase()
Returns the default base for this prototype.
|
GPNode |
newRootedTree(EvolutionState state,
GPType type,
int thread,
GPNodeParent parent,
GPFunctionSet set,
int argposition,
int requestedSize) |
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.
|
canPick, clone, errorAboutNoNodeWithType, pickSize, warnAboutNonterminal, warnAboutNonTerminalWithType, warnAboutNoTerminalWithType
public static final java.lang.String P_RANDOMBRANCH
public Parameter defaultBase()
Prototype
public void setup(EvolutionState state, Parameter base)
Prototype
For 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 GPNode newRootedTree(EvolutionState state, GPType type, int thread, GPNodeParent parent, GPFunctionSet set, int argposition, int requestedSize)
newRootedTree
in class GPNodeBuilder