Ouleiya
Home › Guides › How We Make Sure Every Puzzle Level Is Solvable

How We Make Sure Every Puzzle Level Is Solvable

By the Ouleiya team · September 27, 2026

Anyone who plays puzzle games for long enough eventually hits a level that feels wrong. You try every idea you have, you restart ten times, and you start to wonder if the level can be beaten at all. Sometimes it can’t. Randomly generated puzzles are easy to build and very easy to get wrong, and a generator that deals out an impossible sort puzzle only one time in fifty will still ruin somebody’s evening.

We made one rule for every game on Ouleiya: if we generate a level, we prove it can be solved before you see it. This post explains how that works in practice, and why “solvable” and “fun” are two separate problems.

Two ways to build a fair level

There are really only two reliable approaches, and we use both.

1. Build backwards from the solution

Some puzzles can be created by starting from the finished state and scrambling it with moves that can always be reversed. If every scramble step has an exact undo, the player can always walk back to the solution, so the level is solvable by construction.

This is how many sliding-tile puzzles are made. It’s cheap and it never fails, but it has a weakness: reversible scrambles tend to produce levels that feel random rather than designed. The mess is fair, but it isn’t interesting.

2. Generate freely, then run a solver

The second approach is to generate a level however you like — random shuffles, hand-written templates, a mix of the two — and then hand it to a program that searches for a solution. If the solver finds one, the level ships. If not, we throw it away and generate another.

For sorting games like Color Pour and Bolt Sort, the search is a classic graph search. Each state is the contents of every tube or bolt; each move is “pour/move the top of A onto B”; the goal is every container holding a single colour. The number of states grows fast, so the solver needs a few tricks:

For Sudoku the requirement is stricter: a proper Sudoku has exactly one solution. Our generator removes clues one at a time and, after each removal, runs a solver that counts solutions and stops as soon as it finds a second one. If a removal would allow two answers, that clue goes back in. Pixel Logic pictures get a similar check with a line solver, which only makes the deductions a human could make one row or column at a time. If the line solver can’t finish a picture, a player would be forced to guess, so that picture is edited or dropped. Mine Finder goes one step further than the classic game: by default, a solver plays each board from your first click before you see it, and the board is only used if it can be cleared without a single guess.

Solvable isn’t the same as fun

Once every level is provably fair, the next question is whether it’s any good. A level can be solvable and still boring (one obvious move after another), or solvable and still miserable (a single narrow path through a hundred dead ends).

In our mobile screw puzzle, Screw Creek, we measure difficulty with a second, deliberately imperfect player. Instead of searching exhaustively, it plays the way a person often does: it makes reasonable-looking moves, sometimes picks the wrong one, and gives up after a while. Run it many times on a candidate level, record how often it wins, and that pass rate turns out to be a useful dial:

Imperfect-player pass rate What it feels like Where we use it
85–100% Relaxing, almost a victory lap Early levels, levels right after a hard one
50–85% Needs some thought Most levels
10–35% A real wall, needs planning or a helper Occasional “boss” levels

Mixing these in a sawtooth pattern — a few easier levels, a climb, then a hard one — keeps a game from being a flat line. The browser games use simpler dials that are easier to reason about: Color Pour adds a colour every few levels, Bolt Sort rotates between roomy and tight layouts, and Sudoku grades each puzzle by the hardest technique a logic solver needs to crack it — singles for Easy, pairs and pointing for Hard, X-wings and similar patterns for Expert.

What the helpers are for

Undo, an extra empty tube, and hints aren’t there to rescue impossible levels, because there aren’t any. They exist to shorten the distance between “I’ve made a mistake” and “I’m playing again.” A limited undo encourages you to experiment; an extra container turns a boss level from a wall into a tough climb. We deliberately keep them limited so that planning still matters.

Why this matters to you

When you’re stuck on one of our levels, you can be sure of one thing: there’s a way through. That changes how it feels to be stuck. Instead of “this game is broken,” the question becomes “what am I not seeing?” — and that question is the whole point of a puzzle.

If you ever do find a level that seems impossible, we genuinely want to hear about it. Send the game name and level number through our contact page and we’ll run it through the solver ourselves.

Play the games from this guide