Ruzzle Solver began as a school algorithm exercise and grew into a full-stack engineering project. To date, Ruzzle Solver has reached over 2 million users, garnered some limited press attention, and even earned an invitation to collaborate with the renowned Italian book publisher, Zanichelli.
Ruzzle Solver is a high-performance word-finding engine designed to solve 4x4 Ruzzle grids in real-time. The core problem is to find all possible words in a 16-cell grid using an dictionary of 600.000 words. However, doing this efficiently on a web server requires more than just a “brute force” approach.
I explored three different methodologies to find the most efficient path for the solver:
| Method | Logic | Performance |
|---|---|---|
| Full Enumeration | Recursive search of every possible path. | ~2.5s |
| Active Dictionary | Sequential scan of the dictionary, checking if each word exists in the grid. |
~150ms |
| Branch & Bound | Uses a Trie (Prefix Tree) to prune paths that don't lead to valid words. |
<1ms |
I implemented a hybrid edge-offloading architecture to maintain high responsiveness under heavy concurrent load:
Key Benefits:
The web-based solver was a success, but my next challenge was to remove the “human in the loop” entirely.
I wanted to see if I could build a system that didn’t just suggest words, but actually played the game while remaining human like.
Combining computer vision and a custom behavioral AI, I built a system capable of climbing the top 10 national leaderboards of the physical game undetected, until I eventually shut it down.
The system creates a closed-loop cycle between the smartphone and the Raspberry Pi:
At the end of every Ruzzle game, the other player’s words were visible and could be observed. For this reason, a bot that finds every word instantly can easily get banned. To reach the national top 10, I had to engineer “human-like” flaws into the AI:
Generic OCR libraries like Tesseract were too slow and prone to errors for the specific Ruzzle font and background noise. I developed a specialized fingerprint-based OCR that achieved 100% accuracy for this use case.
Grid Sampling: Each letter cell is divided into a grid (81 points).
Binary Encoding: Each point is converted to a bit: 1 for the letter
(black) and 0 for the background (white).
Similarity Function: To handle noise, I implemented a scoring algorithm to compare the live fingerprint against a trained library:
Performance: This bitwise comparison is very fast and far more robust than traditional pattern matching for fixed-font environments.