Every Star Battle and Queens page on this site makes the same quiet promise: exactly one solution, reachable by pure logic, no guessing required. Seven times a day, across those two games, we have to actually keep it — four Star Battle boards from Easy up to Expert, plus three Queens boards. This is the article about how. Not the marketing version; the version with the rejection counters in it.

We Generate the Solution First

We never build a puzzle and then check whether it works. We build the answer and construct the puzzle around it, back to front.

For Star Battle, the generator starts from a precomputed star layout: a full grid's worth of star positions that already satisfies the row, column, and adjacency rules. Then it draws the regions. Each region gets seeded on one star and grows outward, cell by cell, until it swallows a second star, backtracking when it paints itself into a corner. Leftover cells get folded in afterwards, always feeding the smallest neighbouring region so no region balloons while another starves.

Queens works the same way in miniature: place one queen per row and column with no two touching (for consecutive rows, that just means their columns must sit at least two apart), then grow one colour region out of each queen's cell until the board is covered. Some regions are told to sprawl, some to stay tiny. A bit more than half the time the generator deliberately plants one or two single-cell regions, because a one-cell region is a free opening move, a small gift on an easy board.

A tangent we can't resist. The obvious way to pick which star layout to reuse is "take the least-used one," and it turned out to be a trap. Layouts sit in the database in the order they were enumerated, so the least-used ones are all neighbours from the same corner of the search space. In that window, 28% of layout pairs shared more than 60% of their star positions, which meant two puzzles on the same day could feel like reruns of each other. Sampling at random drops the overlap to about half a percent, and a separate similarity check at scheduling time makes sure no two boards published on the same day are near-duplicates. Nobody asked for this. It bothered us anyway.

Uniqueness Is Checked, and Then Repaired

A freshly drawn candidate usually has a problem: the intended solution isn't the only one. Our solver counts solutions and stops the moment it finds two. One is all we're allowed to have. At Queens size 9, raw region growth produces a unique board well under 1% of the time. If we threw away every ambiguous candidate, generation would be mostly a bonfire.

So we don't throw them away.

The second solution the solver finds is a map of exactly where the ambiguity lives. Say the intended layout puts row 3's stars in columns 2 and 8, but the solver turns up an alternate solution with a star at row 3, column 5. That cell is what the code calls an impostor: starred in the alternate, empty in the intended answer. Reassign that one cell to a neighbouring region and the alternate solution's region arithmetic breaks, while the intended solution doesn't move an inch, because intended stars are never touched. Re-test, and if another alternate shows up, repair again — up to 15 rounds for Star Battle, 40 for Queens. That repair loop lifts Queens acceptance from under 1% per attempt to over 20%. Take it away, and the rest of this article is a description of a machine that doesn't work.

Whether a unique solution actually matters to you as a solver is a bigger argument than it sounds; we've made the full case for why uniqueness is the whole game separately. Short version: every no-guessing technique you've ever learned is secretly a theorem about unique solutions.

Difficulty Is a Measurement, Not a Mood

Time for the opinion. Most puzzle sites set difficulty labels by hand, which is to say: by vibes. We think a difficulty label should be a claim you can defend. Ours is the output of a solver, and we can tell you the number.

The Star Battle step solver knows more than forty techniques, each with a difficulty score, from 1 for the basic adjacency rules up to 3,840 for deep lookahead chains. At every step it applies the cheapest technique that makes progress, then starts again from the bottom of the list, the way a careful human never reaches for a sledgehammer while a thumbtack works. The puzzle's difficulty score is simply the sum of every step it took.

We calibrated the band cutoffs against hand-made puzzles with official difficulty labels; the medians per band came out roughly 193, 859, 1,851, and 12,348, so our labels break at 400, 1,800, and 8,000. A "Hard" here means the cheapest possible path through the board cost between 1,800 and 8,000 points of technique. That's the whole definition.

Queens difficulty is the same philosophy with a smaller vocabulary: four technique tiers (forced cells, confinement, pigeonhole arguments, and hypothetical elimination — try a cell, watch the board collapse, rule it out), weighted 1, 3, 6, and 12 per step. A board is Hard the moment any tier-four step is required. Easy means the two lowest tiers finished the job cheaply. There's no hand on the scale.

Easy boards, funnily enough, are the hardest to make. Random unique puzzles skew hard — a just-barely-unique board is constraint-tight almost by definition. So for the easier bands we hunt by volume: run the solver with only cheap techniques allowed and guessing switched off, and see whether the grid completes. Most candidates stall in milliseconds and get binned. But here's the elegant part: if the capped solver does finish, every single placement was forced, which means completion itself proves the solution is unique. The filter and the proof are the same computation. (We still re-verify with the full solver before saving. Trust, but verify, even against your own theorem.)

The Fun Filter

Unique and correctly graded still isn't good enough. A puzzle can be flawless and boring. We learned what "fun" looks like by measuring hand-crafted puzzles we admire against our raw output, and one number jumped off the page: in the hand-made puzzles, the hardest deduction lands about 17% of the way into the solve. In raw generated ones, it buried itself mid-solve, around 37%. Great puzzles make you crack the safe early and then let you enjoy the door swinging open.

So every candidate's solve path gets scored 0–100 for experience: how early the climax comes, how many a-ha moments there are (a hard deduction that immediately releases a flood of easy placements; the good hand-made boards average four per puzzle), whether 50–70% of steps are quick follow-ups so progress feels constant, and whether the board ever grinds you through a long chain of consecutive hard moves. Anything under 75 is rejected, full stop.

There's an aesthetic gate too. Region shapes are scored for that interlocking, hand-drawn look, and a candidate can be rejected purely for being ugly; perfectly rectangular regions read as machine-made, so we aim for the ragged-but-deliberate middle. Survivors get tuned: nudge a region boundary, re-solve, keep the change if the difficulty moved toward the target band while staying unique and guess-free. Repeat a few dozen times. Hill-climbing, but for how a Tuesday morning feels.

The Receipts Are Public

Every step the grader takes gets cached, versioned, and published. The step-by-step solutions for each day's puzzles aren't written after the fact; they're the actual solve path the difficulty score was computed from, narrated. When we change the solver's techniques or scoring, we bump its version string and every cached solve gets recomputed rather than served stale. The same engine also powers our Inkwell Stars walkthroughs (unofficial — we just like the puzzles), which doubles as a stress test: a solver that only worked on its own homework wouldn't be much of a solver.

Seven Star Battle and Queens boards a day come out the far end of all this. We'd tell you which of today's seven survived the most rejection rounds, but honestly, the Easy ones are usually the ones with the war stories.