MENU
Systems & Tools

Wordle Bot

Repository
Word pool12,000+
Filter speedMicroseconds
Filter backendHashSet
Sim modeFull dictionary

A CLI tool that plays and solves Wordle via frequency-based heuristics and constraint filtering. The solver maintains a live word pool of 12,000+ candidates, pruning it after each guess using a HashSet-backed filter engine that enforces correct positions, misplaced constraints, and forbidden characters. A simulation mode tests opening words against the entire dictionary to find statistically optimal starts such as CRANE and SLATE.

#Rust

Iterative Solver Loop

The solver runs a state-driven loop that guides the user through the elimination process. It captures each guess and a feedback pattern where c marks a correct position, m a misplaced letter, and w a wrong letter. Using io::stdin and io::stdout, the loop updates the word pool in real-time after each constraint is applied.

Heuristic Filtering Engine

The filtering logic lives in filter.rs. It chains predicate functions to prune the word list after each guess: a check for strictly forbidden characters, enforcement of correct positions, and misplaced-letter validation via a HashSet for O(1) membership lookups. This reduces a pool of 12,000+ words down to a handful of candidates in microseconds.

Terminal Rendering and ANSI Colors

The terminal renderer uses ANSI escape codes to produce color-coded output consistent with the original game: green for correct, yellow for misplaced, and gray for wrong letters. print_summary redraws the board and a dynamically updated virtual keyboard after each turn.

Strategy Simulation

The simulation engine tests each starting word against the entire dictionary, recording the average guess count needed to reach the target. Analysis across the full word list identified CRANE and SLATE as high-performing openers based on letter frequency and positional coverage.

Try It Out

Download

To run the bot from your terminal (Command Prompt or PowerShell), navigate to the folder where you downloaded the file and type: wordle-bot.exe