Blend crossover (BLX-α)#
blend_alpha_crossover() samples each variable of the offspring
uniformly from the interval between the parents, widened on each side by
alpha times its length. DEAP (cxBlend), jMetalPy
(BLXAlphaCrossover) and DESDEO (BlendAlphaCrossover) provide it.
moocore produces one offspring per pair of parents, and the other packages produce two. The two offspring of DEAP mirror each other, so the KS tests use the first offspring of each pair from DEAP and jMetalPy, and every offspring from DESDEO, whose offspring are independent. The timings call moocore twice, so that every package produces the same number of offspring.
The packages handle bounds differently. moocore and DESDEO clip the sampling interval to the bounds, jMetalPy clips each sampled value, and DEAP ignores the bounds.
KS test results#
moocore |
deap |
jMetalPy |
desdeo |
|
|---|---|---|---|---|
moocore |
0.517 |
0.064 |
0.513 |
|
deap |
0.517 |
0.118 |
0.814 |
|
jMetalPy |
0.064 |
0.118 |
0.014 |
|
desdeo |
0.513 |
0.814 |
0.014 |
All implementations produce the same distribution of offspring. The p-value of 0.014 between jMetalPy and DESDEO is one of the low values expected by chance: with two other random seeds, it was 0.07 and 0.31.
Performance over number of parents#
With 10 parents, DEAP is faster than the two calls to moocore. From 20 parents on, moocore is the fastest. With 10 000 parents, it takes 2.1 ms, while DEAP, DESDEO and jMetalPy take 7.8, 15 and 51 times as long.
Performance over number of variables#
With 2 variables, DEAP is faster than moocore. With more variables, moocore is the fastest.