def H(self, state): if (state == self.destination): return 0 problem = RomanianRouting(state, self.destination) a, b, c, d, e = Searches.UCSGraph(problem) if (b > 211): b -= 211 else: b = 0 return b