Fixed bugs involving None types

This commit is contained in:
SimpleArt
2020-12-07 21:07:04 -05:00
parent 23803593fc
commit c19ef0d1be
3 changed files with 17 additions and 16 deletions

View File

@ -159,7 +159,7 @@ class Mutation_Methods:
# Indexes of genes to swap
index_one = index
index_two = random.randrange(index_one)
index_two = random.randrange(len(chromosome))
# Swap genes
chromosome[index_one], chromosome[index_two] = chromosome[index_two], chromosome[index_one]