Some trends refuse to die. For a brief moment in 2022 a game called Wordle trended as a popular word guessing game.
In 2222, during a moment of boredom during your voyage, you and your friends onboard resurrect the 200 year old classic but with your own twist. Your friends decide the 5 letter version is too easy, so decide to convert it to a 7 letter variant.
In this variant, the aim of the game remains unchanged: the player attempts to find a word in a limited number of guesses. After a guess is made, the 7 letters are colored by the following rules:
A word is valid if it matches the responses of all guesses.
Your friends think that by using 7 letter words it will be too hard for you to solve, however they didn't count on you bringing your computer science skills to the table! You source a list of 7 letter words (your input data) and decide to create a program that will test guesses against it to find the answer.
Three guesses were made that produced the following color coded responses:
hapless GBYYYBB
jackpot BBBBYBB
fullest YYGYYBB
hapless
informs you that the final word starts with the letter h
and also contains the letters p
, l
and e
. The letters a
, and s
do not appear in the final word.jackpot
informs you that the final word contains the letter p
, which we already knew so it wasn't a lot of help, except that we can also rule out the letters j
, a
, c
, k
, o
, and t
.fullest
informs you that the final word contains the letter l
in the 3rd position, and also contains the letters f
, u
, l
and e
. The letters s
and t
are not in the final word.By process of elimination, the only word that matches this in the input data is helpful
, so that would be the answer.
The input data contains your word list. Find the only word that matches the following guesses: That is your answer.
keyless YYBBYYG
society YGYYYBB
phobias BBGBGBG
Wordle adaption by Edward Zhang and Paul Baumgarten.
Input data word list derived from github.com/dwyl/english-words.
A video walkthrough for learning how to solve this problem is available here.