Changed a few comments

This commit is contained in:
SimpleArt
2020-10-12 22:05:26 -04:00
parent db93235642
commit f277bc1684
2 changed files with 5 additions and 7 deletions

View File

@ -3,9 +3,9 @@ class Initialization_Methods:
def random_initialization(ga): def random_initialization(ga):
"""Takes the initialization inputs and """Takes the initialization inputs and
- creates a new population - return a new population
- fills population with chromosomes - filled with chromosomes
- fills chromosomes with genes - filled with genes
""" """
# Using the chromosome_impl to set every index inside of the chromosome # Using the chromosome_impl to set every index inside of the chromosome

View File

@ -20,9 +20,7 @@ class Mutation_Methods:
"""Methods for mutating a single chromosome""" """Methods for mutating a single chromosome"""
def whole_chromosome(ga, chromosome): def whole_chromosome(ga, chromosome):
"""Makes a completely random chromosome. """Makes a completely random chromosome filled with new genes."""
Fills chromosome with new genes.
"""
# Using the chromosome_impl to set every index inside of the chromosome # Using the chromosome_impl to set every index inside of the chromosome
if ga.chromosome_impl != None: if ga.chromosome_impl != None:
@ -44,7 +42,7 @@ class Mutation_Methods:
def single_gene(ga, chromosome): def single_gene(ga, chromosome):
"""Changes a random gene in the chromosome and resets the fitness.""" """Mutates a random gene in the chromosome and resets the fitness."""
chromosome.set_fitness(None) chromosome.set_fitness(None)
# Using the chromosome_impl # Using the chromosome_impl