Wordle! Cheat bot
Description:
Wordle is a game where you try to guess a 5-letter word. https://www.nytimes.com/games/wordle/index.html
After each guess, the color of the tiles (letters) will change to show how close your guess was to the word.
- Green (G) letter: This letter is in the correct position
- Yellow (Y) letter: This letter is present in the word, but in the wrong position
- Grey (-) letter: This letter is not in the word, except when the special rule applies (see below)
For this kata, instead of playing the game like an honest person, you are to write a cheat-bot that filters down the set of words (wordlist) using a list of guesses and their respective feedbacks. For example, if you were provided this wordlist and feedbacks:
{"SHEEP", "KINKY", "SWEET", "MAUVE", "FLUNG", "SKEET", ... } # wordlist
[("SPOIL", "G----"), ("STEAD", "GYG--"), ("SEETH", "GYGY-")] # guesses
Your output should be the set of remaining words, each satisfying all the hints in guesses:
{'SWEET', 'SKEET'} # <- your output
And because you are special, this kata will not be restricted to 5-letter words!! The word length for each test case, however, would be consistent with the guesses. If the test case asks for a 9-letter word, all guesses in the hints would be of length 9. Make sure you can handle some big words!
!! There are special rules when the same character appears multiple times in the guesses and/or the solution. After assigning greens to all applicable tiles, any remaining guessed characters will be assigned yellow until no matching character is left in the solution, the rest will be assigned grey. For example, if the solution is "ATARI", and the guess is "ABBAA", the hint would be "G--Y-"
Similar Kata:
Stats:
Created | Apr 12, 2022 |
Published | Apr 12, 2022 |
Warriors Trained | 869 |
Total Skips | 19 |
Total Code Submissions | 2654 |
Total Times Completed | 78 |
Python Completions | 78 |
Total Stars | 45 |
% of votes with a positive feedback rating | 89% of 27 |
Total "Very Satisfied" Votes | 23 |
Total "Somewhat Satisfied" Votes | 2 |
Total "Not Satisfied" Votes | 2 |
Total Rank Assessments | 5 |
Average Assessed Rank | 5 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 6 kyu |