Doubled mutation rate. To solve default fitness function.
This commit is contained in:
@ -62,10 +62,10 @@ class Attributes:
|
||||
current_fitness = 0,
|
||||
generation_goal = 15,
|
||||
fitness_goal = None,
|
||||
tolerance_goal = 1e-2,
|
||||
tolerance_goal = None,
|
||||
percent_converged = 0.50,
|
||||
chromosome_mutation_rate = 0.15,
|
||||
gene_mutation_rate = 0.05,
|
||||
gene_mutation_rate = 0.10,
|
||||
initialization_impl = Initialization_Methods.random_initialization,
|
||||
fitness_function_impl = Fitness_Examples.is_it_5,
|
||||
make_population = create_population,
|
||||
|
||||
@ -7,8 +7,10 @@ ga = EasyGA.GA()
|
||||
# Create 25 chromosomes each with 10 genes and 200 generations
|
||||
ga.population_size = 100
|
||||
ga.chromosome_length = 10
|
||||
ga.generation_goal = 150
|
||||
ga.generation_goal = 1000
|
||||
|
||||
ga.evolve()
|
||||
|
||||
ga.graph.generation_total_fitness()
|
||||
ga.print_population()
|
||||
|
||||
ga.graph.highest_value_chromosome()
|
||||
|
||||
Reference in New Issue
Block a user