saealib.SurvivorSelection#

class saealib.SurvivorSelection[ソース]#

ベースクラス: ABC

Base class for survivor selection operators.

Methods

__init__

contract

Return the survivor-selection contract.

select

Select survivors from the selection pool.

Method Details

SurvivorSelection.__init__()#
SurvivorSelection.contract()[ソース]#

Return the survivor-selection contract.

戻り値の型:

ComponentContract

abstractmethod SurvivorSelection.select(ctx, pool, n_survivors)[ソース]#

Select survivors from the selection pool.

The pool is a merged Population (e.g., parents + offspring) constructed by the Algorithm. The replacement strategy (μ+λ or μ,λ) is determined by the Algorithm, not by this class.

パラメータ:
  • ctx (ExecutionContext) -- Optimization context.

  • pool (Population) -- Selection pool to choose survivors from.

  • n_survivors (int) -- Number of survivors to select.

戻り値:

Indices of selected survivors in the pool.

戻り値の型:

np.ndarray