public static void main(String[] args) {


		// Present the user with the available options.
		System.out.print(menu);

		// Read in the user's choice.
		String userSelection = null;
		int depthLimit = DEFAULT_DEPTH_LIMIT;
		userSelection = stdIn.nextLine().trim();

		while (!userSelection.equalsIgnoreCase("q")) {

			switch (userSelection.charAt(0)) {

			case '0':
				System.out.print("Generating the heuristic values for the edge cubies in group one.\nPlease enter a depth limit: ");
				userSelection = stdIn.nextLine().trim();
				try {
					depthLimit = Integer.parseInt(userSelection);
				} catch (NumberFormatException e) {
					System.out.println("Invalid depth limit specified. Using the default depth limit of " + DEFAULT_DEPTH_LIMIT);
				}
				iterativeDeepening(new EncodeStrategyCorner(), MAX_CORNER_PERMUTATIONS, "corners.txt", depthLimit);
				System.out.println("Finished generating heuristic values. Results stored in file 'corners.txt'.");
				break;
			case '1':
				System.out.print("Generating the heuristic values for the edge cubies in group one.\nPlease enter a depth limit: ");
				userSelection = stdIn.nextLine().trim();
				try {
					depthLimit = Integer.parseInt(userSelection);
				} catch (NumberFormatException e) {
					System.out.println("Invalid depth limit specified. Using the default depth limit of " + DEFAULT_DEPTH_LIMIT);
				}
				iterativeDeepening(new EncodeStrategyEdge(CubieGroup.EDGE_ONE), MAX_EDGE_PERMUTATIONS, "edges1.txt", depthLimit);
				System.out.println("Finished generating heuristic values. Results stored in file 'edges1.txt'.");
				break;
			case '2':
				System.out.print("Generating the heuristic values for the edge cubies in group one.\nPlease enter a depth limit: ");
				userSelection = stdIn.nextLine().trim();
				try {
					depthLimit = Integer.parseInt(userSelection);
				} catch (NumberFormatException e) {
					System.out.println("Invalid depth limit specified. Using the default depth limit of " + DEFAULT_DEPTH_LIMIT);
				}
				iterativeDeepening(new EncodeStrategyEdge(CubieGroup.EDGE_TWO), MAX_EDGE_PERMUTATIONS, "edges2.txt", depthLimit);
				System.out.println("Finished generating heuristic values. Results stored in file 'edges2.txt'.");
				break;
			case '3':
				RubiksCube startState = loadCubeFromFile();
				if (startState != null) {
					String solution = findOptimalSolution(startState);
					System.out.println("\nSolution Path: " + solution);
					System.out.println();
				}
				break;
			default:
				System.out.println("Not a valid choice. Please select an option from the following...");
			}

			System.out.print(menu);
			userSelection = stdIn.nextLine().trim();
		}

		// Cleanup...
		stdIn.close();

	}