View Source Genetix.Evolution.Select (Genetix v0.4.0)

Contain functions with different aproaches / strategies to make the selection. Selection is the stage of a genetic algorithm or more general evolutionary algorithm in which individual genomes are chosen from a population for later breeding (e.g., using the crossover operator).

More info

Link to this section Summary

Functions

Also known as fitness proportionale selection, chooses parents with a probability proportional to their fitness.

Often to get better parameters, strategies with partial reproduction are used. One of them is elitism, in which a small portion of the best individuals from the last generation is carried over (without any changes) to the next one. With Elitism selection, we chose the better number_of_candidates candidates (using its fitness_function).

Random selection pays no mind to chromosome's fitness and select a random number_of_candidates candidates from the population. Take care because this strategy is uncommon but is very useful if you goal is to obtain a high genetic diversity.

Tournament selection is a strategy that pist chromosomes against one another in a tournament. While selections are still based on fitness, tounament selection introduces a strategy to choose parents that are both diverse and strong.

Tournament selection is a strategy that pist chromosomes against one another in a tournament. While selections are still based on fitness, tounament selection introduces a strategy to choose parents that are both diverse and strong.

Link to this section Functions

Link to this function

roulette(population, number_of_candidates, opts \\ [])

View Source

Also known as fitness proportionale selection, chooses parents with a probability proportional to their fitness.

Link to this function

select_elite(population, number_of_candidates, opts \\ [])

View Source

Often to get better parameters, strategies with partial reproduction are used. One of them is elitism, in which a small portion of the best individuals from the last generation is carried over (without any changes) to the next one. With Elitism selection, we chose the better number_of_candidates candidates (using its fitness_function).

Take care because with this kind of selection we can have a lack of diversity

Link to this function

select_random(population, number_of_candidates, opts \\ [])

View Source

Random selection pays no mind to chromosome's fitness and select a random number_of_candidates candidates from the population. Take care because this strategy is uncommon but is very useful if you goal is to obtain a high genetic diversity.

Link to this function

select_tournament_max(population, number_of_candidates, opts \\ [])

View Source

Tournament selection is a strategy that pist chromosomes against one another in a tournament. While selections are still based on fitness, tounament selection introduces a strategy to choose parents that are both diverse and strong.

In tournament selection, tournaments can be any n-way: the tournament size can be any nombre from 1 to the size of the population. The tournament size is defined by tournament_size hyperparameter.

This implementation allows duplicates.

Tournamente selection works like this:

  1. Choose a pool of n chromosomes where n is the tournament_size.
  2. Choose the fittest cohormosome from the tournament.
  3. Repeat.

The beauty of tournament selection is the balance between genetic diversity and fitness. In this case we are using the max_by function

Link to this function

select_tournament_min(population, number_of_candidates, opts \\ [])

View Source

Tournament selection is a strategy that pist chromosomes against one another in a tournament. While selections are still based on fitness, tounament selection introduces a strategy to choose parents that are both diverse and strong.

In tournament selection, tournaments can be any n-way: the tournament size can be any nombre from 1 to the size of the population. The tournament size is defined by tournament_size hyperparameter.

This implementation allows duplicates.

Tournamente selection works like this:

  1. Choose a pool of n chromosomes where n is the tournament_size.
  2. Choose the fittest cohormosome from the tournament.
  3. Repeat.

The beauty of tournament selection is the balance between genetic diversity and fitness. In this case we are using the min_by function