Uniform Crossover
class UniformCrossover(swapProbability: Double = defaultSwapProbability) : CrossoverOperatorIfc(source)
Uniform crossover: an alternate crossover operator. For each coordinate independently, the two parents' values are swapped with probability swapProbability; otherwise they are inherited as is. Two complementary offspring are produced. The returned points are not clamped or rounded; the solver does that via ksl.simopt.problem.ProblemDefinition.toInputMap.
Parameters
swap Probability
the per-coordinate probability of swapping the parents' values. Must be in 0,1. The default is defaultSwapProbability.
Functions
Link copied to clipboard
open override fun crossover(parent1: DoubleArray, parent2: DoubleArray, solver: GeneticAlgorithmSolver): List<DoubleArray>
Recombines two parents into one or more offspring.