GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - bryanesmith/wordle-help: CLI tool that helps players decide their next guess while playing Wordle.

BranchesTags
Open more actions menu

Latest commit

 

History

31 Commits
31 Commits

Folders and files

NameName
Last commit message
Last commit date
go-sdk
go-sdk
 
 
wordlehelp
wordlehelp
 
 
wordlesims
wordlesims
 
 
.gitignore
.gitignore
 
 
Makefile
Makefile
 
 
README.md
README.md
 
 
go.mod
go.mod
 
 

Repository files navigation

wordle_help

CLI tool that helps players decide their next guess while playing Wordle.

Usage

Print help:

wordle_help -h (or wordle_help --help)

Provide one or more guesses:

wordle_help -g "slate"

wordle_help -g "slate" -g "[p][r](o)ps" -g "[p][r]i[o]n"

Guess encoding

Each guess is a 5-letter word. You can optionally annotate letters with:

  • Green letters: surround the letter with [ ] (correct letter, correct position)
  • Yellow letters: surround the letter with ( ) (correct letter, wrong position)

Examples:

  • slate means none of s, l, a, t, e appear in the answer.
  • [p][r](o)ps means:
    • p and r are green in positions 1 and 2
    • o is present but not in position 3
    • the second p is unmarked, so p is excluded elsewhere

Building

make build

Running tests

make test

Cleaning

make clean

How results are sorted

Instead of printing candidates alphabetically, wordle_help prints them in ascending order of E_remaining (the estimated number of remaining candidates after making that guess).

Let:

  • C be the current set of remaining candidate answers (size N)
  • g be a potential guess
  • f(g, a) be the 5-tile Wordle feedback pattern (gray/yellow/green, including duplicate-letter rules) you would see if the true answer were a and you guessed g

For a fixed guess g, the mapping a -> f(g, a) partitions C into buckets by feedback pattern. If bucket p has size n_p, then:

E_remaining(g) = (1/N) * Σ_p n_p^2
E_eliminated(g) = N - E_remaining(g)

The tool prints each candidate guess along with these two values.

Simulating games

After building, you can simulate one or more games using bin/wordle_sims. The tool will run bin/wordle_help multiple times to simulate the game, and gather statistics about the number of guesses it takes to solve each game if it uses the suggested guess at the top of the list.

Provide exactly one starting word and optionally one or more answers:

make build

# Simulate 50 games with slate as the starting word and random answers:
bin/wordle_sims -s slate 

# Simulate 2 games with slate as the starting word and stale and apple as the answers:
bin/wordle_sims -s slate -a stale -a apple 

If you omit all -a/--answer flags, the tool will randomly sample 50 answers from /usr/share/dict/words.

The tool prints the bin/wordle_help commands it runs (without printing their output), then prints a summary table of the game results along with the average number of guesses it took to solve each game. E.g.,:

| Starting Word | Answer | Total Guesses |
| ------------- | ------ | ------------- |
| slate | fifie | 4 |
| slate | smith | 3 |
| slate | blare | 6 |
...
| slate | unfur | 4 |

Average guesses: 4.07

| Guesses | Count |
| ------- | ----- |
| 1       | 0 |
| 2       | 1 |
| 3       | 8 |
| 4       | 23 |
| 5       | 9 |
| 6       | 2 |

Project layout

  • wordlehelp/
    • main.go: CLI entrypoint for wordle_help; parses flags, validates guesses, builds regex, and prints sorted candidates
  • wordlesims/
    • main.go: CLI entrypoint for wordle_sims; runs multiple simulations by repeatedly calling bin/wordle_help
  • go-sdk/
    • recommendations/: SDK entrypoint for recommendations (go-sdk/recommendations.NextGuessRecommendations)
    • utils/: Candidate filtering/scoring logic, plus guess parsing/validation and regex construction utilities
  • bin/
    • wordle_help: executable that helps players decide their next guess while playing Wordle
    • wordle_sims: executable that simulates games of Wordle and reports aggregate results

About

CLI tool that helps players decide their next guess while playing Wordle.

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.