Skip to main content

Module population

Module population 

Source
Expand description

Population — chromosome container for evolving generations.

A Population holds the current generation of chromosomes, tracks the best-so-far individual, and computes aggregate fitness statistics used by adaptive GA operators.

The struct supports standard Rust collection traits (IntoIterator, FromIterator, Index, IndexMut), and implements Clone, Debug, and optional serde serialization behind the serde feature flag.

§Key items

ItemDescription
Population<U>Main container, generic over chromosome type
Population::best_chromosomeThe best-so-far individual
Population::fitness_statsAggregate fitness statistics

§When to use

Used by all engines as the primary solution container. It is the return type of ga.run() and provides access to the evolved solutions and their fitness statistics.

Structs§

Population
Population of chromosomes with aggregate statistics and best tracking.