i just wrote a wordle solver in thunkable! it seems to be able to solve a wordle game inside 6 moves. after you start it, it will present a next guess. enter this in wordle and wait for the feedback. encode this into the solver as letter codes (g=green, matched at exact location, y=yellow, found somewhere in the word, b=black or blank, not found in the target word). in the example below, the solver gave me SOCKO as the 2nd guess, and i entered back yggbb and press Evaluate to indicate how wordle responded. the solver is based on a 5700 word list and there is a possibility that a word might not be in wordle’s dictionary. in such a case, just press NF-Skip (not found).
it still has a lot of rough edges. if you’re stuck in a loop or cannot end the guessing, just press Restart to begin a new game.
Example: with oc in correct positions and s available in the word you will have the expression as
Which should get you all words having oc as second and third characters and includes s anywhere in the word of 5 characters when searching through the list of possible words delimited by a comma.
keep all words that contain guess(1) (ie. 1st letter of guess) in any position.
keep all words where guess(2) matches word(2)
keep all words where guess(3 matches word(3)
keep all words EXCEPT words that contain guess(4) anywhere
keep all words EXCEPT words that contain guess(5) anywhere
the challenge is to create the regex on the fly, dynamically!
in order to call the webviewer rouitine, you pass the word list and the regular expression you wish to apply to it. So, i must warn you that the first call to the webviewer routine sends the full word list (5700+ words) everytime! the next succeeding calls reduce that number more and more until we find a solution or run out of guesses (which could happen).
i ran the solver against the wordle version of @tony.ycy.program and it found the target in 4 moves. (your mileage may vary).
if you don’t know about it yet, you should read up on regular expressions and how they are used.
for example, if the solver proposes a word, say "saute"and you type back a color response of “ygbby”, this is the regular expression my solver generates: