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) |
![]() | |
virtual void | Init (UServiceInjector *injector) |
Additional Inherited Members | |
![]() | |
virtual UBTChromosome * | Mutate (UBTChromosome *chromosome, TArray< UBTChromosome * > parents, int primaryParent) PURE_VIRTUAL(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.