From 5b5ed70d739a9d79deeb640a1a83a62a10b78c38 Mon Sep 17 00:00:00 2001 From: SimpleArt <71458112+SimpleArt@users.noreply.github.com> Date: Fri, 27 Nov 2020 19:16:08 -0500 Subject: [PATCH] Fixed bug --- src/mutation/mutation_methods.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mutation/mutation_methods.py b/src/mutation/mutation_methods.py index 82ef0f4..37d9d78 100644 --- a/src/mutation/mutation_methods.py +++ b/src/mutation/mutation_methods.py @@ -89,7 +89,7 @@ class Mutation_Methods: """Selects random chromosomes while avoiding the best chromosomes. (Elitism)""" index = random.randrange( - len(ga.population)/8, + ceil(len(ga.population)/8), len(ga.population) ) ga.mutation_individual_impl(ga, index)