alogos.systems.whge.crossover
¶
Crossover functions for WHGE.
Functions¶
|
Generate new WHGE genotypes by exchanging sequence parts. |
Detailed object descriptions¶
- alogos.systems.whge.crossover.two_point_length_preserving(grammar, genotype1, genotype2, parameters=None)[source]¶
Generate new WHGE genotypes by exchanging sequence parts.
Select two random, but equally long subsequences in the two WHGE genotypes and exchange them.
- Parameters:
grammar (
Grammar
)genotype1 (
Genotype
) – Genotype of the first parent.genotype2 (
Genotype
) – Genotype of the second parent.parameters (
dict
orParameterCollection
, optional) – No keyword-value pairs are considered by this function. This argument is only available to have a consistent interface.
- Returns: