Fixed spacing mistakes and added comments

This commit is contained in:
danielwilczak101
2020-10-15 12:56:59 -04:00
parent ce62bc50e5
commit d8e5296ef5
2 changed files with 6 additions and 2 deletions

View File

@ -4,8 +4,11 @@ from attributes import attributes
class GA(attributes): class GA(attributes):
def __init__(self): # Inhert all the ga attributes
super(GA, self).__init__() # from the attributes class # Inhert all the ga attributes from the attributes class.
def __init__(self):
super(GA, self).__init__()
def evolve_generation(self, number_of_generations = 1, consider_termination = True): def evolve_generation(self, number_of_generations = 1, consider_termination = True):
"""Evolves the ga the specified number of generations.""" """Evolves the ga the specified number of generations."""

View File

@ -63,6 +63,7 @@ class attributes:
# The type of termination to impliment # The type of termination to impliment
self.termination_impl = Termination_Methods.generation_based self.termination_impl = Termination_Methods.generation_based
# Example of how the setter error checking will look like # Example of how the setter error checking will look like
@property @property
def chromosome_length(self): def chromosome_length(self):