PanmicticEvolveScope

PanmicticEvolveScope - specific EvolveScope for PanmicticGA.

V - value of Chromosome

F - fitness value of Chromosome

Creates with PanmicticEvolveScope().

See also

Properties

Link copied to clipboard
val <V, F> EvolveScope<V, F>.best: Chromosome<V, F>?

The best Chromosome in Population by fitness. Uses a StatisticsConfig.guaranteedSorted for optimization, except in the case of a call from DistributedEvolveScope.

Link copied to clipboard

The best fitness of Chromosome in Population. Uses a StatisticsConfig.guaranteedSorted for optimization, except in the case of a call from DistributedEvolveScope.

Link copied to clipboard
abstract var elitism: Int

Number of elite chromosomes - the best chromosomes of the population, which have privileged rights:

Link copied to clipboard

Population Factory of GA.

Link copied to clipboard

Flag to stop evolution process cause stop condition has been worked.

Link copied to clipboard

Flag to stop evolution process cause the max iteration has been reached.

Link copied to clipboard
abstract var fitnessFunction: (V) -> F

Fitness function - a function that evaluates the quality or "fitness" of each individual (chromosome) in a population. The fitness function determines how well a particular solution matches the target problem. It can be changed.

Link copied to clipboard
abstract val iteration: Int

Current iteration of genetic algorithm.

Link copied to clipboard
@get:JvmName(name = "getMeanDouble")
val EvolveScope<*, Double>.mean: Double
@get:JvmName(name = "getMeanInt")
val EvolveScope<*, Int>.mean: Double
@get:JvmName(name = "getMeanLong")
val EvolveScope<*, Long>.mean: Double

Mean fitness value of chromosomes in Population

Link copied to clipboard
@get:JvmName(name = "getMedianDouble")
val EvolveScope<*, Double>.median: Double
@get:JvmName(name = "getMedianInt")
val EvolveScope<*, Int>.median: Double
@get:JvmName(name = "getMedianLong")
val EvolveScope<*, Long>.median: Double

Median fitness value of chromosomes in Population

Link copied to clipboard

Population Name of GA.

Link copied to clipboard

Store parallelism configuration for GA. Determines genetic operators process.

Link copied to clipboard
abstract override val population: PanmicticPopulation<V, F>

Override base population as PanmicticPopulation for PanmicticGA.

Link copied to clipboard
abstract val random: Random

Random associated with GA. Defines a pseudorandom number generator for predictive calculations.

Link copied to clipboard
val EvolveScope<*, *>.size: Int

Population Size of GA.

Link copied to clipboard

Statistics configuration associated with GA.

Link copied to clipboard
abstract val store: MutableMap<String, Any?>

Store serves to synchronize between iterations of GA.

Link copied to clipboard

Duration between current and previous iteration.

Link copied to clipboard
abstract val timeStore: TimeStore

Store for all TimeMarkers of GA.

Link copied to clipboard

The worst Chromosome in Population by fitness. Uses a StatisticsConfig.guaranteedSorted for optimization, except in the case of a call from DistributedEvolveScope.

Link copied to clipboard

The worst fitness of Chromosome in Population. Uses a StatisticsConfig.guaranteedSorted for optimization, except in the case of a call from DistributedEvolveScope.

Functions

Link copied to clipboard
suspend fun <V, F> PanmicticEvolveScope<V, F>.adjustSize(step: Int, evaluateBuffered: Boolean = true, parallelismLimit: Int = parallelismConfig.workersCount, fitnessFunction: (V) -> F = this.fitnessFunction)
Link copied to clipboard

Creates Statistic for best fitness of Chromosome in Population.

Link copied to clipboard
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.

Link copied to clipboard
@JvmName(name = "cxBlendDoubleArray")
suspend fun <F> PanmicticEvolveScope<DoubleArray, F>.cxBlend(chance: Double, alpha: Double, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)
@JvmName(name = "cxBlendFloatArray")
suspend fun <F> PanmicticEvolveScope<FloatArray, F>.cxBlend(chance: Double, alpha: Float, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)

Executes a blend crossover that modify in-place the input chromosomes. The blend crossover expects Chromosome.value of floating point numbers.

