Package-level declarations

Types

Link copied to clipboard

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

Link copied to clipboard
class DistributedConfigScope<V, F>(factory: PopulationFactory<V, F>, var fitnessFunction: (V) -> F, populationName: String, children: List<GA<V, F>>) : AbstractConfigScope<V, F, DistributedEvolveScope<V, F>> , DistributedConfig<V, F>

Implementation of DistributedConfig based on AbstractConfigScope. Params factory and fitnessFunction are considered mandatory.

Link copied to clipboard
interface DistributedGA<V, F> : GA<V, F>

DistributedGA - also known as the island genetic algorithm (dGA).

Link copied to clipboard

DistributedPopulation - specific Population of Chromosome for DistributedGA. Organizes access to subpopulations of child GAs as one general population. Tightly tied to the owner's children (DistributedGA.children).

Link copied to clipboard

Factory for building DistributedPopulation by subpopulations with populationIndex.

Link copied to clipboard
sealed interface EvolveScopeStartOption

Specific DistributedEvolveScope option for starting children of DistributedGA.

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun <V, F> DistributedConfigScope<V, F>.after(afterEvolution: suspend DistributedEvolveScope<V, F>.() -> Unit)

Callback after evolution process which will be invoked when GA.state is going to be State.FINISHED.

Link copied to clipboard
fun <V, F> DistributedConfigScope<V, F>.before(beforeEvolution: suspend DistributedEvolveScope<V, F>.() -> Unit)

Callback before evolution process which will be invoked if GA.iteration is 0.

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> dGA(noinline factory: PopulationFactory<V, F>, noinline fitnessFunction: (V) -> F, populationName: String = DistributedPopulation.DEFAULT_DISTRIBUTED_POPULATION_NAME, children: List<GA<V, F>> = emptyList(), config: DistributedConfigScope<V, F>.() -> Unit): DistributedGA<V, F>

Creates DistributedGA with Kotlin DSL.

Link copied to clipboard
fun <V, F> DistributedEvolveScope(distributedGA: DistributedGA<V, F>, distributedConfig: DistributedConfig<V, F>): DistributedEvolveScope<V, F>
Link copied to clipboard
fun <V, F> DistributedConfigScope<V, F>.evolve(useDefault: Boolean = true, evolution: suspend DistributedEvolveScope<V, F>.() -> Unit)

Applies evolutionary strategy for DistributedGA (The most famous type of DistributedGA is the Island Generic Algorithm) as evolution function in DistributedEvolveScope that includes the process of launching child GAs (DistributedGA.children) and processes of interaction between subpopulations.

Link copied to clipboard
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> population(name: String, factory: PopulationFactory<V, F>, subpopulations: MutableList<Population<V, F>> = mutableListOf()): DistributedPopulation<V, F>
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).