Hashiwokakero
Play Hashiwokakero, the Japanese bridge-building logic puzzle. Every board is generated fresh and machine-checked to have exactly one solution, in three sizes, with no sign-up.
The four rules
Each circle is an island, and the number on it is how many bridge ends must touch it. Connect them all so that:
- 1. Bridges run straight, horizontally or vertically, between two islands — never diagonally.
- 2. At most two bridges join any given pair of islands.
- 3. Bridges never cross each other or pass over an island.
- 4. Every island must be reachable from every other — the finished map is one single connected network, not two separate islands groups.
That last rule is what makes the puzzle interesting. Satisfying every number is usually easy; satisfying every number and ending up with one connected whole is where the real deduction lives.
Opening moves
Islands that are already maxed out
An island can take at most two bridges per direction. So a 4 with only two neighbours must run doubles to both. An 8 is always double in all four directions, a 6 with three neighbours likewise. These are free moves — find them all before doing anything else.
One short of maximum
A 3 with two neighbours cannot leave either side empty — 3 does not fit in a single direction, so both get at least one bridge. The same logic gives a 5 with three neighbours at least one in every direction, and a 7 with four the same. Placing that guaranteed single often forces the next island immediately.
Corner and edge islands
A corner island has at most two directions available, so its clue is heavily constrained from the start — anything above 2 forces a double. Edges have three. Start where the geometry does the work for you.
Isolation
Two 1s facing each other can never be joined — that bridge would satisfy both and cut them off from the rest of the map forever, breaking rule 4. The same applies to two 2s with no other neighbours: a double between them would close a private island group. Ruling those out is often the move that unlocks a stuck board.
How these puzzles are checked
A board is grown rather than drawn: islands are placed one at a time, each connected to one already on the grid, so a valid solution exists by construction. That solution is then discarded and only the clue numbers are kept.
The numbers alone go to a solver that enumerates every legal assignment of 0, 1 or 2 bridges to every candidate pair, pruned by the degree bounds and the no-crossing rule, and finishing with a connectivity test. It counts solutions and stops at two. A board is only shipped when that count is exactly one.
There is a second gate. A puzzle where nearly every pair of facing islands must be bridged is not really a puzzle — it solves itself by joining the dots. So the generator also measures slack: how many candidate bridges the solution leaves unbuilt. Boards below the threshold for their difficulty are thrown away and regenerated. That is why island counts here are dense relative to the grid; density is what creates genuine decisions.
Where it comes from
Hashiwokakero — 橋をかけろ, "build bridges" — was published by the Japanese puzzle company Nikoli in 1990, the same house that popularised sudoku, and appeared in their magazine Puzzle Communication Nikoli. It also circulates as Hashi, Bridges, Ai-Ki-Ai, and Chopsticks.
Nikoli's puzzles are traditionally hand-composed by contributors, with a house rule that a puzzle must be solvable by pure reasoning and must have a unique answer. Computer generation has to work to reach the same bar, which is what the uniqueness and slack checks above are for.
Deciding whether a Hashiwokakero board has a solution is NP-complete, proved by Andersson in 2009 — the same complexity class as sudoku and nonograms. At puzzle sizes that is irrelevant; at large sizes it means no general shortcut exists.
When you get stuck
- Count what is left, not what is placed. An island needing 2 more with three open directions is far less useful than one needing 2 more with two open directions. Hunt for the second kind.
- Look for corridors that must stay clear. If a bridge would have to cross somewhere that a forced bridge already runs, that option is dead — and eliminating options is as productive as placing bridges.
- Watch for premature closure. Any move that would finish a group of islands while other islands remain outside it is illegal, however well it satisfies the numbers.
- Work from the densest cluster. High numbers packed together constrain each other; a lone 1 in open space tells you almost nothing until its neighbours are resolved.
- Green is not proof. An island turning green means its own count is satisfied right now, not that those particular bridges belong in the final answer.