selRoulette

@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)
@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)

Executes roulette selection step for Population:

It is assumed that all individuals are "placed" on the roulette wheel.

For example, if you have 4 individuals with fitness 1, 2, 3, and 4, each of them will have its own "share" of the total 10 (1/10, 2/10, 3/10, and 4/10). A random number is generated between 0 and the total fitness (e.g. 10). The roulette wheel is spun and the random number "falls" on a sector, which corresponds to one of the individuals that will be selected.

Parameters

parallelismLimit

limit of parallel workers