From 67f5133171053502ece3f854403e4ebb9a658638 Mon Sep 17 00:00:00 2001 From: danielwilczak101 <44122838+danielwilczak101@users.noreply.github.com> Date: Mon, 12 Oct 2020 23:18:46 -0400 Subject: [PATCH] Fixed population creation --- src/survivor_selection/survivor_selection_methods.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/survivor_selection/survivor_selection_methods.py b/src/survivor_selection/survivor_selection_methods.py index c6c66ac..f47a107 100644 --- a/src/survivor_selection/survivor_selection_methods.py +++ b/src/survivor_selection/survivor_selection_methods.py @@ -5,4 +5,4 @@ class Survivor_Selection: def fill_in_best(ga, next_population): """Fills in the next population with the best chromosomes from the last population until the population size is met.""" - return Population(ga.population.get_all_chromosomes()[:ga.population.size()-next_population.size()] + next_population.get_all_chromosomes()) + return ga.make_population(ga.population.get_all_chromosomes()[:ga.population.size()-next_population.size()] + next_population.get_all_chromosomes())