How to use the Flow Free solver
This Flow Free solver works on numberlink puzzles: a grid with pairs of matching endpoints that you join with paths. Choose the width and height (5 to 15 cells), pick a label and tap the two cells where that pair's ends sit, then the next pair, and so on. Press Solve and every path is drawn on the grid in its own color. You can also paste a grid as text: one line per row, a dot for an empty cell and the same letter for both ends of a pair.
Flow Free is an app by Big Duck Games; this site is not affiliated with it and only uses the name to describe the kind of puzzle. The puzzle itself is much older and is known as numberlink, from the Japanese publisher Nikoli.
The rules
- Join every pair of equal endpoints with one path of horizontally or vertically adjacent cells.
- Paths never cross, branch or share a cell, and a path never runs through another pair's endpoint.
- With Every cell must be filled ticked (the Flow rule, on by default), every cell of the grid has to be part of a path. Untick it for the classic numberlink rule, where cells may stay empty.
Is the solution unique?
The solver does not stop at the first answer. It keeps searching for a second one, so it can tell you one of three things: exactly one solution (the search covered every other possibility), two or more solutions (both are shown, and the cells where they differ are highlighted so you can see where the puzzle is ambiguous), or no solution (for example a pair cut off by other endpoints, or a corner that no path can fill). It also refuses grids where a label appears once or three times, and says which one. Every solution is checked before it is shown: each path joins its own pair through adjacent cells, no cell is used twice, and with the Flow rule no cell is left empty.
How the solver works
The solver treats the grid the way you would with a pencil. Each cell has a short list of things it could be: which two sides its path leaves through (straight across, straight down, or one of four corners; an endpoint has one side), and which colors could pass through it. Rules between neighboring cells shrink those lists over and over:
- if a cell's path certainly leaves through its right side, the cell on the right must take the path in from its left, and both cells have the same color;
- two neighbors that cannot share a color cannot be joined;
- a cell can only hold a color if both ends of that pair can still reach the cell through cells that could carry the color;
- with the Flow rule, every cell must be on some path.
When the lists stop shrinking, the solver picks the cell with the fewest options left, tries each, and repeats; a finished grid is accepted only if every pair is joined and no stray loop is left over. On the examples below, up to 12 by 12, the rules alone settle the whole grid, without a single guess. Open 15 by 15 grids with long winding paths are much harder: of six random 15 by 15 test grids, four were solved in under a tenth of a second and the other two took about 8 and 16 seconds on a laptop. The search runs in the background of your browser, so the page stays responsive, and you can stop it at any time. Our test suite compares the solver with a brute force that lists every possible path for each pair on small grids, and requires the same number of solutions on every puzzle.
Tips for solving by hand
Start with pairs on the edge of the grid and in corners: a corner cell has only two neighbors, so a path through it is forced. A path that hugs the border usually stays on it. If two endpoints are next to each other, they are often joined directly, but not always under the Flow rule, because the cells around them still need filling. When you are stuck, ask the solver for the answer and compare it with your own grid.
For a path that visits every cell in number order, try the hidato solver; for a single closed loop, slitherlink.
To play instead, try numberlink online: new connect-the-pairs grids at three sizes, each with one solution.
Solver tested . Found a problem? Tell us.
Questions
Is numberlink the same as Flow Free?
They are the same kind of puzzle. Numberlink is the older name from the Japanese publisher Nikoli; Flow-style apps add the rule that every cell must be filled. This solver handles both: keep Every cell must be filled ticked for Flow rules, untick it for classic numberlink.
Why does the solver say there are two solutions?
Because there are. Some puzzles, especially home-made ones, let two paths swap places or take a detour. The cells where the two answers differ are highlighted; adding one more pair there usually makes the puzzle unique.
What does no solution mean?
The solver tried every possibility and no set of paths joins all pairs without crossing (and fills the grid, with the Flow rule). Often a pair is boxed in by other endpoints, or one dot was placed in the wrong cell.
How big can the grid be?
From 5 by 5 to 15 by 15 in the editor, and up to 20 by 20 when pasted as text. Large grids with few pairs leave a lot of open space and take longer; you can stop the search at any time.
Can I paste a puzzle as text?
Yes. Open Paste or copy the grid as text, write one line per row with a dot for an empty cell and the same letter for both ends of a pair, and press Load this text.