In a genetic algorithm, when selecting members for crossover using roulette-wheel selection method, does the population first need to be sorted by fitness rank?
The possibilities seem to be:
I'm thinking that sorting either way may have no effect - a pebble landing at random on a wheel containing different sized (by fitness) slices will have exactly the same outcome chance whether the larger slices are grouped together or not. But I'm not 100% convinced.
What do you think?
The need to do a sort every generation affects the speed of the algorithm too, so I'd prefer not to (I would do a sort if using elitism, but I'm not in this case). Thanks if you know, as I cannot find a definitive answer via google etc..
No, you don't actually need to sort them. You are exactly correct that it will have no effect if the higher-ranked members are grouped together or not (at least with a good random number generator :) ).
Your intuition is dead on here - statistically, it will have no effect to sort, and as you mention, you don't have to waste a bunch of time and effort sorting things!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With