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:

  1. lF$MaxMutDepth() controls the maximal depth of of the new random generation tree.

  2. lF$MinMutInsertionDepth() and lF$MaxMutInsertionDepth() control the possible insertion points for the new random derivation tree. The depth of the insertion node must be between lF$MinMutInsertionDepth() and lF$MaxMutInsertionDepth().

Value

Derivation tree.

See Also

Other Mutation: xegaGpMutateAllGene()

Examples

gene1<-xegaGpInitGene(lFxegaGpGene)
xegaGpDecodeGene(gene1, lFxegaGpGene)
gene<-xegaGpMutateFilterGene(gene1, lFxegaGpGene)
xegaGpDecodeGene(gene, lFxegaGpGene)


[Package xegaGpGene version 1.0.0.0 Index]