Coverage for moptipy / algorithms / modules / selections / __init__.py: 100%
0 statements
« prev ^ index » next coverage.py v7.12.0, created at 2025-11-24 08:49 +0000
« prev ^ index » next coverage.py v7.12.0, created at 2025-11-24 08:49 +0000
1"""
2The set of selection algorithms.
4:class:`~moptipy.algorithms.modules.selection.Selection` algorithms are
5algorithms that choose elements from a pool of records based on their
6:attr:`~moptipy.algorithms.modules.selection.FitnessRecord.fitness` and
7random numbers. They are commonly used in Evolutionary Algorithms
8(:class:`~moptipy.algorithms.so.general_ea.GeneralEA`).
10Currently, the following selection algorithms have been implemented:
12- :class:`~moptipy.algorithms.modules.selections.best.Best` selection picks
13 the `n` best solutions from an array. It is the survival selection scheme
14 used in a (mu+lambda) :class:`~moptipy.algorithms.so.ea.EA`.
15- :class:`~moptipy.algorithms.modules.selections.random_without_repl\
16.RandomWithoutReplacement` randomly chooses `n` solutions without replacement.
17 This is the mating selection scheme used in a (mu+lambda)
18 :class:`~moptipy.algorithms.so.ea.EA`.
19- :class:`~moptipy.algorithms.modules.selections.fitness_proportionate_sus\
20.FitnessProportionateSUS` performs fitness proportionate selection for
21 minimization using Stochastic Uniform Sampling. It also allows you to
22 specify the selection probability for the worst element.
23- :class:`~moptipy.algorithms.modules.selections.tournament_with_repl.\
24TournamentWithReplacement`
25 performs tournament selection with a specified tournament size with
26 replacement.
27- :class:`~moptipy.algorithms.modules.selections.tournament_without_repl.\
28TournamentWithoutReplacement`
29 performs tournament selection with a specified tournament size without
30 replacement.
31"""