diff --git a/src/mutation/mutation_methods.py b/src/mutation/mutation_methods.py index 1527472..fb3acf0 100644 --- a/src/mutation/mutation_methods.py +++ b/src/mutation/mutation_methods.py @@ -144,7 +144,7 @@ class Mutation_Methods: """Reflects genes against the best chromosome.""" difference = ga.population[0][index].value - chromosome[index].value - value = ga.population[0][index].value + difference * len(chromosome)**2 + value = ga.population[0][index].value + 2*difference chromosome[index] = ga.make_gene(value)