private void addSuccessors(SearchNode best, Queue<SearchNode> openList, T target) {
   for (T p : best.getObject().getSuccessors()) {
     numNodes++;
     SearchNode newNode = new SearchNode(best, p, target);
     depth = Math.max(newNode.getDepth(), depth);
     openList.add(newNode);
   }
 }
 @Override
 public int compareTo(SearchNode that) {
   return Integer.compare(
       h.getDistance(this.node, goal) + this.getDepth(),
       h.getDistance(that.node, goal) + that.getDepth());
 }