Added blank lines and fixed run_testing
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
class Fitness_Examples:
|
||||
"""Fitness function examples used"""
|
||||
|
||||
def is_it_5(chromosome):
|
||||
"""A very simple case test function - If the chromosomes gene value is a 5 add one
|
||||
to the chromosomes overall fitness value."""
|
||||
@ -15,6 +16,7 @@ class Fitness_Examples:
|
||||
|
||||
return fitness
|
||||
|
||||
|
||||
def index_dependent_values(chromosome):
|
||||
"""Test of the GA's ability to improve fitness when the value is index-dependent"""
|
||||
"""If a gene is equal to its index in the chromosome + 1, fitness is incremented"""
|
||||
|
||||
Reference in New Issue
Block a user