stat

@JvmName(name = "statValue")
suspend fun EvolveScope<*, *>.stat(vararg pairs: Pair<String, Any?>)

Creates MultiStatisticNote and send it to GA.statisticsProvider

Example:

evolution {
stat(
"BEST" to best,
"WORST" to worst,
)
}

See also


@JvmName(name = "statRegister")
suspend fun EvolveScope<*, *>.stat(vararg pairs: Pair<String, () -> Any?>)

Creates MultiStatisticNote and send it to GA.statisticsProvider

Example:

evolution {
stat(
"CUSTOM_1" to {
val res1 = function1(param1 = best, param2 = worst)
val res2 = function2(param1 = best, param2 = worst)
res1 + res2
},
"CUSTOM_2" to {
val res3 = function3(param1 = best, param2 = worst)
val res4 = function4(param1 = best, param2 = worst)
res3 + res4
},
)
}

See also


suspend fun EvolveScope<*, *>.stat(vararg statistics: Statistic<Any?>)

Creates MultiStatisticNote and send it to GA.statisticsProvider

Example:

evolution {
stat(median(), mean(), bestFitness(), worstFitness())
}

See also


suspend fun EvolveScope<*, *>.stat(name: String, value: Any?)

Creates SingleStatisticNote and send it to GA.statisticsProvider

Example:

evolution {
stat(name = "BEST", value = best)
}

Parameters

name
  • Name of statistics

value
  • Value of statistics

See also


@JvmName(name = "statValue")
suspend fun EvolveScope<*, *>.stat(pair: Pair<String, Any?>)

Creates SingleStatisticNote and send it to GA.statisticsProvider

Example:

evolution {
stat("BEST" to best)
}

See also


inline suspend fun EvolveScope<*, *>.stat(name: String, registrar: () -> Any?)

Creates SingleStatisticNote and send it to GA.statisticsProvider Use registrar function

Example:

evolution {
stat(
name = "CUSTOM",
registrar = {
val res1 = function1(param1 = best, param2 = worst)
val res2 = function2(param1 = best, param2 = worst)
res1 + res2
},
)
}

Parameters

name
  • Name of statistics

See also


@JvmName(name = "statRegister")
suspend fun EvolveScope<*, *>.stat(pair: Pair<String, () -> Any?>)

Creates SingleStatisticNote and send it to GA.statisticsProvider

Example:

evolution {
stat(
"CUSTOM" to {
val res1 = function1(param1 = best, param2 = worst)
val res2 = function2(param1 = best, param2 = worst)
res1 + res2
}
)
}

See also


suspend fun EvolveScope<*, *>.stat(statistic: Statistic<Any?>)

Creates SingleStatisticNote and send it to GA.statisticsProvider

Example:

evolution {
stat(best())
}

See also