-
Notifications
You must be signed in to change notification settings - Fork 5
Mutation Procedure
This method implements a strongly-typed version of the "Point Mutation" operator as described in Koza I with a slight variation. Koza doesn't have any tree depth restrictions on his mutation operator. This one does. If the tree gets deeper than the maximum tree depth, then the new subtree is rejected and another one is tried. Similar to how the Crosssover operator is implemented.
Mutated trees are restricted to being maxdepth depth at most. If in n attempts, the method cannot come up with a mutated tree within the depth limit, then it simply copies the original individual wholesale with no mutation.
The generation of the mutated subtree can be done using any tree generation method (Grow, Full, Half...). The standard though is Grow.
One additional feature: if a equal variable is set to true, then the method will attempt to replace the subtree with a tree of approximately equal size. How this is done exactly, and how close it is, is entirely up to the method's tree builder -- for example, Grow/Full/HalfBuilder don't support this at all, while RandomBranch method would replace it with a tree of the same size or "slightly smaller".