kgp.tree / Tree / subtreeMutation

subtreeMutation

fun subtreeMutation(): Unit

Performs the subtree mutation operation on this tree.

This is achieved by creating a new randomly generated tree and performing crossover with that new randomly generated tree.

Note that this operation directly modifies the tree that initiates the operation.