eqdisco.variation.semantic_crossover#
- eqdisco.variation.semantic_crossover(p1, p2, X, rng, lower=0.0001, upper=0.4, trials=12, p_internal=0.9)[source]#
Semantic similarity-based crossover (SSC) of Uy et al. (2011).
Up to
trialssubtree pairs are drawn; the first pair whose semantic distance (mean absolute difference of their outputs onX) lies in[lower, upper]is swapped. If none qualifies, the pair with the smallest positive distance is used.