Solvers · Live
Block Blast Solver,
powered by heuristic search.
Paint your current 8×8 board, pick the pieces you were dealt, and the solver will evaluate every valid placement, scoring for line clears, hole avoidance, and board balance, to recommend the highest-value move.
Your board
Click or drag to fill cells. Start on a filled cell to erase.
Upcoming pieces
Pick piece for slot 1
How it works
Inside the Block Blast heuristic solver.
Block Blast (and its variants like Block Blast! on iOS/Android) presents players with an 8×8 grid and up to three Tetromino-style pieces to place each turn. The pieces cannot be rotated; they must be placed as-is. Completing a full row or column clears it and awards points. The challenge: find placements that clear as many lines as possible without boxing yourself into a losing board state.
Our solver automates this search. It evaluates every legal arrangement of your pieces, including every ordering and returns the highest-scoring sequence.
Step 1: Painting your board
The 8×8 grid supports drag-to-paint for both mouse and touch screens. Press and hold on an empty cell to enter fill mode; every cell you drag over is filled. Press and hold on an already-filled cell to enter erase mode; every cell you drag over is cleared. This smart toggle means you never need to switch tools; the intent is inferred from the cell you start on.
Under the hood, the board uses Pointer Events (pointerdown, pointermove, pointerup), the unified W3C API that works identically for mouse, stylus, and touch. The grid captures the pointer with setPointerCapture, then uses document.elementFromPoint on each move event to determine which cell is under the finger, achieving perfectly smooth drag-painting on any device without separate touch-event handlers.
Step 2: Selecting pieces
The piece library covers every shape that appears in Block Blast: single dots, horizontal and vertical lines (2 through 5 cells), 2×2 and 3×3 squares, L/J-tetrominoes in all four orientations, corner trominoes, T-shapes, and S/Z-shapes. Pieces are organised into colour-coded groups matching the game's palette.
Select the active slot (1, 2, or 3), then click a piece thumbnail to assign it. The solver will automatically advance to the next empty slot. You can select between one and three pieces; partial inputs are valid.
Step 3: The heuristic search
The solver performs a complete brute-force search over all valid placements for each piece, combined with a heuristic scoring function to rank board states.
Because piece placement order matters (placing piece A first might clear a row that creates new space for piece B), the solver tries all permutations of your piece list, up to 3! = 6 orderings. For each ordering it performs a depth-first search, placing each piece in every legal position and recursing until all pieces are placed.
The scoring function
Once all pieces are placed, each candidate board state is scored on five criteria:
- Lines cleared (quadratic). Clearing N lines awards N² × 160 points. The quadratic reward makes combos (clearing multiple lines at once) disproportionately valuable — exactly as the game intends.
- Holes (−5 per hole). A hole is any empty cell that has a filled cell somewhere above it in the same column. Holes are dangerous because future pieces may never be able to reach them, turning them into permanent dead space.
- Column bumpiness (−0.5 per unit). The sum of absolute height differences between adjacent columns. Flat, uniform boards are easier to clear than jagged ones with deep valleys.
- Total column height (−0.4 per unit). Keeping the overall stack low preserves room for future pieces.
- Near-complete rows/cols (+8 per cell). Rows or columns that are 6 or more cells full are close to clearing and awarded a bonus, encouraging the solver to "set up" future clears rather than scatter pieces randomly.
The board state with the highest combined score wins, and its placement sequence is shown in the step-by-step output.
The "Continue" flow
After reviewing the recommended moves, click Continue with this board. The final predicted board state becomes your new current board, piece slots are cleared, and the page scrolls back to the top so you can immediately input the next set of pieces. This creates a seamless loop for playing through an entire game with solver guidance.
Limitations
The solver is a single-turn lookahead; it optimises the current set of pieces without knowing what comes next. Expert Block Blast play sometimes sacrifices short-term score to preserve a cleaner board for future turns. The heuristic scoring partially compensates for this (hole avoidance, near-complete row bonuses), but a multi-turn Monte Carlo search would be needed for perfect play. For most game states, the solver's recommendation is excellent.