protected CandidatePair getNext(List<Candidate> outCandidates, List<Candidate> inCandidates) {
    CandidatePair move = null;
    int size = -1;
    for (int x = 0; x < outCandidates.size(); x++) {
      for (int y = 0; y < inCandidates.size(); y++) {
        if (x == 0 || y == 0 || outCandidates.get(x).node != inCandidates.get(y).node) {
          Set<Integer> reachable = new HashSet<Integer>();

          if (x != 0) {
            reachable.addAll(outCandidates.get(x).reachable);
          }

          if (y != 0) {
            reachable.addAll(inCandidates.get(y).reachable);
          }

          if (reachable.size() >= size) {
            size = reachable.size();
            move = new CandidatePair(outCandidates.get(x), inCandidates.get(y));
          }
        }
      }
    }
    return move;
  }