alogos.systems.dsge.crossover
¶
Crossover functions for DSGE.
Functions¶
|
Generate new DSGE genotypes by exchanging a random gene. |
Detailed object descriptions¶
- alogos.systems.dsge.crossover.gene_swap(grammar, genotype1, genotype2, parameters=None)[source]¶
Generate new DSGE genotypes by exchanging a random gene.
Each DSGE genotype contains the same number of genes. Randomly select one gene and exchange it between the two genotypes.
- Parameters:
- Returns:
References
Software implementations by the authors of the approach
Python: dsge
core/sge.py:
def crossover(p1, p2)
is the implementation of the crossover operator
Papers
Lourenço et al. in 2018: Structured Grammatical Evolution: A Dynamic Approach
p. 145: “It starts by creating a random binary mask and the offspring are created by selecting the parents genes based on the mask values. Recombination does not modify the lists inside the genes. This is similar to what happens with uniform crossover for binary representations.”