metaheuristic_designer.parent_selection.parent_selection_functions#

Core parent selection functions (tournament, roulette, SUS, best, …) and fitness scaling helpers.

Functions

create_scaling_fn(method[, scaling_factor])

Create a callable that computes normalized selection weights.

exponential_ranking(fitness, scaling_factor)

Exponential ranking: weight decays exponentially with rank.

fitness_proportional(fitness, scaling_factor)

Fitness proportional scaling.

flat_ranking(fitness, scaling_factor)

Flat ranking: every individual receives equal weight.

linear_ranking(fitness, scaling_factor)

Linear ranking: weight proportional to rank.

prob_tournament(fitness, amount[, rng, ...])

Selects the parents for the next generation by tournament.

repeating_selection(fitness, amount[, rng])

Chooses the entire population repeated in order duplicated enough times to reach the specified amount.

roulette(fitness, amount[, rng, method, ...])

Fitness proportionate parent selection.

select_best(fitness, amount[, rng])

Selects the best parent of the population as parents.

shuffle_population(fitness, amount[, rng])

Chooses a number of individuals from the population at random without replacement if amount < population_size.

sigma_scaling(fitness, scaling_factor)

Sigma scaling: weight based on standard deviations above the mean.

sus(fitness, amount[, rng, method, ...])

Stochastic universal sampling parent selection method.

uniform_selection(fitness, amount[, rng])

Chooses a number of individuals from the population at random with replacement.