before

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.

Example:

// init CellularGA
cGA(
// configure population and fitnessFunction
) {
// set ga's configuration here

before { (this = CellularEvolveScope)
println("GA STARTED, initial iteration is $iteration")
}
}

Parameters

useDefault

if true (default) used CellularConfigScope.baseBefore: