An automated solver for the Wordbox game on Plato. This tool uses computer vision to detect the game board, efficiently finds all possible word combinations, and automatically plays them using simulated mouse movements to maximize your score.
In the demo above, you can see the solver in action:
- The user selects the game area using the snipping tool
- The solver detects the letter grid and bonus tiles
- All possible words are found and scored
- The mouse automatically drags through each word in sequence
- Words are played from highest to lowest score
- Automated Game Detection: Uses computer vision and OCR to detect and read the game board
- Intelligent Word Finding: Efficiently finds all possible words using an optimized Trie data structure
- Score Optimization: Considers bonus tiles and word length for maximum scoring
- Natural Game Play: Simulates human-like mouse movements with random variations
- Visual Debugging: Optional visualization of grid detection and word paths
- Python 3.7+
- Tesseract OCR
-
Install Tesseract OCR:
- Windows: Download and install from Tesseract GitHub
- Linux:
sudo apt-get install tesseract-ocr
- Mac:
brew install tesseract
-
Clone the repository and install dependencies:
git clone https://github.com/supat-roong/wordbox_solver.git
cd wordbox-solver
pip install -r requirements.txt
- Update
config.py
with your Tesseract installation path and word list location - Adjust color ranges and grid detection parameters if needed
- Configure solver parameters like minimum word length and maximum words to play
- Start your word puzzle game
- Run the solver:
python main.py
- Use the selection tool to highlight the game area
- The solver will:
- Detect the letter grid
- Find all possible words
- Play them automatically in order of highest score
- GridDetector: Handles computer vision and OCR for game board detection
- WordboxSolver: Finds all possible words using an efficient Trie structure
- Player: Controls mouse movements for automated gameplay
- SnippingTool: Allows user selection of game area
- Failsafe: Move mouse to screen corner to abort
- Configurable delays between actions
- Natural movement patterns to avoid detection
- Input validation and error handling
Enable debug mode in config.py
to visualize:
- Grid detection process
- Letter recognition
- Word paths and bonus positions
- Score calculations
- Parallel processing for larger grids
- LRU caching for prefix validation
- Optimized Trie structure for word lookup
- Memory-efficient grid processing
This project is licensed under the MIT License - see the LICENSE file for details.
This tool is for educational purposes only. Be sure to comply with the terms of service of any games you use it with.
The project is organized as follows:
wordbox_solver/
├── corpus/ # Word lists corpus
├── media/ # Media assets (e.g., gameplay videos)
├── src/ # Source code
│ ├── grid_detector.py # Game board detection
│ ├── solver.py # Word finding algorithm
│ ├── player.py # Mouse control and gameplay automation
│ ├── screenshot.py # Screen capture utilities
│ ├── config.py # Configuration settings
│ └── custom_dataclass.py # Custom data structures
└── main.py # Main entry point of the application