Parent selection operators (a.k.a. selectors) in EvoLP are based on fitness and are used to select individuals for crossover. The selectors always return indices so that individuals can be selected from the population later.
All of these methods perform a single operation, as in a steady-state algorithm. Each selector returns two parent indices.
For generational algorithms, you need to repeat the selection $n$ times; once per each individual in the population.
All selection operators have been renamed to selectors since EvoLP 1.4. The old names will be deprecated in a future major release. Be sure to check the new type ontology.
EvoLP provides many built-in selectors.
Tournament parent selection with tournament size
Truncation selection for selecting top
k possible parents in the population.
Roulette wheel parent selection.
Rank-based parent selection.
After "instantiating" a selection method, you can use the
select function on an array of fitnesses
y to obtain 2 parents' indices (that you will need to slice from the population in your algorithm later.)
Select two parents which are the winners from two random tournaments of size
Select two random parents out from the top
t.k in the population.
Select two random parents with probability proportional to their fitness.
Select two random parents with probability proportional to their ranks.