MutationOperatorIfc

Strategy interface for the mutation step of a genetic algorithm. Given a single offspring point (its coordinate array in the problem's input order), a mutation operator returns a (possibly) perturbed point. The returned point may be infeasible: the solver converts it with ksl.simopt.problem.ProblemDefinition.toInputMap, which clamps to the input ranges and rounds to granularity. Operators must not mutate the supplied array in place; they return a new array. Randomness is drawn through the supplied solver's single random number stream (GeneticAlgorithmSolver.rnStream).

Inheritors

Functions

Link copied to clipboard
abstract fun mutate(point: DoubleArray, solver: GeneticAlgorithmSolver): DoubleArray

Mutates a single offspring point.