Changed implementation framework

Instead of a nested approach, selection/crossover/mutation are all called separately and directly by the GA. selection_impl was also separated into parent_selection_impl and survivor_selection_impl, as both are needed separately.
This commit is contained in:
RyleyGG
2020-10-04 17:59:59 -04:00
parent c18a531034
commit e05aa7f62b
5 changed files with 102 additions and 120 deletions

View File

@ -5,7 +5,10 @@ import random
# Create the Genetic algorithm
ga = EasyGA.GA()
ga.gene_impl = [random.randrange,1,25]
#def random_parent_selection(population):
#while ()
ga.gene_impl = [random.randrange,1,100]
# Run Everything
ga.evolve()