Directory
This commit is contained in:
14
EasyGA/termination/Termination.py
Normal file
14
EasyGA/termination/Termination.py
Normal file
@ -0,0 +1,14 @@
|
||||
# Import all termination decorators
|
||||
from decorators import _add_by_fitness_goal, _add_by_generation_goal, _add_by_tolerance_goal
|
||||
|
||||
@_add_by_fitness_goal
|
||||
@_add_by_generation_goal
|
||||
@_add_by_tolerance_goal
|
||||
def fitness_generation_tolerance(ga):
|
||||
"""Terminate GA when any of the
|
||||
- fitness,
|
||||
- generation, or
|
||||
- tolerance
|
||||
goals are met."""
|
||||
|
||||
return True
|
||||
0
EasyGA/termination/__init__.py
Normal file
0
EasyGA/termination/__init__.py
Normal file
0
EasyGA/termination/test_termination_methods.py
Normal file
0
EasyGA/termination/test_termination_methods.py
Normal file
Reference in New Issue
Block a user