Fixed broken defaults and changed fitness function to is_it_5

This commit is contained in:
danielwilczak101
2020-10-13 00:10:06 -04:00
parent 2485af795a
commit 645f704b19
2 changed files with 4 additions and 9 deletions

View File

@ -4,12 +4,7 @@ import EasyGA
# Create the Genetic algorithm
ga = EasyGA.GA()
ga.population_size = 100
ga.chromosome_length = 10
ga.generation_goal = 100
ga.gene_impl = [random.randint,1,10]
ga.parent_selection_impl = EasyGA.Parent_Selection.Roulette.roulette_selection
ga.evolve()
print(f"Current Generation: {ga.current_generation}")
ga.population.print_all()