Testing happened
This commit is contained in:
@ -2,13 +2,14 @@
|
|||||||
from initialization.random_initialization import random_initialization
|
from initialization.random_initialization import random_initialization
|
||||||
|
|
||||||
import random
|
import random
|
||||||
from defaults import defaults
|
from defaults.defaults import defaults
|
||||||
import gene
|
from gene.gene import gene
|
||||||
|
|
||||||
class GA:
|
class GA:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
# Default variables
|
# Default variables
|
||||||
self.gene = defaults.default_gene_function()
|
self.gene = gene(defaults.default_gene_function())
|
||||||
|
self.chromosome_length = defaults.chromosome_length
|
||||||
# self.population_size = defaults.generations
|
# self.population_size = defaults.generations
|
||||||
# self.chromosome_length = defaults.chromosome_length
|
# self.chromosome_length = defaults.chromosome_length
|
||||||
# self.generations = defaults.generations
|
# self.generations = defaults.generations
|
||||||
|
|||||||
@ -3,3 +3,6 @@ import EasyGA
|
|||||||
|
|
||||||
# Create the Genetic algorithm
|
# Create the Genetic algorithm
|
||||||
ga = EasyGA.GA()
|
ga = EasyGA.GA()
|
||||||
|
|
||||||
|
print(ga.gene.get_fitness())
|
||||||
|
print(ga.gene.get_value())
|
||||||
|
|||||||
Reference in New Issue
Block a user