evaluate_fitness: Evaluating the fitness of the population

View source: R/evaluate_fitness.R

evaluate_fitnessR Documentation

Evaluating the fitness of the population

Description

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.

Usage

evaluate_fitness(population)

Arguments

population

The list of individuals of the population.

Value

The output expected should be a list of f(x) values calculated from individuals in the population.

Author(s)

Dany Mukesha

Examples

# example of usage
population <- c(1, 3, 0)
# Evaluate fitness
genetic.algo.optimizeR::evaluate_fitness(population)


genetic.algo.optimizeR documentation built on Oct. 10, 2024, 5:07 p.m.