Mutation
We'll use random initialization mutation because the alleles are continuous values. Each offspring's gene will be chosen at random and initialized to any random value.
Implementation of random initialization mutation.
for index in range(offspring.shape0): randomIndex = numpy.random.randint(1,genes) randomValue = numpy.random.uniform(lb, ub, 1) offspring index, randomIndex = offspring index, randomIndex + randomValue