Open

Description
Hi,
I encountered a case where, if I'm using roulette wheel selection or stochastic universal selection and if the fitness sum is 0, there will be a division by 0. I know that probably it's very little probability to encounter such a case, but my suggestion would be to instead of having probs = fitness / fitness_sum
to have:
if fitness_sum !=0:
probs = fitness / fitness_sum
else:
probs = 0
or instead of probs=0, to divide fitness by a very large number.
Best Regards!