Hi Eric, thanks for an elaborate and well written guide.
I’m a bit in doubt of how the selection algorithm have been designed and what it’s implications are. The whole “if pick <= df.iat… “ is a bit hard to interpret in terms of how that in practice biases the selection? It doesn’t seem to favor the top performers — which might make sense as the elitism already selected those - but I’m not sure what spectrum of the ranked population it then favors?
Also I was looking into the breed function, and just out of curiosity, it seems like you are inserting the genes selected for cross-over at the beginning of the child, rather than keeping the relative location of those genes (as the image might indicate) — is there a reason for that? I changed the algorithm to keep the position of the genes being crossed over, but it’s hard to see if it affects the performance: if anything it might even have worsened the performance of the algorithm (I just did 5 runs with each breed function…).
Kind regards
Jesper