How Puzzle Picnic Makes a Puzzle From a Seed
How Puzzle Picnic builds every puzzle from a seed: why the same seed gives everyone the same grid, how a solver proves one solution, and how difficulty is set.
Every puzzle in Puzzle Picnic is made on your device from a seed: a short code that drives every choice the generator makes. The same game, seed and difficulty always produce the same grid, on any phone or browser. Before a puzzle reaches you, a solver checks it has exactly one solution, and the level is set by which solving techniques it needs. Puzzles that fail a check are thrown away and replaced.
This post explains how that works in plain language, game by game. You do not need to know any programming to follow it.
What a seed is
A seed is the starting point for a recipe that produces a long list of numbers that look random but are completely fixed. Feed in the same seed and you get the same list, every time, on every device.
The puzzle generator takes all of its "random" choices from that list: which digit goes where in a fresh sudoku, which island gets a bridge, where a ship lies, which square a coloured region grows into next. Because the list never changes for a given seed, neither does the puzzle. The generator is not allowed to use anything else that changes, such as the clock or true randomness. That rule is what makes a puzzle a fixed result of three inputs:
| Input | Example | What it decides |
|---|---|---|
| Game | Sudoku, Bridges, Ships, Lines, Stars or Trail | Which generator runs |
| Seed | A six-character code, or a date for the daily | Every random-looking choice inside it |
| Difficulty | Easy, Medium, Hard or Expert | Grid size, and how demanding the puzzle must be |
When you start a new puzzle, the app picks a fresh seed for you: six characters from letters and digits chosen so they are easy to read aloud and retype (there is no 0 or O, and no 1 or I). Together with the game and the level, that code is the puzzle.
Why the same seed gives everyone the same puzzle
Because a puzzle depends only on its game, seed and difficulty, two people with the same three inputs see the same grid, even if one plays on an iPhone in Amsterdam and the other in a browser in Sydney. No server has to store or send the puzzle.
Three features rest on this:
- The daily puzzle. Its seed is built from the calendar date. Everyone who opens it on the same date gets the same grid, and the app makes it on the spot, offline if need be.
- The archive of past dailies (Premium). An old daily can be rebuilt any time from its date, so the archive does not need a download.
- Challenges and shared codes. When you challenge a friend, the link carries the game, seed and difficulty. Their app rebuilds the exact puzzle you solved, and they can try to beat your time whenever they like. The same goes for a puzzle shared as a short code. There is more on that in puzzles with friends.
This is also why the generators avoid anything that could differ between devices. Where a check has a limit on how long it may search, the limit is counted in steps, not seconds, so a slow phone and a fast one build the same grid.
The two checks every puzzle must pass
Every Puzzle Picnic puzzle is checked before you see it, in two ways.
Check one: exactly one solution. A solver program searches for ways to complete the puzzle. It does not need to find all of them; it stops the moment it finds a second, because two is enough to reject the grid. A puzzle passes only when the search ends having found exactly one. Why this matters is explained in why a good sudoku has exactly one solution, and the same reasoning applies to Bridges, Ships, Stars and Trail. Lines is the exception, because there is nothing to fill in: any order that clears the shape is a solution, so its check is that the shape can always be cleared.
Check two: the right difficulty. In Sudoku, Bridges, Ships and Stars, a second solver works through the puzzle the way a person would: simplest deduction first, never guessing. It records the hardest technique it had to use (in Stars, whether it had to reason about groups of regions). If that technique is too hard for the level, or the puzzle is too easy for it, the puzzle is rejected or reshaped. In Trail and Lines, the level is set by the size of the grid and how the puzzle is built, as described below.
When a puzzle is rejected, the generator does not reach for real randomness. It moves to the next attempt in a fixed sequence derived from the same seed (attempt one, attempt two, and so on), so even the retries come out the same on every device. Trail does not start again at all: it keeps one board and adds numbers until the path is unique.
How a sudoku is made
A Puzzle Picnic sudoku starts as a completed, valid grid and is dug out one clue at a time. Easy and Medium use the 6x6 grid; Hard and Expert use the classic 9x9.
- Fill a grid. The generator builds a random but valid completed grid from the seed.
- Remove clues in a shuffled order. After each removal, the human-style solver tries to finish the puzzle using only the techniques allowed at that level. If it can, the removal stays. If it cannot, the clue goes back.
- Make sure the top technique is really needed. For Hard and Expert, the generator keeps digging until a removal can only be solved with a technique from the level's own tier. Hard puzzles are built to need at least one technique such as a triple, X-Wing, Swordfish, XY-Wing, XYZ-Wing or simple colouring. Expert puzzles are built to need a forcing chain.
- Top up to the clue target. On Hard and Expert, clues are then added back, as long as the puzzle still needs its level, until it reaches the level's clue count: 27 to 31 on Hard, 23 to 27 on Expert. Easy and Medium skip steps 3 and 4: they need only singles, so digging simply stops at their target of 17 to 19 or 11 to 13 clues.
There is a neat logical point inside step 2. If a solver that only makes sound deductions fills the whole grid, the puzzle cannot have a second solution, because every digit was proved. The human-style solve is itself a proof of uniqueness. The generator still runs a separate solution count at the end, as a guard against a mistake in the solver.
The techniques themselves are explained in the sudoku strategies guide.
How the other five games are made
Each game has its own generator, but they share a pattern: build a solution first, then decide what to show so that the solution is the only one that fits.
| Game | Built first | How one solution is ensured | What sets the difficulty |
|---|---|---|---|
| Bridges | A layout of islands joined by bridges | A solver counts solutions; only layouts with exactly one are kept | Easy aims at counting alone; Medium at connectivity; Hard and Expert at short "what if" checks |
| Ships | A hidden fleet, then the row and column counts | Extra squares are revealed where logic gets stuck, then solutions are counted | Which deductions the solve needs, from basic to fleet counting to lookahead |
| Stars | The stars, then coloured regions grown around them | If a second solution exists, regions are reshaped until only the first fits | Board size; Hard allows reasoning about groups of regions, Expert looks for boards that need it |
| Trail | One path through every square, then walls and numbers | Numbers are added where another route would split from the true one | Grid size, walls, and how many numbers can be removed |
| Lines | Lines placed one by one, each with a clear way out | No single answer to check: the puzzle is built backwards, so it can always be cleared | Shape size, line length and how tightly lines block each other |
A few details are worth telling in words.
Bridges. The generator lays out islands and bridges, then counts solutions. Easy puzzles are aimed at counting rules alone, and Medium puzzles at the rule that every island ends up in one connected group, which the connectivity rule explains. Hard puzzles need one or two short "what if" checks: suppose this bridge is there, follow the consequences, and see a contradiction. Expert puzzles need more of them. If none of its attempts lands exactly on the target, the generator keeps the closest puzzle it found that still has one solution.
Ships. The fleet is hidden first and the row and column counts come from it. Easy, Medium and Hard start with a few squares revealed at random (three, two and one). If the logic solver gets stuck, the generator reveals one of the squares it was stuck on, favouring ship pieces because they carry more information. On Medium and Expert, revealed squares that turn out not to be needed are taken away again.
Stars. The stars are placed first, one per row and column and never touching. Each star then grows a coloured region around itself, a few of them sprawling and others small. If the regions allow a second arrangement of stars, the generator gives one square of that rival arrangement to a neighbouring region, which breaks the rival without touching the real solution, and repeats until no rival is left.
Trail. The generator draws a single path through every square, then adds walls only on edges the path never crosses, so a wall can block a wrong route but never the right one. Numbers go along the path. Whenever the solver finds a different route that fits, a new number is placed where that route leaves the true one. On Hard and Expert the generator then tries removing numbers, keeping each removal only if the path stays unique. Here too, the solver's effort is counted in steps.
Lines. A Lines puzzle is built in reverse. Each new line must have a clear run to the edge past every line already placed, so the shape can always be cleared. A final pass stretches, splits and adds lines to fill the gaps, and keeps only the changes that leave the shape clearable. Older lines may have their way out blocked by newer ones, and that is what makes you work out an order. The idea is explored in order is the puzzle.
Why the puzzles are made on your device
Making puzzles on the device means there is nothing to download and nothing to run out of. Puzzle Picnic is offline first: every game works without a connection and without an account. A seed is all it takes to rebuild any puzzle, whether it is today's daily, an old one from the archive, or the grid in a friend's challenge.
It also means the puzzle generators have to be quick. Each one is written to finish in under about 300 milliseconds on a mid-range phone, which is one reason the checks are capped by counted steps and a fixed number of attempts rather than allowed to run for as long as they like.
What this means when you play
Knowing how the puzzles are made explains a few things you might notice in the app:
- Every puzzle can be solved without guessing. Each one has exactly one solution (in Lines, a shape that can always be cleared), and logic gets you there. What "logic-only" really covers is in no guessing required.
- Levels feel consistent. A Hard sudoku is Hard because it needs a harder technique, not because it shows fewer digits. Each game's levels are set out in easy to expert.
- A shared puzzle is fair. Your friend gets your grid exactly, so comparing times means something.
- Hints can explain themselves. The same human-style reasoning that grades a puzzle can point to the next logical step, which is what a hint shows you.
For a tour of the whole app, see what is Puzzle Picnic, or start a puzzle at puzzlepicnic.app.
Frequently asked questions
Are Puzzle Picnic puzzles made by hand?
No. Each puzzle is made by the app from a seed, then checked by a solver for a single solution and graded by which techniques it needs. The rules for what makes a good puzzle at each level were written by hand; the puzzles themselves are generated.
Do two people get the same puzzle?
They do when they have the same game, seed and difficulty. That is how everyone gets the same daily puzzle and how a challenge link opens the exact grid your friend solved.
Does the app need the internet to make puzzles?
No. Puzzles are made on your device, so everything works offline. An account is optional and only backs up and syncs your progress.
Can a Puzzle Picnic puzzle have two solutions?
It should never happen. A puzzle is only kept when a solver has found exactly one solution, and for sudoku the generator runs a second, separate count as a guard. If you think you have found a second answer, check the rules once more: in Stars, for example, two stars may not touch even at a corner.
Why does a harder level sometimes show more clues?
Because the level depends on techniques, not on clue counts. On 9x9, Expert puzzles give 23 to 27 clues and Hard 27 to 31, so a few grids overlap. A 27-clue Expert puzzle still needs a technique that no Hard puzzle requires.
Where to go next
If you are curious what logic-only solving feels like from the player's side, read no guessing required. To see what each level changes, game by game, read easy to expert. Or open today's daily and know that everyone playing it today is looking at the same grid.