@evolite/core
    Preparing search index...

    Function rouletteWheelSelection

    • Selects two individuals from the population using roulette wheel 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.

      Also known as fitness proportionate selection. Each individual's probability of being selected is directly proportional to its absolute fitness value. Highly fit individuals represent larger slices of the wheel, while weaker individuals represent smaller slices but still retain a non-zero probability of being chosen. *

      If the population has fewer than 2 individuals.