Updated GA attribute structure, separated selection file structure
Updated GA attribute structure, separated selection file structure
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
class Termination_Methods:
|
||||
"""Example functions that can be used to terminate the the algorithms loop"""
|
||||
|
||||
def fitness_based(self, ga):
|
||||
def fitness_based(ga):
|
||||
"""Fitness based approach to terminate when the goal fitness has been reached"""
|
||||
|
||||
status = True
|
||||
@ -13,7 +13,7 @@ class Termination_Methods:
|
||||
break
|
||||
return status
|
||||
|
||||
def generation_based(self, ga):
|
||||
def generation_based(ga):
|
||||
"""Generation based approach to terminate when the goal generation has been reached"""
|
||||
status = True
|
||||
if(ga.current_generation > ga.generation_goal):
|
||||
|
||||
Reference in New Issue
Block a user