View source: R/evaluate_fitness.R
evaluate_fitness | R Documentation |
The function described below applies this equation:
f(x) = x^2 - 4x + 4
It assesses every individual x
of a given population,
to then provide an overview of how that population fits the equation.
evaluate_fitness(population)
population |
The list of individuals of the population. |
The output expected should be a list of f(x)
values
calculated from individuals in the population.
Dany Mukesha
# example of usage
population <- c(1, 3, 0)
# Evaluate fitness
genetic.algo.optimizeR::evaluate_fitness(population)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.