xegaGpMutateAllGene {xegaGpGene}R Documentation

Mutate a gene.

Description

xegaGpMutateAllGene() replaces a randomly selected subtree by a random derivation tree with the same root symbol with small probability. All non-terminal nodes are considered as insertion points. Depth-bounds are respected.

Usage

xegaGpMutateAllGene(g, lF)

Arguments

g

Derivation tree.

lF

Local configuration of the genetic algorithm.

Details

Mutation is controlled by one local parameter:

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

This version of the genetic operator skips the filter loop.

Value

Derivation tree.

See Also

Other Mutation: xegaGpMutateFilterGene()

Examples

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


[Package xegaGpGene version 1.0.0.0 Index]