All writing

WRITING

A daily puzzle is a constraint satisfaction problem wearing a costume

Pivot's generator — guaranteeing a solvable path on every grid is the hard part; the UI isn't.

July 2026· 2 min read

Pivot's rule is simple to state: draw one continuous line from Start to End that fills every cell, and every turn on a node cell has to be a 90-degree turn. The part that's actually hard has nothing to do with the sentence.

The hard part is generating a puzzle every day, for three grid sizes, guaranteed to have exactly one path satisfying that rule — not zero, not several. A grid with no valid solution is broken. A grid with multiple valid solutions is worse, because "did I find a solution" stops meaning anything if any of several answers count.

Strip the theming off and this is a constrained Hamiltonian path problem: find a path through every vertex of a grid graph exactly once, subject to a turning constraint at specific cells, with uniqueness as a hard requirement rather than a nice-to-have. Hamiltonian path problems are NP-complete in general. You don't get to brute-force "guaranteed unique" on a live product with a daily deadline — you need a generator that constructs a puzzle with a known solution baked in, then works backward to remove enough structure that it isn't trivially readable, without accidentally opening a second valid solution.

That backward step is where most of the actual engineering lives, and it's invisible to anyone playing the game. Nobody solving today's 6×6 in ninety seconds is thinking about uniqueness proofs. They're thinking about whether the line looks satisfying when it locks into place. Which is correct — that's what a puzzle is supposed to feel like. But it means the entire hard part of Pivot is structurally hidden from the experience of playing it.

I find that honest, in a way a lot of "AI wrote my app" portfolio pieces aren't. The UI took an afternoon. The generator is the actual project. If you want to see whether it holds up, the daily puzzle is live at /pivot — three sizes, one guaranteed solution each, new one tomorrow.

Back to all writing