From d845e7fc1b20bac96bc1b73c8eb492eccd15656c Mon Sep 17 00:00:00 2001 From: SimpleArt <71458112+SimpleArt@users.noreply.github.com> Date: Fri, 27 Nov 2020 20:19:23 -0500 Subject: [PATCH] Fixed percent of population unmutated --- 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 37d9d78..b504734 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( - ceil(len(ga.population)/8), + ceil(ga.percent_converged*len(ga.population)*3/16), len(ga.population) ) ga.mutation_individual_impl(ga, index)