@evolite/core
    Preparing search index...

    Function randomSelection

    • Selects two individuals completely at random from the population. *

      Type Parameters

      Parameters

      • population: Entity[]

        The current population of individuals.

      Returns Promise<[Entity, Entity]>

      A promise that resolves to a tuple containing two randomly chosen individuals.

      This method ignores fitness values entirely, which maximizes genetic diversity but completely eliminates selection pressure (equivalent to a random search). *

      If the population has fewer than 2 individuals.