private void nextState() {
		switch (state) {
		case FIRST_SWEEP:
			if (alreadyConsidered + dim >= alphabet.length()) {
				state = State.IMPROVE_SOLUTION;
				solutionToImprove = getSolutionToImprove(guesses);
				Integer[] info = guesses.get(solutionToImprove);
				
				TreeMap<String, Integer[]> reducedMap = new TreeMap<String, Integer[]>(guesses);
				reducedMap.remove(solutionToImprove);
				
				reducedAlphabet = getReducedAlphabet(reducedMap);
				regulars = info[0];
				irregulars = info[1];
				char[] chars = new char[dim];
				Arrays.fill(chars, '*');
				finalPermutationString = new String(chars);
				
				if (regulars + irregulars == dim) {
					state = State.FINAL_PERMUTATION;
					for (int i = 0; i < dim; i++) {
						solution[i] = 0;
					}
					finalPermutationString = solutionToImprove;
				}
			}
			break;
		case IMPROVE_SOLUTION:
			if (okChars == dim) {
				fillFinalPermutationString();
				state = State.FINAL_PERMUTATION;
			} else {
				improvedIndex++;

				
				if (improvedIndex == dim) {
					improvedIndex = 0;
					reducedAlphabet = reducedAlphabet.substring(1, reducedAlphabet.length());
				}
			}
			
			break;
		default:
		}

	}