Back to Portfolio

Wordle Worker

A better way to stay on top of the NYT games.

This integrated application is a full-stack automation system designed to play the game of Wordle. The back end is a Python script utilizing the Selenium library to interact with the Wordle webpage, making guesses and logging the results of each game to a CSV file. The front end, processes this CSV data and presents it on a Wordle style dashboard. This dashboard is generatedand using the game outcomes and a bar chart displaying the overall results of the worker. For a visual breakdown of how the script works, please refer to the attached flowchart.

Gameplay Script

The provided Python script automates playing the online game Wordle. It uses Selenium to control a web browser, acting as a solver. The script's main function is to systematically make guesses, analyze the results from the game page (correct, present, or absent letters), and refine its list of possible words to choose the next best guess. The script also saves the game's results to a CSV file.

Launch Selenium, open Wordle Score candidates & submit next guess Read tile feedback: correct / present / absent Filter candidate word list Solved, or 6 guesses used? Log result to results.csv Dashboard reads results.csv Render board + guess-distribution chart Yes No

Today's Attempt

Solved | QUACK

CRANE
SCAIL
GUACO
QUACK

Guess Distribution

1
2
22
3
48
4
52
5
12
6
12
X

147 games | 91.8% success

Web App

The application's core functionality is to process and display the data. It first parses the raw result strings from the CSV, converting them into a structured format. Then, it loads and sorts the game data, distinguishing the most recent game from the historical data. The app also calculates a guess distribution, showing how many games were solved in 1, 2, or up to 6 guesses, as well as how many games the solver failed to complete. On the front end, the HTML code renders a dynamic dashboard, including a bar chart for the guess distribution and a detailed, color-coded grid for each game's guesses, mimicking the actual Wordle game board.

Future Development

The bot's letter-frequency scoring works well early on, but it can get stuck once several words share the same confirmed letters, like CHIRP, CHIRL, CHIRT and CHIRU in the image, where only the last letter is still unknown. A smarter next guess would tackle that ambiguity head-on. Guessing TULIP, for instance, tests three of the four candidate letters (T, U, L, P) in one go, even though it can't be the actual answer, cutting a worst case of four guesses down to just two: one to narrow it down, one to confirm it.

C H I R ? Words matching C H I R _: CHIRP CHIRL CHIRT CHIRU 4 candidates fit the same pattern — letter-frequency scoring can't tell them apart.