The selection operator to be used in GAUL is defined through a callback mechanism. Several common types of selection have been implemented, and it is easy to add your own.
In GAUL there are two classes of selection operator - those which select only one individual (i.e. for mutation and migration), and those which select two individuals (i.e. for crossover). The advantage of having a specialist operator for selecting two individuals is that it may optionally include incest control - that is prevent pairs of closely related individuals from being selected.
The built-in selection operators are defined in src/ga_select.c:
Random Selection |
boolean ga_select_one_random(population *pop, entity **mother)
boolean ga_select_two_random(population *pop, entity **mother, entity **father) |
Complete Selection |
boolean ga_select_one_every(population *pop, entity **mother)
boolean ga_select_two_every(population *pop, entity **mother, entity **father) |
"Random/ranked" Selection |
boolean ga_select_one_randomrank(population *pop, entity **mother)
boolean ga_select_two_randomrank(population *pop, entity **mother, entity **father) |
Two-way Tournament Selection |
boolean ga_select_one_bestof2(population *pop, entity **mother)
boolean ga_select_two_bestof2(population *pop, entity **mother, entity **father) |
Stochastic Universal Sampling Selection |
boolean ga_select_one_sus(population *pop, entity **mother)
boolean ga_select_two_sus(population *pop, entity **mother, entity **father) |
Roulette-wheel Selection |
boolean ga_select_one_roulette(population *pop, entity **mother)
boolean ga_select_two_roulette(population *pop, entity **mother, entity **father) |
Rebased Roulette-wheel Selection |
boolean ga_select_one_roulette_rebased(population *pop, entity **mother)
boolean ga_select_two_roulette_rebased(population *pop, entity **mother, entity **father) |
|