crossover

abstract fun crossover(parent1: DoubleArray, parent2: DoubleArray, solver: GeneticAlgorithmSolver): List<DoubleArray>(source)

Recombines two parents into one or more offspring.

Return

the offspring as a list of coordinate arrays, each the same length as the parents. The returned points may be infeasible; the solver clamps and rounds them.

Parameters

parent1

the input values of the first parent (problem input order)

parent2

the input values of the second parent (problem input order). Has the same length as parent1.

solver

the genetic algorithm solver requesting the crossover. Provides access to the random number stream and the problem definition.