Tournament Selection

Tournament Selection #

File position: /EMOC/src/operator/tournament_selection.h and /EMOC/src/operator/tournament_selection.cpp

There are three tournament selection variants in EMOC:

Individual* TournamentByRank(Individual* ind1, Individual* ind2)

Use the non-dominated sorting results (i.e., the rank_ variable of Individual object) to complete the tournament selection.

Parameter:
ind1: Individual*, default=None
    The pointer to the first individual which will participate the tournament selection.

ind2: Individual*, default=None
    The pointer to the second individual which will participate the tournament selection.
Returns:
winner: Individual*
    The pointer to the individual which win the tournament.
Individual* TournamentByFitness(Individual* ind1, Individual* ind2, int greater_is_better = 0)

Use the the fitness_ variable of Individual object to complete the tournament selection.

Parameter:
ind1: Individual*, default=None
    The pointer to the first individual which will participate the tournament selection.

ind2: Individual*, default=None
    The pointer to the second individual which will participate the tournament selection.

greater_is_better: int, default=0
    Whether the larger fitness the better. By default it's the smaller the better.
Returns:
winner: Individual*
    The pointer to the individual which win the tournament.
Individual* TournamentByCustom(Individual* ind1, double ind1_prop, Individual* ind2, double ind2_prop, int greater_is_better = 0)

Use the the custom properties of Individual object to complete the tournament selection.

Parameter:
ind1: Individual*, default=None
    The pointer to the first individual which will participate the tournament selection.

ind1_prop: double, default=None
    The custom property of the first individual

ind2: Individual*, default=None
    The pointer to the second individual which will participate the tournament selection.

ind2_prop: double, default=None
    The custom property of the second individual

greater_is_better: int, default=0
    Whether the larger fitness the better. By default it's the smaller the better.
Returns:
winner: Individual*
    The pointer to the individual which win the tournament.