|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectgeneticWedge.gp.Mutation
public class Mutation
Mutation mutates an Individual using a selection of mutation operators.
Nested Class Summary | |
---|---|
static class |
Mutation.MutationOperator
Mutation operators should be chosen with care. |
Constructor Summary | |
---|---|
Mutation(Mutation.MutationOperator[] ops)
The constructor takes a list of mutation operations to be used. |
Method Summary | |
---|---|
void |
collectTransmissionInfo(boolean collect)
If set to true, collectTransmissionInfo saves information concerning the relationship between parent and offspring during mutation operations as well as the mutation operation that occurred. |
double |
getConstantMutationStepSize()
The stepSize determines how far constant values move during CONSTANT mutation. |
int |
getMaximumExpandDepth()
maximumExpandDepth is the maximum allowable depth of the subtree grown during an EXPAND mutation. |
int |
getMaximumReplacementDepth()
maximumReplacementDepth is the maximum allowable depth of the subtree grown during a SUBTREE mutation. |
Mutation.MutationOperator[] |
getMutationOperators()
Returns the array of mutationOperators used to perform mutation. |
java.util.Vector<double[]> |
getTransmissionInfo()
Returns a vector containing information about the relationship between parent and offspring during mutation operations, provided collectTransmissionInfo has been set to true. |
Individual |
mutate(Individual ind,
int maxLength,
int maxDepth,
PopulationDescriptor popDescriptor)
Perform a random mutation on an Individual. |
void |
setConstantMutationStepSize(double stepSize)
The stepSize determines how far constant values move during CONSTANT mutation. |
void |
setExpectedMutationDepth(double depth)
This sets the 'expected' depth at which mutation will take place. |
void |
setMaximumExpandDepth(int maxDepth)
When the EXPAND mutation takes place, a randomly chosen terminal is replaced by a subtree, grown with the GROW method. |
void |
setMaximumReplacementDepth(int maxDepth)
When the SUBTREE_REPLACEMENT mutation takes place, a randomly chosen subtree is replaced by a random subtree, of similar size grown with the GROW method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Mutation(Mutation.MutationOperator[] ops)
Method Detail |
---|
public void setExpectedMutationDepth(double depth)
public void collectTransmissionInfo(boolean collect)
public java.util.Vector<double[]> getTransmissionInfo()
public Individual mutate(Individual ind, int maxLength, int maxDepth, PopulationDescriptor popDescriptor) throws InvalidFractionException
maxLength
- The maximum length (number of nodes) of the offspringmaxDepth
- The maximum depth of the offspringpopDescriptor
- This is needed in order to provide the available Components and growFunctionProportion
(determining the proportion of components in a new subtree that are selected as Functions)
InvalidFractionException
public void setConstantMutationStepSize(double stepSize)
public double getConstantMutationStepSize()
public void setMaximumExpandDepth(int maxDepth)
public int getMaximumExpandDepth()
public void setMaximumReplacementDepth(int maxDepth)
public int getMaximumReplacementDepth()
public Mutation.MutationOperator[] getMutationOperators()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |