Menu

I Built a Solver That Reads Block Blast Screenshots and Plans the Best Moves
📰

I Built a Solver That Reads Block Blast Screenshots and Plans the Best Moves

DEV Community: nextjs·michal·16 days ago
#rJ0dU3s1
#devtonextjs#devto#dev#board#solver
Reading 0:00
15s threshold

michal

Posted on Oct 30

Edited on Oct 30

Like a lot of people, I got hooked on Block Blast — and kept dying on boards that looked totally winnable. So I built a solver for it.

The idea is simple: upload a screenshot of your game, and the solver reads the board for you, then shows the best move for each of your 3 pieces, step by step.

Try it live: https://blockblastsolversi.com

Here's how it works.

Two problems, not one

Vision. A screenshot has to become data: an exact 8×8 board plus the shapes of the 3 pieces in the tray.

Search. Given that board, try the placements for all 3 pieces and keep the sequence that leaves the board healthiest. Reading the board with Python The screenshot analysis runs on a small FastAPI service: Find the board area in the image and split it into an 8×8 grid Classify each cell (filled / empty) by sampling colors near the cell center Extract the tray pieces the same way, as mini shape grids Themes and skins change the block colors, so fixed RGB matching failed constantly.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.