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:
@ -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()
|
||||
|
||||
Reference in New Issue
Block a user