GenerateRandomSearch

Bridges Puzzle Generator

Each island carries a number saying how many bridge ends it needs. Bridges run straight, horizontally or vertically, at most two between any pair, and they may never cross. The rule that makes the puzzle rather than an arithmetic exercise is the last one: when you are finished, every island must be reachable from every other, so a layout that satisfies every number and still leaves two separate clusters is wrong.

What this generator does

Grows a connected network of islands joined by single and double bridges, rejecting any bridge that would cross one already placed, then reads each island's number off the finished network. The puzzle is published only when solving it from the numbers alone produces exactly one layout.

How to use this tool

  1. Choose a grid size and generate a puzzle.
  2. Join islands with single or double bridges so every number is satisfied exactly.
  3. Keep bridges straight and never let two cross.
  4. Check the whole network is connected — that condition rules out many otherwise-valid layouts.

Understanding the controls

Grid size
Between 4 and 7. Larger grids hold more islands, and the number of islands rather than the grid is what drives difficulty.
Show the answer
Draws the bridges over the islands, with double bridges shown as a pair of parallel lines.
Seed
Any word reproduces exactly the same islands and the same solution.

Common use cases

  • Printable Hashiwokakero puzzles for a puzzle page or a quiet activity
  • Teaching connectivity as a constraint rather than an afterthought
  • Practising the counting deductions the puzzle relies on
  • Test instances for a bridges solver
  • Setting the same puzzle for several people from one seed

How this generator works

The solver enumerates how many bridges join each candidate pair — pairs in line with no island between them — pruning as soon as an island exceeds its number or a bridge would cross one already placed. A layout counts only when every number is met exactly and a traversal from one island reaches all of them, which is the connectivity rule stated as a check rather than a hope.

Randomness and fairness

The island layout and bridge counts are random, and the numbers follow from them. A seed reproduces the same puzzle exactly and is therefore explicitly not cryptographically secure. Without a seed the browser's cryptographically secure generator is used.

For how randomness is produced across the whole site, see how Generate Random works.

Limitations and good to know

  • Grids run from 4x4 to 7x7; the island count is chosen automatically rather than set directly.
  • At most two bridges between a pair, which is the standard rule.
  • Difficulty is not graded, and a puzzle with few islands is not always easy.
  • Occasionally no uniquely solvable puzzle turns up at a size and the tool asks you to generate again.
  • Nothing about the puzzle is kept, so seed one you want to set again.

Privacy and your data

The islands and every candidate layout are worked out in your browser alone. Neither the puzzle nor your seed leaves the device.