diff --git a/.gitignore b/.gitignore index 6286c27..2fe854c 100644 --- a/.gitignore +++ b/.gitignore @@ -31,6 +31,7 @@ copycat.log # Output output/* +<<<<<<< HEAD copycat.log papers/*.log papers/*.pdf @@ -38,3 +39,5 @@ papers/*.out papers/*.aux papers/words *.txt +======= +>>>>>>> develop diff --git a/copycat/copycat.py b/copycat/copycat.py index 96e36be..45f5e1b 100644 --- a/copycat/copycat.py +++ b/copycat/copycat.py @@ -7,6 +7,7 @@ from .gui import GUI from pprint import pprint + class Reporter(object): """Do-nothing base class for defining new reporter types""" def report_answer(self, answer): @@ -90,6 +91,7 @@ class Copycat(object): self.gui.update(self) self.gui.refresh() answers = {} + self.temperature.useAdj('pbest') while True: if self.check_reset(): answers = {} @@ -110,10 +112,13 @@ class Copycat(object): for answer, d in answers.items(): d['avgtemp'] = d.pop('sumtemp') / d['count'] d['avgtime'] = d.pop('sumtime') / d['count'] + pprint(answers) + return answers def run(self, initial, modified, target, iterations): + self.temperature.useAdj('best') + self.gui.app.reset_with_strings(initial, modified, target) self.workspace.resetWithStrings(initial, modified, target) - answers = {} formula = 'pbest' self.temperature.useAdj(formula) diff --git a/gui.py b/gui.py index 521a4d2..a3c72a5 100755 --- a/gui.py +++ b/gui.py @@ -4,6 +4,10 @@ import logging from copycat import Copycat, Reporter +import matplotlib.pyplot as plt + +plt.style.use('dark_background') + class SimpleReporter(Reporter): def report_answer(self, answer): print('Answered %s (time %d, final temperature %.1f)' % (