Link copied to clipboard
@JvmName(name = "cxKPointArray")
suspend fun <T, F> PanmicticEvolveScope<Array<T>, F>.cxKPoint(chance: Double, count: Int, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)
@JvmName(name = "cxKPointBooleanArray")
suspend fun <F> PanmicticEvolveScope<BooleanArray, F>.cxKPoint(chance: Double, count: Int, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)
@JvmName(name = "cxKPointByteArray")
suspend fun <F> PanmicticEvolveScope<ByteArray, F>.cxKPoint(chance: Double, count: Int, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)
@JvmName(name = "cxKPointCharArray")
suspend fun <F> PanmicticEvolveScope<CharArray, F>.cxKPoint(chance: Double, count: Int, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)
@JvmName(name = "cxKPointDoubleArray")
suspend fun <F> PanmicticEvolveScope<DoubleArray, F>.cxKPoint(chance: Double = 0.9, count: Int, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)
@JvmName(name = "cxKPointFloatArray")
suspend fun <F> PanmicticEvolveScope<FloatArray, F>.cxKPoint(chance: Double, count: Int, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)
@JvmName(name = "cxKPointIntArray")
suspend fun <F> PanmicticEvolveScope<IntArray, F>.cxKPoint(chance: Double, count: Int, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)
@JvmName(name = "cxKPointLongArray")
suspend fun <F> PanmicticEvolveScope<LongArray, F>.cxKPoint(chance: Double, count: Int, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)
@JvmName(name = "cxKPointShortArray")
suspend fun <F> PanmicticEvolveScope<ShortArray, F>.cxKPoint(chance: Double, count: Int, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)
@JvmName(name = "cxKPointMutableList")
suspend fun <T, F> PanmicticEvolveScope<MutableList<T>, F>.cxKPoint(chance: Double, count: Int, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)

Executes a K point crossover on the input sequence individuals. The two values are modified in place.

Link copied to clipboard
@JvmName(name = "cxOnePointArray")
suspend fun <T, F> PanmicticEvolveScope<Array<T>, F>.cxOnePoint(chance: Double, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)
@JvmName(name = "cxOnePointBooleanArray")
suspend fun <F> PanmicticEvolveScope<BooleanArray, F>.cxOnePoint(chance: Double, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)
@JvmName(name = "cxOnePointByteArray")
suspend fun <F> PanmicticEvolveScope<ByteArray, F>.cxOnePoint(chance: Double, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)
@JvmName(name = "cxOnePointCharArray")
suspend fun <F> PanmicticEvolveScope<CharArray, F>.cxOnePoint(chance: Double, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)
@JvmName(name = "cxOnePointDoubleArray")
suspend fun <F> PanmicticEvolveScope<DoubleArray, F>.cxOnePoint(chance: Double = 0.9, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)
@JvmName(name = "cxOnePointFloatArray")
suspend fun <F> PanmicticEvolveScope<FloatArray, F>.cxOnePoint(chance: Double, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)
@JvmName(name = "cxOnePointIntArray")
suspend fun <F> PanmicticEvolveScope<IntArray, F>.cxOnePoint(chance: Double, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)
@JvmName(name = "cxOnePointLongArray")
suspend fun <F> PanmicticEvolveScope<LongArray, F>.cxOnePoint(chance: Double, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)
@JvmName(name = "cxOnePointShortArray")
suspend fun <F> PanmicticEvolveScope<ShortArray, F>.cxOnePoint(chance: Double, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)
@JvmName(name = "cxOnePointMutableList")
suspend fun <T, F> PanmicticEvolveScope<MutableList<T>, F>.cxOnePoint(chance: Double, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)

Executes a one point crossover on the input sequence individuals. The two values are modified in place.

Link copied to clipboard
@JvmName(name = "cxOrderedIntArray")
suspend fun <F> PanmicticEvolveScope<IntArray, F>.cxOrdered(chance: Double, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)

Executes an ordered crossover (OX) on the input chromosome values. The two value are modified in place. This crossover expects Chromosome.value as IntArray. Mixes indexes without conflicts, preserving parental relationships.

Link copied to clipboard
@JvmName(name = "cxSimulatedBinaryDoubleArray")
suspend fun <F> PanmicticEvolveScope<DoubleArray, F>.cxSimulatedBinary(chance: Double, eta: Double, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)

Executes a simulated binary crossover that modify in-place the input chromosomes. The simulated binary crossover expects Chromosome.value of floating point numbers.

Link copied to clipboard
@JvmName(name = "cxSimulatedBinaryBoundedDoubleArray")
suspend fun <F> PanmicticEvolveScope<DoubleArray, F>.cxSimulatedBinaryBounded(chance: Double, eta: Double, low: Double, up: Double, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)

Executes a simulated binary crossover that modify in-place the input chromosomes. The simulated binary crossover expects Chromosome.value of floating point numbers.

Link copied to clipboard
@JvmName(name = "cxUniformArray")
suspend fun <T, F> PanmicticEvolveScope<Array<T>, F>.cxUniform(chance: Double, chanceUniform: Double, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)
@JvmName(name = "cxUniformBooleanArray")
suspend fun <F> PanmicticEvolveScope<BooleanArray, F>.cxUniform(chance: Double, chanceUniform: Double, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)
@JvmName(name = "cxUniformByteArray")
suspend fun <F> PanmicticEvolveScope<ByteArray, F>.cxUniform(chance: Double, chanceUniform: Double, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)
@JvmName(name = "cxUniformCharArray")
suspend fun <F> PanmicticEvolveScope<CharArray, F>.cxUniform(chance: Double, chanceUniform: Double, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)
@JvmName(name = "cxUniformDoubleArray")
suspend fun <F> PanmicticEvolveScope<DoubleArray, F>.cxUniform(chance: Double = 0.9, chanceUniform: Double, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)
@JvmName(name = "cxUniformFloatArray")
suspend fun <F> PanmicticEvolveScope<FloatArray, F>.cxUniform(chance: Double, chanceUniform: Double, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)
@JvmName(name = "cxUniformIntArray")
suspend fun <F> PanmicticEvolveScope<IntArray, F>.cxUniform(chance: Double, chanceUniform: Double, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)
@JvmName(name = "cxUniformLongArray")
suspend fun <F> PanmicticEvolveScope<LongArray, F>.cxUniform(chance: Double, chanceUniform: Double, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)
@JvmName(name = "cxUniformShortArray")
suspend fun <F> PanmicticEvolveScope<ShortArray, F>.cxUniform(chance: Double, chanceUniform: Double, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)
@JvmName(name = "cxUniformMutableList")
suspend fun <T, F> PanmicticEvolveScope<MutableList<T>, F>.cxUniform(chance: Double, chanceUniform: Double, parallelismLimit: Int = parallelismConfig.workersCount, crossoverType: CrossoverType = CrossoverType.Iterative)

Executes a uniform crossover that modify in-place the input chromosomes. The attributes are swapped according to the chanceUniform probability.

Link copied to clipboard
abstract suspend fun emitStat(value: StatisticNote<Any?>)
Link copied to clipboard
inline suspend fun <V, F> EvolveScope<V, F>.evaluateAll(start: Int, end: Int, parallelismLimit: Int, crossinline fitnessFunction: (V) -> F)

Base evaluates function for all chromosomes in Population by fitnessFunction

Link copied to clipboard
suspend fun <V, F> PanmicticEvolveScope<V, F>.evaluation(parallelismLimit: Int = parallelismConfig.workersCount, evaluateElite: Boolean = false, sortAfter: Boolean = false, fitnessFunction: (V) -> F = this.fitnessFunction)

Performs a fitness calculation step for chromosomes in the population.

Link copied to clipboard

If Population is not initialized - Fills a Population with randomly generated Chromosomes by Population.factory.

Link copied to clipboard
inline suspend fun <V, F> PanmicticEvolveScope<V, F>.iterativeCrossover(chance: Double, parallelismLimit: Int, crossinline crossover: suspend (chromosome1: Chromosome<V, F>, chromosome2: Chromosome<V, F>, random: Random) -> Unit)

Executes CrossoverType.Iterative crossing.

Link copied to clipboard
inline suspend fun <V, F> PanmicticEvolveScope<V, F>.mutation(chance: Double, parallelismLimit: Int, crossinline mutation: (chromosome: Chromosome<V, F>, random: Random) -> Unit)

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

