I noticed that selRoulette was causing a major bottleneck when I tried to scale up to larger populations. This update uses the np.random.choice function in place of random.random, which removes the need to sort the input list of individuals and the nested for loops.
I noticed that selRoulette was causing a major bottleneck when I tried to scale up to larger populations. This update uses the
np.random.choice
function in place ofrandom.random
, which removes the need to sort the input list of individuals and the nested for loops.