Structure change to make it easier for users to clone and use the repository.
This commit is contained in:
1
termination/README.md
Normal file
1
termination/README.md
Normal file
@ -0,0 +1 @@
|
||||
# Termination functions
|
||||
14
termination/Termination.py
Normal file
14
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
termination/__init__.py
Normal file
0
termination/__init__.py
Normal file
0
termination/test_termination_methods.py
Normal file
0
termination/test_termination_methods.py
Normal file
Reference in New Issue
Block a user