@evolite/core
    Preparing search index...

    Function linearRankingSelection

    • Selects two individuals from the population using linear ranking selection. *

      Type Parameters

      Parameters

      • population: Entity[]

        The current population of individuals.

      Returns Promise<[Entity, Entity]>

      A promise that resolves to a tuple containing the two selected individuals.

      Linear ranking selection assigns a rank to each individual based on fitness (the fittest is assigned a rank of 1, the second fittest 2, and so on). The probability of an individual being selected is proportional to its rank rather than its absolute fitness. This helps prevent "super-individuals" from prematurely dominating the population. *

      If the population has fewer than 2 individuals.