Module genetic

Module genetic 

Source
Expand description

The module with genetic algorithm implementation.

§Terms

  • “chromosomes” are points in the search space. Usually chromosome is single value or vector of values.
  • “Fitness” is value of goal function value in genetic algorithm.
  • “Generation” is iteration number of genetic algorithm.
  • “Individual” is agent in genetic algorithm (point in the search space and value of goal function).

Modules§

creation
The module with algorithms with initial creation of individuals
cross
The module with most usable algorithms of crossing for various types. The module contains struct which implements the Cross trait and functions to cross chromosomes various types.
mutation
The module with most usable algorithms of mutations for various types. The module contains struct which implements the Mutation trait to mutate chromosomes various types.
pairing
The module with pairing algorithm traits. The pairing algorithm selects individuals for crossing.
pre_birth
The module with PreBirth trait implementations.
selection
The module with selection algorithms.

Structs§

GeneticOptimizer
The main struct for an user. GeneticOptimizer implements Optimizer trait and keep all parts of genetic algorithm as trait objects: Creator, Pairing, Cross, Mutation, Selection, StopChecker and, if needed, Logger. The trait run genetic algorithm.
Individual
Struct for single point (agent) in the search space
Population
Stores all individuals for current generation.

Traits§

Creator
The trait to create initial individuals for population.
Cross
The trait with cross algorithm.
Mutation
The trait with mutation algorithm.
Pairing
The trait to select individuals to pairing.
PreBirth
The trait may be used after mutation but before birth of the individuals.
Selection
The trait with selection algorithm.