Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork495
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 havingprobs = fitness / fitness_sum
to have:
iffitness_sum!=0:probs=fitness/fitness_sumelse:probs=0
or instead of probs=0, to divide fitness by a very large number.
Best Regards!
