def manhattan_heuristic(position, problem, info={}):
    """Return Manhattan distance heuristic for a PositionSearchProblem."""
    xy1 = position
    xy2 = problem.goal
    return abs(xy1[0] - xy2[0]) + abs(xy1[1] - xy2[1])