Link copied to clipboard
@JvmName(name = "mutFlipBitBooleanArray")
suspend fun <F> PanmicticEvolveScope<BooleanArray, F>.mutFlipBit(chance: Double, flipBitChance: Double, parallelismLimit: Int = parallelismConfig.workersCount)
@JvmName(name = "mutFlipBitIntArray")
suspend fun <F> PanmicticEvolveScope<IntArray, F>.mutFlipBit(chance: Double, flipBitChance: Double, parallelismLimit: Int = parallelismConfig.workersCount)

Flip the value of the attributes of the input chromosome. The chromosome is expected to be a BooleanArray. This mutation is usually applied on boolean individuals.

Link copied to clipboard
suspend fun <F> PanmicticEvolveScope<DoubleArray, F>.mutGaussian(mean: Double, stddev: Double, chance: Double, gaussianChance: Double, parallelismLimit: Int = parallelismConfig.workersCount)

Applies a gaussian mutation of mean mean and standard deviation stddev on the input chromosome. This mutation expects Chromosome.value of floating point numbers.

Link copied to clipboard
suspend fun <F> PanmicticEvolveScope<DoubleArray, F>.mutPolynomialBounded(eta: Double, low: Double, up: Double, chance: Double, polynomialBoundedChance: Double, parallelismLimit: Int = parallelismConfig.workersCount)

Polynomial mutation as implemented in original NSGA-II algorithm in C by Deb. This mutation expects Chromosome.value of floating point numbers.

Link copied to clipboard
@JvmName(name = "mutShuffleIndexesArray")
suspend fun <T, F> PanmicticEvolveScope<Array<T>, F>.mutShuffleIndexes(chance: Double, shuffleIndexesChance: Double, parallelismLimit: Int = parallelismConfig.workersCount)
@JvmName(name = "mutShuffleIndexesBooleanArray")
suspend fun <F> PanmicticEvolveScope<BooleanArray, F>.mutShuffleIndexes(chance: Double, shuffleIndexesChance: Double, parallelismLimit: Int = parallelismConfig.workersCount)
@JvmName(name = "mutShuffleIndexesByteArray")
suspend fun <F> PanmicticEvolveScope<ByteArray, F>.mutShuffleIndexes(chance: Double, shuffleIndexesChance: Double, parallelismLimit: Int = parallelismConfig.workersCount)
@JvmName(name = "mutShuffleIndexesCharArray")
suspend fun <F> PanmicticEvolveScope<CharArray, F>.mutShuffleIndexes(chance: Double, shuffleIndexesChance: Double, parallelismLimit: Int = parallelismConfig.workersCount)
@JvmName(name = "mutShuffleIndexesDoubleArray")
suspend fun <F> PanmicticEvolveScope<DoubleArray, F>.mutShuffleIndexes(chance: Double, shuffleIndexesChance: Double, parallelismLimit: Int = parallelismConfig.workersCount)
@JvmName(name = "mutShuffleIndexesFloatArray")
suspend fun <F> PanmicticEvolveScope<FloatArray, F>.mutShuffleIndexes(chance: Double, shuffleIndexesChance: Double, parallelismLimit: Int = parallelismConfig.workersCount)
@JvmName(name = "mutShuffleIndexesIntArray")
suspend fun <F> PanmicticEvolveScope<IntArray, F>.mutShuffleIndexes(chance: Double, shuffleIndexesChance: Double, parallelismLimit: Int = parallelismConfig.workersCount)
@JvmName(name = "mutShuffleIndexesLongArray")
suspend fun <F> PanmicticEvolveScope<LongArray, F>.mutShuffleIndexes(chance: Double, shuffleIndexesChance: Double, parallelismLimit: Int = parallelismConfig.workersCount)
@JvmName(name = "mutShuffleIndexesShortArray")
suspend fun <F> PanmicticEvolveScope<ShortArray, F>.mutShuffleIndexes(chance: Double, shuffleIndexesChance: Double, parallelismLimit: Int = parallelismConfig.workersCount)
@JvmName(name = "mutShuffleIndexesMutableList")
suspend fun <T, F> PanmicticEvolveScope<MutableList<T>, F>.mutShuffleIndexes(chance: Double, shuffleIndexesChance: Double, parallelismLimit: Int = parallelismConfig.workersCount)

Executes a shuffle the attributes of the input chromosome. Usually this mutation is applied on vector of indices.

Link copied to clipboard
@JvmName(name = "mutUniformDoubleArray")
suspend fun <F> PanmicticEvolveScope<DoubleArray, F>.mutUniform(low: Double, up: Double, chance: Double, uniformChance: Double, parallelismLimit: Int = parallelismConfig.workersCount)
@JvmName(name = "mutUniformIntArray")
suspend fun <F> PanmicticEvolveScope<IntArray, F>.mutUniform(low: Int, up: Int, chance: Double, uniformChance: Double, parallelismLimit: Int = parallelismConfig.workersCount)
@JvmName(name = "mutUniformLongArray")
suspend fun <F> PanmicticEvolveScope<LongArray, F>.mutUniform(low: Long, up: Long, chance: Double, uniformChance: Double, parallelismLimit: Int = parallelismConfig.workersCount)

Executes a uniform mutation for the attributes of the input chromosome.

Link copied to clipboard
inline suspend fun EvolveScope<*, *>.parallelProcess(parallelismLimit: Int, startIteration: Int, endIteration: Int, crossinline action: suspend (iteration: Int, random: Random) -> Unit)

Iterative parallel process action from startIteration to endIteration.

inline suspend fun EvolveScope<*, *>.parallelProcess(parallelismLimit: Int, startIteration: Int, endIteration: Int, step: Int, crossinline action: suspend (iteration: Int, random: Random) -> Unit)

Iterative parallel process action from startIteration to endIteration with step.

Link copied to clipboard
inline fun EvolveScope<*, *>.process(parallelismLimit: Int, sequential: () -> Unit, parallel: () -> Unit)

Process action with sequential or parallel mode.

inline suspend fun EvolveScope<*, *>.process(parallelismLimit: Int, startIteration: Int, endIteration: Int, crossinline action: suspend (iteration: Int, random: Random) -> Unit)

Iterative process action from startIteration to endIteration.

inline suspend fun EvolveScope<*, *>.process(parallelismLimit: Int, startIteration: Int, endIteration: Int, step: Int, crossinline action: suspend (iteration: Int, random: Random) -> Unit)

Iterative process action from startIteration to endIteration with step.

Link copied to clipboard
inline fun EvolveScope<*, *>.randomByChance(chance: Double, action: () -> Unit)

Execute action with probability chance (0.0 < 1.0)

Link copied to clipboard
inline suspend fun <V, F> PanmicticEvolveScope<V, F>.randomlyCrossover(chance: Double, parallelismLimit: Int, crossinline crossover: suspend (chromosome1: Chromosome<V, F>, chromosome2: Chromosome<V, F>, random: Random) -> Unit)

Executes CrossoverType.Randomly crossing.

Link copied to clipboard
suspend fun <V, F> PanmicticEvolveScope<V, F>.resize(newSize: Int? = null, newBuffer: Int? = null, evaluateBuffered: Boolean = true, parallelismLimit: Int = parallelismConfig.workersCount, fitnessFunction: (V) -> F = this.fitnessFunction)
Link copied to clipboard
fun <V, F> PanmicticEvolveScope<V, F>.selBest(count: Int, fillWithSelected: Boolean = true)

Executes best selection step for Population.

Link copied to clipboard
inline suspend fun <V, F> PanmicticEvolveScope<V, F>.selection(parallelismLimit: Int, crossinline selection: (source: Array<Chromosome<V, F>>, random: Random) -> Chromosome<V, F>)

Performs a selection step for population in PanmicticGA.

Link copied to clipboard
inline suspend fun <V, F> PanmicticEvolveScope<V, F>.selectionWithIndex(parallelismLimit: Int, crossinline selection: (index: Int, source: Array<Chromosome<V, F>>, random: Random) -> Chromosome<V, F>)

Performs a selection step for population in PanmicticGA. Suitable for selection mechanisms where behavior depends on indices. For example: selTournament

