Fixed __init__ and chromosome errors
Fixed __init__ and chromosome errors
This commit is contained in:
@ -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
|
||||||
@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user