Added blank lines and fixed run_testing

This commit is contained in:
SimpleArt
2020-10-12 19:57:57 -04:00
parent 4770473825
commit 3424fd4da7
9 changed files with 86 additions and 18 deletions

View File

@ -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"""