|
2 | 2 | //! [selection](crate::select) phase determines the order the parent pairing (overall with fitter
|
3 | 3 | //! first).
|
4 | 4 | //!
|
5 |
| -//! For the selection-rate, typically set between 0.2 and 0.5 (20%-50% of the population is |
6 |
| -//! selected for reproduction). A higher selection rate (closer to 50%) can accelerate convergence |
7 |
| -//! but risks premature convergence (getting stuck in local optima). A lower selection rate (closer |
8 |
| -//! to 20%) maintains diversity but may slow down the algorithm. Other sources suggest a higher |
9 |
| -//! selection-rate, somewhere in the 0.75-1.0 range. Apparantly there is no broad consensus. |
| 5 | +//! The selection_rate is the fraction of parents which are selected for |
| 6 | +//! reproduction. This selection adds offspring to the population, the other |
| 7 | +//! parents do not. The population now grows by the added offspring, as the |
| 8 | +//! parents are not replaced yet. Value should typically be between 0.4 and |
| 9 | +//! 0.8. High values risk of premature convergence. Low values reduce diversity |
| 10 | +//! if overused. |
10 | 11 | //!
|
11 |
| -//! For the crossover-rate, typically set between 0.7 and 0.9 (70%-90% of the population undergoes |
12 |
| -//! crossover). Higher crossover rates promote exploration and recombination of genetic material. |
| 12 | +//! The crossover_rate (or recombination-rate) is the fraction of selected parents to crossover, |
| 13 | +//! the remaining parents just clone as offspring. Value should typically be between 0.5 and 0.8. |
| 14 | +//! High values converge faster, but risk losing good solutions. Low values have poor exploration |
| 15 | +//! and risk of premature convergence |
13 | 16 | //!
|
14 |
| -//! The crossover adds children, thus potentially increasing the population_size above the |
15 |
| -//! target_population_size |
| 17 | +//! Normally the crossover adds children to the popluation, thus increasing the population_size |
| 18 | +//! above the target_population_size. Selection will reduce this again in the next generation |
16 | 19 | mod clone;
|
17 | 20 | mod multi_gene;
|
18 | 21 | mod multi_point;
|
|
0 commit comments