geneticengine.problems.helpers

Module Contents

Functions

best_individual(population, problem)

Returns the best individual of a population.

is_better(problem, individual, other)

Returns whether one individual is better than other.

sort_population(population, problem)

Sorts the population so the best one is first.

geneticengine.problems.helpers.best_individual(population, problem)

Returns the best individual of a population.

Parameters:
Return type:

geneticengine.solutions.individual.Individual

geneticengine.problems.helpers.is_better(problem, individual, other)

Returns whether one individual is better than other.

Requires the individuals to be evaluated.

Parameters:
Return type:

bool

geneticengine.problems.helpers.sort_population(population, problem)

Sorts the population so the best one is first.

Requires the individuals to be evaluated.

Parameters:
Return type:

list[geneticengine.solutions.individual.Individual]