shake By
inline suspend fun <V, F, ES : EvolveScope<V, F>> ES.shakeBy(from: Int, to: Int, evaluateNew: Boolean = true, parallelismLimit: Int = parallelismConfig.workersCount, noinline fitnessFunction: (V) -> F = this.fitnessFunction, predicate: ES.() -> Boolean)
Shake population with Population.reset function if predicate is true.
Parameters
from
index from shaking start (inclusive)
to
index to shaking end (exclusive)
evaluate New
if true (default) evaluates new chromosome after shaking
parallelism Limit
limit of parallel workers (for evaluation)
fitness Function
fitnessFunction for evaluation
inline suspend fun <V, F, ES : EvolveScope<V, F>> ES.shakeBy(percent: Double, evaluateNew: Boolean = true, parallelismLimit: Int = parallelismConfig.workersCount, noinline fitnessFunction: (V) -> F = this.fitnessFunction, predicate: ES.() -> Boolean)
Shake percent*100% population with Population.reset function if predicate is true.
Parameters
percent
in range 0.0..1.0
evaluate New
if true (default) evaluates new chromosome after shaking
parallelism Limit
limit of parallel workers (for evaluation)
fitness Function
fitnessFunction for evaluation