When applied to a chromosome, this chooses a second random chromosome to 'crossover' with. A random node in each is chosen, and the node in this chromosome is replaced by the node from the selected chromosome, along with everything under it. More...
#include <CrossoverMutator.h>
Public Member Functions | |
virtual UBTChromosome * | Mutate (UBTChromosome *chromosome, TArray< UBTChromosome * > parents, int primaryParent) |
Public Member Functions inherited from UMutator | |
virtual void | Init (UServiceInjector *injector) |
Additional Inherited Members | |
Public Attributes inherited from UMutator | |
virtual UBTChromosome * | Mutate (UBTChromosome *chromosome, TArray< UBTChromosome * > parents, int primaryParent) PURE_VIRTUAL(UMutator |
Protected Attributes inherited from UMutator | |
UServiceInjector * | serviceInjector |
When applied to a chromosome, this chooses a second random chromosome to 'crossover' with. A random node in each is chosen, and the node in this chromosome is replaced by the node from the selected chromosome, along with everything under it.
The parent with which to swap a branch is selected uniformly at random, and the branch is also selected uniformly at random from each tree. Therefore, this may grow or shrink a chromosome.