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.
Today's Attempt
Solved | QUACK
Guess Distribution
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.