From f277bc168403ad79256f1651fa3441e9cbdefe68 Mon Sep 17 00:00:00 2001 From: SimpleArt <71458112+SimpleArt@users.noreply.github.com> Date: Mon, 12 Oct 2020 22:05:26 -0400 Subject: [PATCH] Changed a few comments --- src/initialization/initialization_methods.py | 6 +++--- src/mutation/mutation_methods.py | 6 ++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/initialization/initialization_methods.py b/src/initialization/initialization_methods.py index 3963f37..b41a2d9 100644 --- a/src/initialization/initialization_methods.py +++ b/src/initialization/initialization_methods.py @@ -3,9 +3,9 @@ class Initialization_Methods: def random_initialization(ga): """Takes the initialization inputs and - - creates a new population - - fills population with chromosomes - - fills chromosomes with genes + - return a new population + - filled with chromosomes + - filled with genes """ # Using the chromosome_impl to set every index inside of the chromosome diff --git a/src/mutation/mutation_methods.py b/src/mutation/mutation_methods.py index c8cf0a5..36bdd58 100644 --- a/src/mutation/mutation_methods.py +++ b/src/mutation/mutation_methods.py @@ -20,9 +20,7 @@ class Mutation_Methods: """Methods for mutating a single chromosome""" def whole_chromosome(ga, chromosome): - """Makes a completely random chromosome. - Fills chromosome with new genes. - """ + """Makes a completely random chromosome filled with new genes.""" # Using the chromosome_impl to set every index inside of the chromosome if ga.chromosome_impl != None: @@ -44,7 +42,7 @@ class Mutation_Methods: 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) # Using the chromosome_impl