Download the ZIP file - this includes an executable JAR file, an English dictionary file, and the background image for the GUI. Instructions are provided inside the program. You will need the length of the single word you are trying to solve for. How To Run
Every word that is the same length as the one you are trying to solve for is taken from the dictionary file and stored in an array list as separate objects. A double array containing every letter of the alphabet tracks of the number of times every letter appears in each word in the array list and stores its frequency. As this double array is sorted from highest to lowest frequency, the initial best guess is produced: the most frequently occurring letter out of every word matching your word length. How It Works (In a Short Summary)
The next step involves two possible cases:
CASE 1 The best guess that was produced is CORRECT. You would then add this letter to the corresponding spot(s) provided in the solver. The solver handles this updated word by removing all words stored in the array list that do not contain the letter in those specific spot(s), updating the possible words. The double array containing every letter's frequency is then updated for the shortened array list, generating a new most frequently occurring letter to be the best guess.
CASE 2 The best guess that was produced is INCORRECT. You would then simply submit this to the solver by not updating the letter spots for the word at all. The solver adds this letter to an array of incorrect letters and shortens the array list by removing all words containing this letter, updating the possible words. The double array containing every letter's frequency is then updated for the shortened array list, generating a new most frequently occurring letter to be the best guess.
This process continues until either the word is solved or the maximum number of incorrect guesses has been reached.