Skip to contents

The function described below creates a population of individuals(values).

Usage

initialize_population(population_size, min = -100, max = 100)

Arguments

population_size

The number of individuals of the population.

min

The minimum number an individual could have.

max

The maximum number an individual could have.

Value

The output expected should be a list of individuals of the population with the size indicated in the input.

Details

(Note: the values are random and the population should be highly diversified)
The space of x value is kept integer type and on range from 0 to 3, for simplification.

Author

Dany Mukesha

Examples

# example of usage
genetic.algo.optimizeR::initialize_population(population_size = 3, min = 0, max = 3)
#> [1] 3 0 2