From 5f8c3e91b911a9597cc6fed41c8f504cf1f0a0b6 Mon Sep 17 00:00:00 2001 From: cclauss Date: Wed, 28 Jun 2017 15:11:37 +0200 Subject: [PATCH] print_function --- Solid/StochasticHillClimb.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Solid/StochasticHillClimb.py b/Solid/StochasticHillClimb.py index da68352..b6a5333 100644 --- a/Solid/StochasticHillClimb.py +++ b/Solid/StochasticHillClimb.py @@ -114,7 +114,7 @@ def run(self, verbose=True): self.cur_steps += 1 if ((i + 1) % 100 == 0) and verbose: - print self + print(self) neighbor = self._neighbor() @@ -126,7 +126,7 @@ def run(self, verbose=True): self.best_state = deepcopy(self.current_state) if self.max_objective is not None and self.best_objective > self.max_objective: - print "TERMINATING - REACHED MAXIMUM OBJECTIVE" + print("TERMINATING - REACHED MAXIMUM OBJECTIVE") return self.best_state, self.best_objective - print "TERMINATING - REACHED MAXIMUM STEPS" - return self.best_state, self.best_objective \ No newline at end of file + print("TERMINATING - REACHED MAXIMUM STEPS") + return self.best_state, self.best_objective