private static CubeNode search(int bound) {
		nodesVisited++;

		while (!frontier.isEmpty()) {
			nodesVisited++;
			CubeNode current = frontier.poll();
			// If we have found the goal, return the goal node
			if (Arrays.equals(current.state, Cube.GOAL.toCharArray())) {
				return current;
			}
			// Add this current node to our explored set
			explored.add(current);
			// Get all of the possible successors from the given node
			ArrayList<CubeNode> successors = CubeNode.getSuccessors(current);
			// Iterate over each of the successors
			for (CubeNode successor : successors) {
				int f = current.g + successor.heuristic;
				successor.g = current.g + 1;
				if (f <= bound && !explored.contains(successor)) {
					// Add it to our frontier
					frontier.add(successor);
				}
			}
		}
		// We did not find the solution at this bound
		return null;
	}