Fixed __init__ and chromosome errors

Fixed __init__ and chromosome errors
This commit is contained in:
RyleyGG
2020-10-06 21:20:14 -04:00
parent eca22fb9e8
commit 7e8c81c03d
2 changed files with 4 additions and 2 deletions

View File

@ -1,3 +1,5 @@
# FROM (. means local) file_name IMPORT function_name # FROM (. means local) file_name IMPORT function_name
from .initialization_methods import Initialization_Methods from .initialization_methods import Initialization_Methods
from .gene_structure.gene import Gene
from .chromosome_structure.chromosome import Chromosome
from .population_structure.population import Population

View File

@ -3,7 +3,7 @@ class Chromosome:
if gene_list is None: if gene_list is None:
self.gene_list = [] self.gene_list = []
else: else:
self.gene_list = genes self.gene_list = gene_list
self.fitness = None self.fitness = None
# If the chromosome has been selected then the flag would switch to true # If the chromosome has been selected then the flag would switch to true