Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

gwn-wordle-solver-python

Documentation of the information-theoretic Wordle solving approach used as a benchmark for Wordle Wonk — the production GWN Wordle helper. Part of the Grande Web Network family.

Note: This is a docs-only repo. No source is published here — the live solver runs at wordlewonk.com. This README explains the algorithm for educational reference.

The idea (credit: 3Blue1Brown, 2022)

Pick the guess whose expected distribution of color-patterns (GREEN / YELLOW / GRAY per position) maximizes the Shannon entropy of the bucket distribution over still-possible answers. In plain words: choose the guess that, on average, eliminates the most possibilities no matter what the colors come back as.

Pseudocode

for each candidate guess G in allowed_guesses:
    buckets = {}
    for each remaining possible answer A:
        pattern = color_feedback(G, A)   # 5-tuple of GREEN|YELLOW|GRAY
        buckets[pattern] += 1
    total = len(possible_answers)
    entropy(G) = -sum( (n/total) * log2(n/total) for n in buckets.values() )

best_guess = argmax(entropy)

Benchmarked behavior

Run against the original Wordle answer list (2,315 words) and a full ~12K-word guess dictionary, pure-entropy strategy yields:

metric value
average guesses ~3.61
worst case 5 guesses
max-entropy first guess TARES or SOARE (tie-break)

Wordle Wonk uses positional letter-frequency heuristics instead — faster per guess, ~93% as optimal as pure entropy, and feels more natural to humans following along.

Related GWN tools

License

CC0-1.0 — docs are free to reuse.


Educational docs by GWN.

About

Educational Wordle solver using entropy maximization — teaches the algorithm with working code.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors