From 0b3b86724063170544378bc912976ab7e1cff83a Mon Sep 17 00:00:00 2001 From: cclauss Date: Thu, 6 Jul 2017 21:53:15 +0200 Subject: [PATCH] Update HarmonySearch.py --- Solid/HarmonySearch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Solid/HarmonySearch.py b/Solid/HarmonySearch.py index c2e064c..44d1c85 100644 --- a/Solid/HarmonySearch.py +++ b/Solid/HarmonySearch.py @@ -109,7 +109,7 @@ def _score_all(self): :return: None """ - self.scores = list([self._score(x) for x in self.memory]) + self.scores = [self._score(x) for x in self.memory] def _worst_score(self): """ @@ -139,7 +139,7 @@ def run(self, verbose=True): for i in range(self.max_steps): self.cur_steps += 1 - if ((i + 1) % 100 == 0) and verbose: + if verbose and ((i + 1) % 100 == 0): print(self) self._score_all()