Renamed termination method

This commit is contained in:
SimpleArt
2020-11-12 14:19:38 -05:00
parent 435c6c1335
commit a5cb864330
2 changed files with 7 additions and 3 deletions

View File

@ -1,8 +1,12 @@
class Termination_Methods:
"""Example functions that can be used to terminate the the algorithms loop"""
def fitness_and_generation_based(ga):
"""Fitness based approach to terminate when the goal fitness has been reached"""
def fitness_generation_tolerance(ga):
"""Terminate GA when any of the
- fitness,
- generation, or
- tolerance
goals are met."""
# Need to start the algorithm if the population is None.
if ga.population == None: