Potentially faster list

This commit is contained in:
SimpleArt
2020-11-21 16:14:10 -05:00
parent f00785dad1
commit 815dc2a5c3

View File

@ -12,7 +12,7 @@ def loop_selections(selection_method):
def loop_mutations(mutation_method):
"""Runs the mutation method until enough genes are mutated."""
def helper(ga, old_chromosome):
chromosome = ga.make_chromosome(list(old_chromosome))
chromosome = ga.make_chromosome(old_chromosome.gene_list)
for n in range(ceil(len(chromosome)*ga.gene_mutation_rate)):
mutation_method(ga, chromosome)