$darkmode
DENOPTIM
denoptim.ga.SelectionHelper Class Reference

Class that offers methods to performs fitness-driven selection of candidates. More...

Static Protected Member Functions

static Candidate[] performTournamentSelection (List< Candidate > eligibleParents, int sz, GAParameters settings)
 Select a number individuals at random (i.e., tournamentSize). More...
 
static Candidate[] performRandomSelection (List< Candidate > population, int sz, RunTimeParameters settings)
 Randomly select k individuals from the population. More...
 
static Candidate[] performSUS (List< Candidate > population, int sz, RunTimeParameters settings)
 Stochastic Uniform Sampling Note: this implementation is based on the WATCHMAKER framework http://watchmaker.uncommons.org/. More...
 
static Candidate[] performRWS (List< Candidate > population, int sz, RunTimeParameters settings)
 Roulette wheel selection is implemented as follows: More...
 

Detailed Description

Class that offers methods to performs fitness-driven selection of candidates.

Author
Vishwesh Venkatraman
Marco Foscato

Definition at line 38 of file SelectionHelper.java.

Member Function Documentation

◆ performRandomSelection()

static Candidate[] denoptim.ga.SelectionHelper.performRandomSelection ( List< Candidate population,
int  sz,
RunTimeParameters  settings 
)
staticprotected

Randomly select k individuals from the population.

Parameters
populationthe ensemble of individuals to choose from.
sznumber of individuals to select.
settingsthe program-specific settings.
Returns
list of indices of individuals in the population.

Definition at line 86 of file SelectionHelper.java.

References denoptim.programs.RunTimeParameters.getRandomizer(), and denoptim.utils.Randomizer.randomlyChooseOne().

Referenced by denoptim.ga.EAUtils.selectBasedOnFitness().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ performRWS()

static Candidate[] denoptim.ga.SelectionHelper.performRWS ( List< Candidate population,
int  sz,
RunTimeParameters  settings 
)
staticprotected

Roulette wheel selection is implemented as follows:

  1. Sum the fitness of all the population members. TF (total fitness).
  2. Generate a random number r, between 0 and TF.
  3. Return the first population member whose fitness added to the preceding population members is greater than or equal to r. Note: this implementation is based on the WATCHMAKER framework http://watchmaker.uncommons.org/
    Parameters
    populationthe ensemble of individuals to choose from.
    sznumber of individuals to select.
    settingsthe program-specific settings.
    Returns
    list of indices of individuals in the population.

Definition at line 173 of file SelectionHelper.java.

References denoptim.graph.Candidate.getFitness(), denoptim.programs.RunTimeParameters.getRandomizer(), and denoptim.utils.Randomizer.nextDouble().

Referenced by denoptim.ga.EAUtils.selectBasedOnFitness().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ performSUS()

static Candidate[] denoptim.ga.SelectionHelper.performSUS ( List< Candidate population,
int  sz,
RunTimeParameters  settings 
)
staticprotected

Stochastic Uniform Sampling Note: this implementation is based on the WATCHMAKER framework http://watchmaker.uncommons.org/.

Parameters
populationthe ensemble of individuals to choose from.
sznumber of individuals to select.
settingsthe program-specific settings.
Returns
list of indices of individuals in the population.

Definition at line 107 of file SelectionHelper.java.

References denoptim.programs.RunTimeParameters.getRandomizer(), and denoptim.utils.Randomizer.nextDouble().

Referenced by denoptim.ga.EAUtils.selectBasedOnFitness(), and denoptim.ga.SeelctionHelperTest.testPerformSUS().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ performTournamentSelection()

static Candidate[] denoptim.ga.SelectionHelper.performTournamentSelection ( List< Candidate eligibleParents,
int  sz,
GAParameters  settings 
)
staticprotected

Select a number individuals at random (i.e., tournamentSize).

The individual with the highest fitness is chosen the parent. Keeping the tournament size small results in a smaller selection pressure, thus increasing genetic diversity.

Parameters
eligibleParentsthe ensemble of individuals to choose from
sznumber of individuals to select
tournamentSizethe number of candidates participating to each tournament. Corresponds to the selection pressure: high values make high fitness values be more likely to be selected.
settingsthe program-specific settings.
Returns
list of selected individuals

Definition at line 57 of file SelectionHelper.java.

References denoptim.programs.RunTimeParameters.getRandomizer(), denoptim.programs.denovo.GAParameters.getSelectivePressure(), and denoptim.utils.Randomizer.randomlyChooseOne().

Referenced by denoptim.ga.EAUtils.selectBasedOnFitness().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following file: