Numberlink is a game in which the player makes non-intersecting paths between pairs of numbers marked on a grid. Alternative names for equivalent games include Arukone, Nanbarinku, Wire Storm and Flow Free. The rules governing the paths in our puzzles are given below. Please see figures 1 and 2 which show an example puzzle and its solution. The worked example shows how the game is actually played. The Algorithms section shows every step in the solution of a particular puzzle.
Players create the paths, edge by edge, by clicking on the grid lines. Edges are added using a left mouse click and can be removed using right mouse clicks. The jigsaw symbol is a menu for configuring the game. A left click on the PZL numberlink symbol next to it starts a new game by loading a randomly selected puzzle. Alternatively a right click on this symbol will load the next puzzle in sequence. A click on the wand requests a hint. Given the current state of the grid, it can be deduced that the hint vertex is one for which only one or two extensions are possible. If players can work out which is the correct extending edge they can add it using a left click. Otherwise a further click on the hint button will cause the edge to be revealed. The hint is shown using a red number (0 if the vertex is not the end of a path). If a hint is requested when the grid contains errors, no hint will be given, the thumb icon turns down and the incorrect edges are highlighted. They can be removed using right clicks or by a single click on the thumb icon. At any time clicking the thumb checks the current grid for errors, a second click will remove them. The sad smiley will display the solution. The entry box contains the current puzzle number and can be used to enter puzzle numbers. The number to its right is the puzzle difficulty score (which should be regarded with skepticism!) To its right is a clock. The game contains 1000 puzzles in ascending order of difficulty score. All the grids are 9x9 but the number of paths varies. Configuration options include the grid magnification and the colours for each line.
Among the many sites we referred to when finding out about Numberlink we found the following interesting and amusing. It shows why puzzles like Numberlink can be very hard: there are a lot of alternative paths! However, for each of our puzzles, though there may be many alternatives to consider, there is only one path which conforms to the rules.
Numberlink Example 2
The solution for the puzzle in Example 1. Note that all pairs of of numbers are linked, that all vertices are included in the collective paths and the paths do not cross or double back on themselves in adjacent rows or columns.
Numberlink Worked Example
A video from numberlink showing a puzzle being solved. After a good start the player makes a couple of errors which are highlighted when she clicks on the thumb icon. These are removed by right clicks. From then on the player make frequent use of the thumb icon to check if she has made an error. The hint button is also used several times.
The object of the game is to join all the pairs of numbers using paths which, in combination, visit every vertex in the grid. As can be found from the Wikipedia Numberlink page. there are several versions of the game and they vary in their stated rules. Ours are as follows.
Rule 1. Each pair of numbers must be joined by a continuous path.
Rule 2. Paths must not cross.
Rule 3. Paths must not double back on themselves to occupy a parallel or anti-parallel adjacent line on the grid.
Rule 4. All vertices on the grid must be used.
Rule 5. The solution must be unique.
Rule 3 helps to ensure that Rule 5 (which applies to us, the puzzle creators and not the players) can be achieved. Without it adjacent paths could freely cross over and multiple solutions would be possible. All our puzzles have unique solutions and the solutions can be found using logic alone. No guessing is required.
While it is possible to solve our puzzles by working out all the rule obeying paths between the pairs of numbered vertices, they can also be solved by repeatedly finding vertices which can only be extended in one or two ways. The puzzles have been created so that, at every stage during their solution, there is at least one such vertex. This means that the puzzles can be solved in a stepwise fashion and that, in keeping with all our other games, the program can always provide a hint showing where the player should look for a move. We hope that this restriction has not resulted in uninteresting puzzles.
Unlike most of our other games, hints are not produced by a fixed set of algorithms. Instead, the program analyses the grid to find vertices with limited choice of edges. So, rather than try to explain the analysis, we show a worked example and leave you to figure out why each added edge is the only possible way of linking its two vertices. The puzzle used is the one currently given as an example on the Wikipedia Numberlink page. The long array of screenshots shows the puzzle being solved entirely by repeated use of the program's hint button. A screenshot is taken for every other click on the button so that each figure shows a red hint number indicating the vertex which can be solved and the next figure in sequence shows the edge added and a red number on the next solvable vertex.