Maze
A perfect-maze game in Go and React — every line of it designed, built, tested and shipped by AI agents on open-source models.
100% generated from open-source models.
This is the second project we've built the same way: the entire app — the Go engine, the React front end, the tests, the deployment — was written by AI coding agents running on open-source models. No proprietary cloud API, no closed model, nothing phoned in. A person reviewed the result and gave the go-ahead; the code itself was produced by the models.
It's deliberately a small, complete, end-to-end app — the kind that has to actually work to be convincing. It generates real mazes, solves them, validates your moves against the server, and ships through the same Docker + Helm + CI pipeline we use for client work, with no modification.
If a self-hosted, open-weight model can take a vague idea to a production game — playable at demo.carefuldream.com/maze — the question is no longer whether it can, but what it will do for yours.
The Game
A perfect maze is one with exactly one path between any two cells — no loops, no traps. You start in the top-left corner and make your way to the bottom-right, one cell at a time. The server keeps the authoritative record of where you are and which walls are there, so there's no cheating and no "well, it should have let me through there."
The interesting part is not the one maze — it's that the same seed and the same size produce three different mazes depending on which generator carves them. The Compare view puts all three side by side and reveals each one's shortest path, so you can see exactly how the choice of algorithm changes the shape of the puzzle.

One seed, one size — three algorithms, three shapes. Each shows its shortest path and its dead ends and forks.
Three ways to carve a maze
The algorithm is the generator. Give all three the same seed and size and they each carve different walls from it — that's what makes the Compare view worth having.
Backtracker
A depth-first search that plunges down a corridor and backtracks only when it hits a dead end — the classic, snaky maze.
Prim's
Grows the maze outward from a frontier of cells, so it ends up with many short dead-end branches and a bushy texture.
Wilson's
Uses loop-erased random walks to carve the passages, producing loopy, self-similar tendrils with more three-way forks.
How to Play
- 1Steer with the arrow keys, WASD, or the on-screen d-pad
- 2Reach the bottom-right goal from the top-left start — the Go server validates every move
- 3Stuck? 'Show solution' overlays the BFS shortest path; 'New maze' cuts a fresh one from a new seed
- 4Open 'Compare algorithms' to watch all three generators carve different mazes from one shared seed, with each one's shortest path revealed
Under the Hood
Go is the source of truth
The authoritative engine lives in Go: seeded generation, a BFS shortest-path solver, and move validation. The browser never has to trust its own wall math.
React 19 + Vite 7 + Canvas
A TypeScript front end renders the maze and solution path on a device-pixel-ratio-aware canvas, with a scale-to-fit layout so every size fits the viewport.
Seeds you can share
Every maze is a 32-bit seed. Two people who pick the same size and seed get the exact same maze — the URL carries it, so a puzzle is linkable.
Shipped like client work
A Go server with the React build embedded, in Docker, on a Helm chart, through the same CI pipeline as everything else. Live at demo.carefuldream.com/maze.
Why it matters
A lot of "AI-generated code" demos stop at a screenshot. This one runs: it generates, solves and validates mazes in production, behind a real server, deployed by real CI — and every part of it came from open-source models that we can run ourselves. No per-token bill, no vendor lock-in, no black box.
The takeaway we carry to client work: the bar has moved from "can the model write it?" to "will the thing it writes actually hold up?" A complete, tested, deployable game from open-weight models is the honest answer — and it's the same pipeline we'd use for your product.
Have a project like this one?
We'd be glad to talk through your goals, your constraints, and whether we're the right team for the work.





