UNPKG

@zfunction/genetics-js

Version:

Genetic and evolutionary algorithms framework for the web

11 lines (10 loc) 539 B
import { Engine } from 'random-js'; import { BaseIndividual } from '../../individual/base/BaseIndividual'; import { Population, PopulationItem } from '../../population/Population'; export interface SelectionImplementationParams { engine: Engine; selectionCount: number; } export interface SelectionImplementation<I extends BaseIndividual<T>, T> { select(population: Population<I, T>, params: SelectionImplementationParams, cumulativeProbabilityCallback: (item: PopulationItem<I, T>, index: number) => number): I[]; }