Created
September 1, 2017 18:51
-
-
Save dariocazzani/62c4126b9f03240dc9789d2101c79a9a to your computer and use it in GitHub Desktop.
Genetic Algorithm Engine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def run(self): | |
now = time.time() | |
try: | |
for i in range(self.iterations): | |
self.__produce_next_gen() | |
self.__mutation() | |
except KeyboardInterrupt: | |
print('Quitting...') | |
run_time = time.time() - now | |
print('Run time: {:.2f}'.format(run_time)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment