CrossoverOperatorIfc

Strategy interface for the crossover (recombination) step of a genetic algorithm. Given the input values of two parent points, a crossover operator produces one or more offspring points. The offspring are returned as raw coordinate arrays (in the problem's input order) and need not be feasible: the solver converts each offspring with ksl.simopt.problem.ProblemDefinition.toInputMap, which clamps to the input ranges and rounds to granularity. Operators draw any required randomness through the supplied solver's single random number stream (GeneticAlgorithmSolver.rnStream).

Inheritors

Functions

Link copied to clipboard
abstract fun crossover(parent1: DoubleArray, parent2: DoubleArray, solver: GeneticAlgorithmSolver): List<DoubleArray>

Recombines two parents into one or more offspring.