-
|
In the function crossover, it uses the same index for both parents. This indicates that every second parent is instead duplicated, allowing evolution in this algorithm only by mutation, or am I missing something? f crossover(population: Population) -> Population: Namely, for the tournament selection of parents and survivors, this is indexed in the idx, idx+1 fashion. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
I wanted to point out the same issue. |
Beta Was this translation helpful? Give feedback.
-
|
Good catch, you are both correct, it was a bug! It wouldn't fail outright, but it would be just creating a copy of the single parent. Please fix it by [idx+1] on parent_j |
Beta Was this translation helpful? Give feedback.
Good catch, you are both correct, it was a bug! It wouldn't fail outright, but it would be just creating a copy of the single parent. Please fix it by [idx+1] on parent_j