Fixed spacing mistakes and added comments
This commit is contained in:
@ -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."""
|
||||||
|
|||||||
@ -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):
|
||||||
|
|||||||
Reference in New Issue
Block a user