| xegaGpMutateFilterGene {xegaGpGene} | R Documentation |
Mutate a gene (with a node filter)
Description
xegaGpMutateGeneFilter() replaces
a randomly selected subtree by
a random derivation tree with the same root symbol
with small probability.
Only non-terminal nodes with a depth
between lF$MinMutInsertionDepth() and
lF$MaxMutInsertionDepth() are considered
as tree insertion points.
Depth-bounds are respected.
Usage
xegaGpMutateFilterGene(g, lF)
Arguments
g |
Derivation tree. |
lF |
Local configuration of the genetic algorithm. |
Details
Mutation is controlled by three local parameters:
-
lF$MaxMutDepth()controls the maximal depth of of the new random generation tree. -
lF$MinMutInsertionDepth()andlF$MaxMutInsertionDepth()control the possible insertion points for the new random derivation tree. The depth of the insertion node must be betweenlF$MinMutInsertionDepth()andlF$MaxMutInsertionDepth().
Value
Derivation tree.
See Also
Other Mutation:
xegaGpMutateAllGene()
Examples
gene1<-xegaGpInitGene(lFxegaGpGene)
xegaGpDecodeGene(gene1, lFxegaGpGene)
gene<-xegaGpMutateFilterGene(gene1, lFxegaGpGene)
xegaGpDecodeGene(gene, lFxegaGpGene)