Interface Elitism

All Superinterfaces:
ReplacementStrategy
All Known Implementing Classes:
ImmutableElitism

@Immutable public interface Elitism extends ReplacementStrategy
Specify an elitism based replacement strategy

Elitism will retain the best individuals of both offsprings and survivors of the previous generation.

  • Field Details

    • DEFAULT_OFFSPRING_RATIO

      static final double DEFAULT_OFFSPRING_RATIO
      See Also:
    • DEFAULT_AT_LEAST_NUM_OFFSPRINGS

      static final int DEFAULT_AT_LEAST_NUM_OFFSPRINGS
      See Also:
    • DEFAULT_AT_LEAST_NUM_SURVIVORS

      static final int DEFAULT_AT_LEAST_NUM_SURVIVORS
      See Also:
  • Method Details

    • offspringSelectionPolicy

      SelectionPolicy offspringSelectionPolicy()
      Returns the policy used to select offsprings for the next generation.
      Returns:
      the policy used to select offsprings for the next generation
    • atLeastNumOffsprings

      @Default default int atLeastNumOffsprings()
      Returns how many offsprings that elitism will always select.
      Returns:
      how many offsprings that elitism will always select
    • survivorSelectionPolicy

      SelectionPolicy survivorSelectionPolicy()
      Returns the policy used to select survivors for the next generation.
      Returns:
      the policy used to select survivors for the next generation
    • atLeastNumSurvivors

      @Default default int atLeastNumSurvivors()
      Returns how many survivors that elitism will always select.
      Returns:
      how many survivors that elitism will always select
    • offspringRatio

      @Default default double offspringRatio()
      Returns how many children will be generated at each iteration. Value must be between 0 and 1 (inclusive)

      The number of survivor will be the complement of it, or 1 - offspringRatio().

      Returns:
      how many children will be generated at each iteration. Value must be between 0 and 1 (inclusive)

      The number of survivor will be the complement of it, or 1 - offspringRatio()

    • check

      @Check default void check()
    • builder

      static Elitism.Builder builder()