Uniform crossover#
uniform_crossover() swaps each variable between the two
offspring with probability swap_prob, which is 0.5 by default. pymoo
(UniformCrossover), DEAP (cxUniform) and DESDEO
(UniformCrossover) provide the same operator.
KS test results#
moocore |
pymoo |
deap |
desdeo |
|
|---|---|---|---|---|
moocore |
0.249 |
0.765 |
1.000 |
|
pymoo |
0.249 |
0.658 |
0.699 |
|
deap |
0.765 |
0.658 |
0.987 |
|
desdeo |
1.000 |
0.699 |
0.987 |
All implementations produce the same distribution of offspring.
Performance over number of parents#
With 10 parents, the Python loop of DEAP over five pairs takes less time than the fixed cost of a call to moocore. From 20 parents on, moocore is the fastest. With 10 000 parents, it takes 1.4 ms, while DESDEO, DEAP and pymoo take 1.7, 4.4 and 20 times as long.
Performance over number of variables#
moocore is the fastest for every number of variables. With 1000 variables, pymoo, DEAP and DESDEO take 2.0, 3.9 and 7.4 times as long.