Type alias StopCondition<ChromosomeType, FitnessType>

StopCondition<ChromosomeType, FitnessType>: ((currentPopulation: Agent<ChromosomeType, FitnessType>[], stats: SimulationStats<ChromosomeType, FitnessType>) => boolean)

Type Parameters

Type declaration

    • (currentPopulation: Agent<ChromosomeType, FitnessType>[], stats: SimulationStats<ChromosomeType, FitnessType>): boolean
    • Description

      Defines where the simulation must stop.

      Returns

      True if the simulation must stop, false otherwise.

      Parameters

      • currentPopulation: Agent<ChromosomeType, FitnessType>[]
      • stats: SimulationStats<ChromosomeType, FitnessType>

        Stats of the last generation.

      Returns boolean

Generated using TypeDoc