Added reset run method

This commit is contained in:
SimpleArt
2020-12-28 11:14:23 -05:00
parent 364edff3a3
commit d0894c18fb

View File

@ -111,6 +111,14 @@ class GA(Attributes):
self.current_generation += 1
def reset_run(self):
"""Resets a run by re-initializing the population and modifying counters."""
self.initialize_population()
self.current_generation = 0
self.run += 1
def active(self):
"""Returns if the ga should terminate based on the termination implimented."""