Pathfinder: max_cost() -> Int