Quick and Dirty OCR for Letterpress & Other Tile-based Games

I’ve been playing enough Letterpress lately to realize that I’m not great at it. This is super frustrating for me when this is a game that you could easily teach a computer to play.
I’m not the first person to have that thought. There are plenty of cheating programs for Letterpress (just google or search in the app store).
I haven’t investigated these solvers but in thinking about the problem, the basic approach would seem to be:
- Take screenshot of game and import it into solver
- Parse the board into a string of letters
- Reduce a dictionary of valid words against those characters to find playable words
- Optionally make recommendations of which word to play based on current board state and strategy.
I wondered how quickly I could throw something together to simply parse the game board into a string of letters. It turns out it is super easy. To get started I took a screenshot of a game in progress and downloaded it from my phone.
Read on →