Skip to content

Commit

Permalink
print_function
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss authored Jun 28, 2017
1 parent 48c5f2e commit 5f8c3e9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Solid/StochasticHillClimb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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
print("TERMINATING - REACHED MAXIMUM STEPS")
return self.best_state, self.best_objective

0 comments on commit 5f8c3e9

Please sign in to comment.