public final class PointMutation extends Object implements GeneticOperator
A node in the parent is selected at random and replaced with another primitive of the same type and arity.
Also known as node replacement mutation.
Constructor and Description |
---|
PointMutation(Random random,
PrimitiveSet primitiveSet)
Creates a
PointMutation that uses the given Random to select nodes to mutate. |
Modifier and Type | Method and Description |
---|---|
Node |
evolve(NodeSelector selector)
Returns a new
Node evolved from existing instances. |
public PointMutation(Random random, PrimitiveSet primitiveSet)
PointMutation
that uses the given Random
to select nodes to mutate.random
- used to randomly select nodes to mutateprimitiveSet
- used to select replacements for nodes selected for mutationpublic Node evolve(NodeSelector selector)
GeneticOperator
Node
evolved from existing instances.evolve
in interface GeneticOperator
selector
- used to select the existing instances to use as a basis for evolving a new instanceNode
evolved from existing instances obtained from selector
OakGP Genetic Programming Framework