$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, RunTimeParameters settings)
 Select p individuals at random. 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 36 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 91 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 178 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 112 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,
RunTimeParameters  settings 
)
staticprotected

Select p individuals at random.

The individual with the highest fitness becomes the parent. Keeping the tournament size small results in a smaller selection pressure, thus increasing genetic diversity. Note: this implementation is based on the WATCHMAKER framework http://watchmaker.uncommons.org/

Parameters
eligibleParentsthe ensemble of individuals to choose from
sznumber of individuals to select
settingsthe program-specific settings.
Returns
list of selected individuals

Definition at line 54 of file SelectionHelper.java.

References denoptim.graph.Candidate.getFitness(), denoptim.programs.RunTimeParameters.getRandomizer(), denoptim.utils.Randomizer.nextBoolean(), 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: