DistributedConfig

Describes the configuration parameters necessary for the operation of the DistributedGA.

See also

Inheritors

Properties

Link copied to clipboard
abstract val afterEvolution: suspend DistributedEvolveScope<V, F>.() -> Unit

Callback after evolution process. Executed at launch when GA.state is going to be State.FINISHED.

Link copied to clipboard
abstract val beforeEvolution: suspend DistributedEvolveScope<V, F>.() -> Unit

Callback before evolution process. Executed only once at launch if GA.iteration is 0.

Link copied to clipboard
abstract val children: List<GA<V, F>>

Child GAs of DistributedGA. Mutable with add and removeAt.

Link copied to clipboard

Shared statistics: DistributedGA is collector for each child statistics - statistics of DistributedGA includes all statistics of children.

Link copied to clipboard
abstract val evolution: suspend DistributedEvolveScope<V, F>.() -> Unit

Main evolution process.

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

Link copied to clipboard

Parallelism configuration associated with GA.

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

Override base population as DistributedPopulation for DistributedGA.

Link copied to clipboard

Special container for creating and adding children to DistributedConfig.

Link copied to clipboard
abstract var random: Random

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

Link copied to clipboard

Statistics configuration associated with GA.

Link copied to clipboard
abstract val timeStore: TimeStore

Store for all TimeMarkers of GA.

Functions

Link copied to clipboard
abstract fun add(ga: GA<V, F>)

Adds the GA to the end of children.

abstract fun add(index: Int, ga: GA<V, F>)

Inserts a GA into children at the specified index.

Link copied to clipboard
inline fun <V, F> DistributedConfig<V, F>.cGA(population: CellularPopulation<V, F>, noinline fitnessFunction: (V) -> F? = null, config: CellularConfigScope<V, F>.() -> Unit): CellularGA<V, F>

Creates CellularGA as child for DistributedGA using Distributed Inheritance (see DistributedConfig) with Kotlin DSL.

Link copied to clipboard
inline fun <V, F> DistributedConfig<V, F>.cGAs(count: Int, crossinline population: DistributedPopulationMultiFactory.() -> CellularPopulation<V, F>, crossinline fitnessFunction: (index: Int) -> (V) -> F = { this.fitnessFunction }, config: CellularConfigScope<V, F>.(index: Int) -> Unit): List<CellularGA<V, F>>

Creates CellularGAs as children for DistributedGA using Distributed Inheritance (see DistributedConfig) with Kotlin DSL.

Link copied to clipboard
inline fun <V, F> DistributedConfig<V, F>.pGA(population: PanmicticPopulation<V, F>, noinline fitnessFunction: (V) -> F? = null, config: PanmicticConfigScope<V, F>.() -> Unit): PanmicticGA<V, F>

Creates PanmicticGA as child for DistributedGA using Distributed Inheritance (see DistributedConfig) with Kotlin DSL.

Link copied to clipboard
inline fun <V, F> DistributedConfig<V, F>.pGAs(count: Int, crossinline population: DistributedPopulationMultiFactory.() -> PanmicticPopulation<V, F>, crossinline fitnessFunction: (index: Int) -> (V) -> F = { this.fitnessFunction }, config: PanmicticConfigScope<V, F>.(index: Int) -> Unit): List<PanmicticGA<V, F>>

Creates PanmicticGAs as children for DistributedGA using Distributed Inheritance (see DistributedConfig) with Kotlin DSL.

Link copied to clipboard
fun <V, F> DistributedConfig<V, F>.population(dimens: Dimens, name: String? = null, factory: PopulationFactory<V, F>? = null): CellularPopulation<V, F>
fun <V, F> DistributedConfig<V, F>.population(dimens: Dimens, population: Array<Chromosome<V, F>>, name: String? = null, factory: PopulationFactory<V, F>? = null): CellularPopulation<V, F>

Creates CellularPopulation as subpopulation for DistributedGA using Distributed Inheritance (see DistributedConfig).

fun <V, F> DistributedConfig<V, F>.population(population: Array<Chromosome<V, F>>, buffer: Int = 0, name: String? = null, factory: PopulationFactory<V, F>? = null): PanmicticPopulation<V, F>
fun <V, F> DistributedConfig<V, F>.population(size: Int, buffer: Int = 0, name: String? = null, factory: PopulationFactory<V, F>? = null): PanmicticPopulation<V, F>

Creates PanmicticPopulation as subpopulation for DistributedGA using Distributed Inheritance (see DistributedConfig).

Link copied to clipboard
abstract fun removeAt(index: Int): GA<V, F>

Removes a GA at the specified index from children.

Link copied to clipboard
open operator fun GA<V, F>.unaryPlus(): GA<V, F>

Unary operator for adding GA to children.

open operator fun List<GA<V, F>>.unaryPlus(): List<GA<V, F>>

Unary operator for adding list of GAs to children.