private int secondBestNode(ArrayList<HeuristicNode> descendants, int best) {
		HeuristicNode secondBest;
		int secondBestNum;
		if (best == 0) {
			secondBest = descendants.get(1);
			secondBestNum = 1;
		}
		else {
			secondBest = descendants.get(0);
			secondBestNum = 0;
		}
		for (int i = 0; i < descendants.size(); i++) {
			if (i != best && i != secondBestNum
					&& descendants.get(i).getCriterion() < secondBest.getCriterion()) {
				secondBest = descendants.get(i);
				secondBestNum = i;
			}
		}
		return secondBestNum;
	}