CellularGA

interface CellularGA<V, F> : GA<V, F>

CellularGA - cellular genetic algorithm (cGA).

V - value of Chromosome

F - fitness value of Chromosome

A cellular genetic algorithm is a kind of genetic algorithm in which individuals cannot mate arbitrarily, but every one interacts with its closer neighbors on which a basic evolution strategy is applied (selection, crossover, mutation, evaluation).

Creates with Kotlin DSL by cGA.

See also

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Duration between all subsessions of Session.

Link copied to clipboard

Creates SessionsInfo that describes all activity of GA.

Link copied to clipboard
val <V, F> GA<V, F>.best: Chromosome<V, F>?

The best Chromosome in Population by fitness.

Link copied to clipboard
val <V, F> GA<V, F>.bestFitness: F?

The best fitness of Chromosome in Population.

Link copied to clipboard

Cellular type for CellularGA.

Link copied to clipboard
abstract var elitism: Boolean

Flag for elitism in CellularGA.

Link copied to clipboard

Population Factory of GA.

Link copied to clipboard
abstract var 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. It can be changed.

Link copied to clipboard
abstract val isActive: Boolean

Return true if GA is active.

Link copied to clipboard
abstract val iteration: Int

Current iteration of genetic algorithm.

Link copied to clipboard
@get:JvmName(name = "getMeanDouble")
val GA<*, Double>.mean: Double
@get:JvmName(name = "getMeanInt")
val GA<*, Int>.mean: Double
@get:JvmName(name = "getMeanLong")
val GA<*, Long>.mean: Double

Mean fitness value of chromosomes in Population

Link copied to clipboard
@get:JvmName(name = "getMedianDouble")
val GA<*, Double>.median: Double
@get:JvmName(name = "getMedianInt")
val GA<*, Int>.median: Double
@get:JvmName(name = "getMedianLong")
val GA<*, Long>.median: Double

Median fitness value of chromosomes in Population

Link copied to clipboard
val GA<*, *>.name: String

Population Name of GA.

Link copied to clipboard

Neighborhood for CellularGA.

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

Population of homogeneous chromosomes for CellularGA.

Link copied to clipboard
abstract val random: Random

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

Link copied to clipboard
val GA<*, *>.size: Int

Population Size of GA.

Link copied to clipboard
abstract val state: State

State describes the current state of the genetic algorithm.

Link copied to clipboard

Statistics configuration associated with GA.

Link copied to clipboard
abstract val timeStore: TimeStore

Store for all TimeMarkers of GA.

Link copied to clipboard
val <V, F> GA<V, F>.timeTotal: Duration

Duration between the first STARTED and last value of timeStore

Link copied to clipboard
val <V, F> GA<V, F>.worst: Chromosome<V, F>?

The worst Chromosome in Population by fitness.

Link copied to clipboard
val <V, F> GA<V, F>.worstFitness: F?

The worst fitness of Chromosome in Population.

Functions

Link copied to clipboard
inline suspend fun GA<*, *>.clearCollectors()

Unsubscribe and clear all collectors for StatisticsProvider.

Link copied to clipboard
fun <V, F> GA<V, F>.collect(id: String = BASE_COLLECTOR_ID, collector: STAT_COLLECTOR): GA<V, F>

Allows you to collect statistical data using reactive programming by kotlinx.coroutines.flow.

Link copied to clipboard
inline suspend fun GA<*, *>.removeCollector(id: String)

Unsubscribe and remove collector by id.

Link copied to clipboard
abstract suspend fun restart(forceStop: Boolean = false, resetPopulation: Boolean = true)

Immediately restart genetic algorithm.

Link copied to clipboard
abstract suspend fun resume()

Resume stopped genetic algorithm.

Link copied to clipboard
abstract suspend fun start()

Start genetic algorithm.

Link copied to clipboard
fun GA<*, *>.startBlocking(context: CoroutineContext = EmptyCoroutineContext)

Start GA with runBlocking, non suspend function.

Link copied to clipboard
abstract suspend fun stop(stopPolicy: StopPolicy = StopPolicy.Default)

Stop genetic algorithm.