Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wordle solver #94

Closed
wants to merge 6 commits into from
Closed

Wordle solver #94

wants to merge 6 commits into from

Conversation

julianhyde
Copy link
Collaborator

Wordle is a daily puzzle where you try guess a word drawn from a corpus of 12,972 five-letter words. Each time you guess, you are told which letters were correct, and you can use that information in a subsequent guess.

The result of a guess is called a "mask". When we guess "tiger" for "gazer", we get the mask "bbygg" (black-black-yellow-green-green), which means that "g" is in the wrong place, and "e" and "r" are in the right place.

What is the optimal word to guess at each stage? It is the word that delivers the most information.

Suppose there are 5 words left we are considering two guesses; "zebra" might yield mask1 with 3 words and mask2 with 2 words; and "tiger" might yield mask3 with 4 words and mask4 with 1 word. "Zebra" is a better choice, because the largest group (mask1 with 3 words) is smaller than "tiger"'s largest group (mask 3 with 4 words).

@julianhyde
Copy link
Collaborator Author

Merged as bb77fe7.

Tag https://github.com/julianhyde/morel/tree/0095-mutually-recursive.0 has the raw commits for this and #95.

@julianhyde julianhyde closed this Jan 4, 2022
@julianhyde julianhyde deleted the 0090-wordle branch January 4, 2022 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant