kgp.evolution / TournamentSelection

TournamentSelection

class TournamentSelection

A component that is able to perform tournament selection on a collection of individuals.

The ability to perform "negative" tournaments is also provided, where losers from a population are chosen instead of winners.

Parameters

tournamentSize - The size of the tournaments that should be held.

Constructors

<init> TournamentSelection(tournamentSize: Int)

A component that is able to perform tournament selection on a collection of individuals.

Properties

tournamentSize val tournamentSize: Int

Functions

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

Performs a tournament on population.