Inspiration

We just thought it would be cool to create a bot that helped us solve our wordle for the day.

What it does

The program first starts by gently informing the user how it works and while it does not provide the actual answers, it will make suggestions based off of researched letter frequencies in 5 letter words and the results that they (as the user) input. The program starts by storing all the 2,300 wordle solutions in an array list. It then calls a sorting method which will sort all the solutions with words that have the most amount of letter frequencies at the top. Then, the array list is run through another method which checks to see if the word at the top has any repeats (ex. apple: p is repeated twice). If the top word does have a repeated letter, it goes to the second word and checks that. Once the method finds a word that doesn't have any repeated words, it will return ONLY that word. This word is then suggested to the user as their first word.

The user then has the ability to input the suggested word into their wordle. They then feed their results back into the program.

The program then enters all this data into another method that is based around the color that the word received when submitting.

How we built it

We planned out the logic behind Wordle to start. When getting a grey tile, what words would be eliminated? What about green? Yellow? After flowcharts and whiteboard planning, we got our logic laid down and started thinking about what methods we would use or if we needed multiple classes. We decided that we did not need to use multiple objects, so we settled on one class. The methods we came up with were letter removals, avoiding repeated letters for the first word, calculating probability, and sorting our whole word list. Then, we needed to determine how we would sort our word list based on probability. We decided to use the percentage of times a letter showed up in a word on the wordle list (for example, since the letter 'a' shows up the most, words with a have a higher probability). Then we created text files that aligned with the frequency and the word list, read them in, and started to code our methods with our pre-laid logic.

Challenges we ran into

Duplicate letters. When one is yellow or green and another is grey, there is a whole issue of how we can avoid removing words that still have that grey letter.

Accomplishments that we're proud of

A bot that works! Avoiding running into program breaking bugs, a logic flow that works, and a project that we are able to present.

What we learned

We learned how to work with a team, how to troubleshoot, how to fix very important bugs in a short amount of time, and new things associated with java, such as the FileNotFoundException and the general io class.

What's next for Wordle-Bot

Working on a more efficient way to deal with duplicate letters, making a clearer input page, and implementing a GUI.

Built With

Share this project:

Updates