#include <selection.h>
Inheritance diagram for Selector:
Public Methods | |
void | read (const Genome &g) |
double | select (const SelectionSituation &situation, int self_i, int other_j) const |
int | score () const |
void | virginize () |
Static Public Methods | |
void | addGenesTo (Gentainer &g, const StringMap ¶ms) |
Protected Methods | |
virtual double | selectWithMethod (const SelectionSituation &situation, int smno, int i, int j) const |
double | muLambdaSelection (const SelectionSituation &situation, int i, int j) const |
double | linearRanking (const SelectionSituation &situation, int i, int j) const |
double | proportionalSelection (const SelectionSituation &situation, int i, int j) const |
double | tournamentSelection (const SelectionSituation &situation, int i, int j) const |
Protected Attributes | |
int | mScore |
Each individual has one instance of this class to handle all it's selection tasks.
This class provides some additional functionality for SelectionPrms. It is kept separate because we don't want to give these methods if not necessary.
Definition at line 239 of file selection.h.
|
Inserts genes that control selection into the given genome, if the selection parameters are set to be self-adaptive.
Definition at line 212 of file selection.cc. References Gentainer::add(), and Genstruct::hide(). Referenced by Individual::addGenesTo(). |
|
Selection method where the individuals are ranked according to their fitness, and the selection probability is a linear function of this rank.
Definition at line 304 of file selection.cc. References SelectionPrms::mEtaPlus, SimplePopulation::mUseGlobalEtaPlus, SelectionSituation::population(), SimplePopulation::selParams(), and SimplePopulation::size(). Referenced by selectWithMethod(). |
|
Evolution Strategies (mu,+lambda)-Selection, where lambda is the number fittest individuals in the population that can be potential parents, and lambda is the number of offspring.
Definition at line 293 of file selection.cc. References SelectionPrms::muFor(), SimplePopulation::mUseGlobalMu, SelectionSituation::population(), SimplePopulation::selParams(), and SimplePopulation::size(). Referenced by selectWithMethod(). |
|
Proportional selection.
Definition at line 312 of file selection.cc. References FitnessStats::avgFitness(), Individual::getfitness(), SelectionSituation::getOrdered(), SimplePopulation::mFitnessStats, and SelectionSituation::population(). Referenced by selectWithMethod(). |
|
Reads selection parameters from the given genome.
Definition at line 233 of file selection.cc. References Gentainer::getGene(), SelectionPrms::mEtaPlus, SelectionPrms::mMuPart, SelectionPrms::mQ, and SelectionPrms::mSelMethodW. Referenced by Individual::incarnate(). |
|
Tells how many times the individual has got some. (Hmm, shouldn't this kind of information be private??). Definition at line 274 of file selection.h. References mScore. |
|
Returns the selection affinity of individual i to individual j, combined over all different selection methods.
Definition at line 258 of file selection.cc. References SelectionPrms::mSelMethodW, and selectWithMethod(). Referenced by SelectionMatrix::calculateMatrix(). |
|
Returns the selection probability for individuals i and j.
Definition at line 279 of file selection.cc. References linearRanking(), muLambdaSelection(), proportionalSelection(), and tournamentSelection(). Referenced by select(). |
|
Tournament selection.
Definition at line 316 of file selection.cc. References SelectionPrms::mQ, SimplePopulation::mUseGlobalQ, SelectionSituation::population(), SimplePopulation::selParams(), and SimplePopulation::size(). Referenced by selectWithMethod(). |
|
Makes the individual virgin again (resets it's score). Wow. * Definition at line 277 of file selection.h. References mScore. |
|
Some selection methods, like the method the canonic GA, select some of the best individuals with 100% propability. To achieve this, we have to count how many times an individual has got some. Definition at line 319 of file selection.h. Referenced by score(), and virginize(). |