selection_linearrank | R Documentation |
The genetic algorithm require to select a pair of chromosomes, representing
dad
and mom
, for the crossover
operator to
produce offspring (individual for next generation). The parents chromosomes
are randomly selectd from the initialized population by a linear ranking
method according to each individual's fittness in the input argument
popFit
. By default, the dad has better fit/smaller fitness function
value/larger rank than mom
.
selection_linearrank(pop, popFit)
pop |
A matrix contains the chromosomes for all individuals. The number of
rows is equal to |
popFit |
A vector contains the objective function value (population fit) being associated to each individual chromosome from above. |
A list contains the chromosomes for dad
and mom
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.