crossover

inline suspend fun <V, F> PanmicticEvolveScope<V, F>.crossover(chance: Double, parallelismLimit: Int, crossoverType: CrossoverType, crossinline crossover: suspend (chromosome1: Chromosome<V, F>, chromosome2: Chromosome<V, F>, random: Random) -> Unit)

Performs a crossover step for population in PanmicticGA that modify in-place the input chromosomes.

Welcome to use for your own implementations! It is a base function for executing crossover step in PanmicticGA.

Parameters

chance

chance of crossover between a pair of chromosomes

parallelismLimit

limit of parallel workers

crossoverType

describes the strategy of the crossing stage in PanmicticGA

crossover

specific crossing action (How chromosomes will be crossed)

See also