diff --git a/Solid/GeneticAlgorithm.py b/Solid/GeneticAlgorithm.py index 31c9f62..cf1c83c 100644 --- a/Solid/GeneticAlgorithm.py +++ b/Solid/GeneticAlgorithm.py @@ -187,7 +187,7 @@ def run(self, verbose=True): self.cur_steps += 1 if ((i + 1) % 100 == 0) and verbose: - print self + print(self) self.population = self._select_n(num_copy) self._populate_fitness() @@ -205,7 +205,7 @@ def run(self, verbose=True): self.best_member = deepcopy(best_member) if self.max_fitness is not None and self.best_fitness >= self.max_fitness: - print "TERMINATING - REACHED MAXIMUM FITNESS" + print("TERMINATING - REACHED MAXIMUM FITNESS") return self.best_member, self.best_fitness - print "TERMINATING - REACHED MAXIMUM STEPS" + print("TERMINATING - REACHED MAXIMUM STEPS") return self.best_member, self.best_fitness