Link copied to clipboard
suspend fun <V, F> PanmicticEvolveScope<V, F>.selRandom(parallelismLimit: Int = ParallelismConfig.NO_PARALLELISM)

Executes random selection step for Population:

Link copied to clipboard
@JvmName(name = "selRouletteFitByte")
suspend fun <V> PanmicticEvolveScope<V, Byte>.selRoulette(parallelismLimit: Int = ParallelismConfig.NO_PARALLELISM)
@JvmName(name = "selRouletteFitDouble")
suspend fun <V> PanmicticEvolveScope<V, Double>.selRoulette(parallelismLimit: Int = ParallelismConfig.NO_PARALLELISM)
@JvmName(name = "selRouletteFitFloat")
suspend fun <V> PanmicticEvolveScope<V, Float>.selRoulette(parallelismLimit: Int = ParallelismConfig.NO_PARALLELISM)
@JvmName(name = "selRouletteFitInt")
suspend fun <V> PanmicticEvolveScope<V, Int>.selRoulette(parallelismLimit: Int = ParallelismConfig.NO_PARALLELISM)
@JvmName(name = "selRouletteFitLong")
suspend fun <V> PanmicticEvolveScope<V, Long>.selRoulette(parallelismLimit: Int = ParallelismConfig.NO_PARALLELISM)
@JvmName(name = "selRouletteFitShort")
suspend fun <V> PanmicticEvolveScope<V, Short>.selRoulette(parallelismLimit: Int = ParallelismConfig.NO_PARALLELISM)

Executes roulette selection step for Population:

Link copied to clipboard
suspend fun <V, F> PanmicticEvolveScope<V, F>.selTournament(size: Int, parallelismLimit: Int = ParallelismConfig.NO_PARALLELISM)
suspend fun <V, F> PanmicticEvolveScope<V, F>.selTournament(percent: Double, size: Int, parallelismLimit: Int = ParallelismConfig.NO_PARALLELISM)

Executes tournament selection step for Population:

Link copied to clipboard
fun <V, F> PanmicticEvolveScope<V, F>.selWorst(count: Int, fillWithSelected: Boolean = true)

Executes worst selection step for Population.

Link copied to clipboard
inline fun <V, F> EvolveScope<V, F>.shake(percent: Double): Pair<Int, Int>

Shake percent*100% population with Population.reset function.

fun <V, F> EvolveScope<V, F>.shake(from: Int, to: Int)

Shake population with Population.reset function.

Link copied to clipboard

Creates Statistic for size of Population

Link copied to clipboard
suspend fun EvolveScope<*, *>.stat(statistic: Statistic<Any?>)
@JvmName(name = "statValue")
suspend fun EvolveScope<*, *>.stat(pair: Pair<String, Any?>)
@JvmName(name = "statRegister")
suspend fun EvolveScope<*, *>.stat(pair: Pair<String, () -> Any?>)
suspend fun EvolveScope<*, *>.stat(name: String, value: Any?)
suspend fun EvolveScope<*, *>.stat(vararg statistics: Statistic<Any?>)
@JvmName(name = "statValue")
suspend fun EvolveScope<*, *>.stat(vararg pairs: Pair<String, Any?>)
@JvmName(name = "statRegister")
suspend fun EvolveScope<*, *>.stat(vararg pairs: Pair<String, () -> Any?>)
inline suspend fun EvolveScope<*, *>.stat(name: String, registrar: () -> Any?)

Creates SingleStatisticNote and send it to GA.statisticsProvider Use registrar function

Link copied to clipboard
inline fun <V, F> EvolveScope<V, F>.stopBy(stopCondition: EvolveScope<V, F>.() -> Boolean)

Stop and finish GA if stopCondition return true.

inline fun <V, F> EvolveScope<V, F>.stopBy(maxIteration: Int = Int.MAX_VALUE)

Stop and finish GA if iteration more or equal to maxIteration.

inline fun <V, F> EvolveScope<V, F>.stopBy(maxIteration: Int = Int.MAX_VALUE, stopCondition: EvolveScope<V, F>.() -> Boolean)

Stop and finish GA if:

Link copied to clipboard
Link copied to clipboard

Creates Statistic for worst fitness of Chromosome in Population.