_steady_state

Module Contents

Functions

steady_state(→ tuple[list[int], list[int]])

Select len(old_genotypes) individuals using the provided selection function from combined set of old and new individuals.

Attributes

Genotype

Fitness

Genotype
Fitness
steady_state(old_genotypes: list[Genotype], old_fitnesses: list[Fitness], new_genotypes: list[Genotype], new_fitnesses: list[Fitness], selection_function: Callable[[int, list[Genotype], list[Fitness]], numpy.typing.NDArray[numpy.float_]]) tuple[list[int], list[int]]

Select len(old_genotypes) individuals using the provided selection function from combined set of old and new individuals.

Parameters:
  • old_genotypes – Genotypes of the individuals in the parent population.

  • old_fitnesses – Fitnesses of the individuals in the parent population.

  • new_genotypes – Genotypes of the individuals from the offspring.

  • new_fitnesses – Fitnesses of the individuals from the offspring.

  • selection_function – Function that selects n individuals from a population based on their genotype and fitness. (n, genotypes, fitnesses) -> indices

Returns:

(indices of selected individuals from parent population, indices of selected individuals from offspring).