Package-level declarations

Types

Link copied to clipboard
interface CellEvolveScope<V, F>

CellEvolveScope - evolveScope for cellular evolutionary strategy based on the evolution of a cell dependent on its neighbors.

Link copied to clipboard

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

Link copied to clipboard
class CellularConfigScope<V, F>(val population: CellularPopulation<V, F>, var fitnessFunction: (V) -> F) : AbstractConfigScope<V, F, CellularEvolveScope<V, F>> , CellularConfig<V, F>

Implementation of CellularConfig based on AbstractConfigScope. Params population and fitnessFunction are considered mandatory.

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

CellularGA - cellular genetic algorithm (cGA).

Link copied to clipboard

CellularNeighborhood - basic interface defining neighborhood parameters for CellularGA.

Link copied to clipboard
Link copied to clipboard
sealed interface CellularType

CellularGA supports SS supports two modes of operation, called types:

Link copied to clipboard
value class Dimens(val value: IntArray)

Dimens describes the dimensions of n-dimensional space of a CellularPopulation for CellularGA.

Link copied to clipboard
sealed interface UpdatePolicy

UpdatePolicy - renewal policy determining the order of chromosome's evolution in CellularGA with CellularType.Asynchronous type.

Functions

Link copied to clipboard
fun <V, F> CellularConfigScope<V, F>.after(afterEvolution: suspend CellularEvolveScope<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> CellularConfigScope<V, F>.before(useDefault: Boolean = true, beforeEvolution: suspend CellularEvolveScope<V, F>.() -> Unit)

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

Link copied to clipboard
fun <V, F> CellularEvolveScope<V, F>.CellEvolveScope(cellChromosome: Chromosome<V, F>, neighbors: Array<Chromosome<V, F>>, random: Random): CellEvolveScope<V, F>

Creates an instance of CellEvolveScope.

Link copied to clipboard
fun <V, F> CellularEvolveScope(cellularGA: CellularGA<V, F>, cellularConfig: CellularConfig<V, F>): CellularEvolveScope<V, F>

Creates an instance of CellularEvolveScope by cellularGA and cellularConfig.

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

Creates CellularGA with Kotlin DSL.

Link copied to clipboard
fun <V, F> CellularConfigScope<V, F>.evolve(evolution: suspend CellularEvolveScope<V, F>.() -> Unit)

Applies evolutionary strategy for CellularGA (Cellular Genetic Algorithm) as evolution function in CellularEvolveScope that includes the process of changing the population for one iteration.

Link copied to clipboard

Creates ParallelismConfig with ParallelismConfigScope and apply it to the current CellularConfig.

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