kgp.evolution / TournamentSelection / tournament

tournament

fun tournament(population: List<Tree>, negative: Boolean = false): Tree

Performs a tournament on population.

If the negative flag is set, then the tournament will choose losers instead of winners.

Parameters

population - A collection of program trees.

negative - Flag to control whether winners or losers are selected from the population.