0

I use the following code to solve Wordle(https://www.powerlanguage.co.uk/wordle/).

The variable f contains the pattern for the non-existing letters. Select function filters the words which must contain the letter in the word. After every try, I change the variable f to include the new letters that should not exist and also add more pipelines of the Select function to filter the words.

f = "[^wodnastjuic]"

DictionaryLookup[RegularExpression[StringJoin[f, "e", f, f, "y"]]] // Select[StringContainsQ["r"]] // Select[StringContainsQ["p"]]

There are some minor inconveniences with this code

  1. Multiple Select pipelines are required for every letter
  2. If in a given position a letter is misplaced then using pattern variable f is not optimal, since it does not filter the words that contain the misplaced letter at that position. This can be addressed by providing a new pattern for that position.

Given that the UI will be external how to solve this efficiently?

Talespin_Kit
  • 164
  • 5
  • 1
    For some pointers see 255309 – Syed Jan 28 '22 at 14:58
  • Disambiguation: What google thinks of the word wordle. Mathematica has its own built-in WordCloud function. There used to be a site called "wordle.net" (can't remember exactly) that used to make word-clouds but it does not exist anymore. – Syed Jan 29 '22 at 18:53

0 Answers0