## Introduction

This is one of a huge number of puzzles created by puzzle inventer Naoki Inaba and named in Romaji "Nanba Burokku", which translates as "Number Blocks". If you read Japanese see his Puzzle Laboratory site, otherwise see a useful translation of some of the puzzles from his site. In Europe and North America the puzzle is also known as Suguru and Tectonic. We first saw it as Suguru in the Guardian and that is the name we have stuck with.

As invented for pencil and paper working, the puzzle is drawn as a rectangular grid of cells and the number blocks are defined by use of thicker grid lines. For our game we instead use colour to distinguish the number blocks and in the descriptions use the term polyomino instead of "number block".

The program presents a 6x6 grid of cells divided into coloured polyominos of size 1 to 5 cells. Most of these cells will be empty except for tiny candidate numbers at their top edges, but a few cells will already have their answers filled in. Please refer to the Suguru Example figure which shows a partially completed puzzle, and to the Suguru Worked Example video which shows a puzzle being solved.

** The Rules** are so simple they can be written as a single sentence:
To solve the puzzle players must place each of the digits 1 - N exactly once in each polyomino of size N in such a way that no digit touches another digit of the same value orthogonally or diagonally.

The game includes 1000 puzzles each of size 6x6 cells. The puzzles are sorted into order based on their difficulty, easiest first. All can be solved using logic: no guessing is required. The algorithms provided in the hint option are the only ones that are needed to solve the puzzles. At present there is no option to read in external puzzles as any format would require a lot of typing. However, there is an option to save partially completed internal puzzles and then reload them at a later time.

## Suguru Example

A screenshot from suguru showing a partially completed puzzle. The large digits are the current answers and the small digits are the remaining candidate answers for the individual cells. When the puzzle was started only 12 of the cells had their solutions filled in, but at this stage the player has managed to complete three of the polyominos.

## Summary

The program starts with a randomly selected puzzle displayed. The possible candidate answers are written in the unsolved cells. These numbers are buttons: left-clicking will delete a candidate, middle-clicking on its position will rewrite it, right-clicking will set it as the answer and delete any other candidates present. These actions are sufficient to finish a puzzle. But, if stuck, players can request hints.

At the top of the display is a Toolbar. The jigsaw piece button at the left is a menu which has options for configuring the program and saving the current settings. Next to the jigsaw button is an icon consisting of a triangle of dots and which is used for selecting a random puzzle from the program's built-in puzzles; a wand for selecting and executing hints; a thumb for checking and correcting errors, and a sad smiley for showing the solution. To the right of this are 3 numbers. The first is the puzzle number, the next the puzzle difficulty and the next a clock which ticks every 5 seconds. The puzzle number display is also an input box: players can position the cursor over this area and type in a number between 0 and 999 followed by "Enter" to load the corresponding puzzle. When a hint is requested the clock display is used to show a 2-letter abbreviation for the name of the hint found. The program will not report errors until the player clicks on the thumb or requests a hint. Errors are reported by the thumb turning down and the incorrect cells being highlighted. A further click on the thumb will correct the error(s) and undo all changes made since the first error. At any time, hitting "Enter" will restart the current puzzle.

Hints are requested using the wand icon in the Toolbar. The program will find the hint with the lowest difficulty score. Hints are shown by highlighting the candidates that can be deleted in red and the reasons in green. While the hint is active (shown by the wand icon leaning backwards) clicking on the wand with the middle mouse button will cause a pop-up to appear containing a short explanation of the hint. A further left click on the wand icon will delete the red candidates and unhighlight the green candidates.

The hints available are: Exclusion Rule(ER)), Forbidden Neighbour(FN), Hidden Single(HS), Naked Pairs(NP), Naked Triples(NT), Hidden Pairs(HP), Hidden Triples(HT), Forbidden Pairs(FP), Forbidden Triples(FT).

The game contains 1000 built-in puzzles which are are sorted on their difficulty score, easiest first. None of them can be solved using only the Exclusion Rule and Forbidden Neighbour as such puzzles were considered to be uninteresting.

## Suguru Worked Example

A video from suguru showing a puzzle being solved. The player selects puzzle number 801 and immediately applies a right-click to the hint button (wand) to remove all the trivial candidates. She makes good progress removing candidates and setting answers, occasionally clicking on the thumb to check that no errors have been made. At one point a hint is requested and prior to a Hidden Single hint being displayed some cells are filled in automatically.

## Playing

Each of the cells which have yet to be given a value contain tiny "candidate" numbers 1-N where N is the number of cells in the polyomino. These are buttons which can be left clicked for removal or middle clicked for setting the number for the cell. A right click will replace a deleted candidate. In this way they can be used as a simple notepad while working towards the solution for each cell. If the player cannot make progress, hints are available.

## Using Hints

Hints are requested using the wand icon in the Toolbar. The program will find the hint with the lowest difficulty score.

Note that before applying any algorithm with non-zero difficulty score the hint function **exhaustively applies the Exclusion Rule and Forbidden Neighbour algorithms**. That is, it keeps applying them until they have no effect.
This is necessary for the more complicated algorithms to work correctly.

When a hint is requested the program highlights, in red, the candidates which can be deleted and, in green, the reason. For example, in the adjacent Hint Example screenshot showing a Naked Pairs hint the 3 and 4 candidates highlighted in red can be deleted because 3 and 4 must be the answers for the cells where they are highlighted in green.

When a hint is requested the wand icon flips to its mirror image. If the player clicks on it while it is in that configuration the program will automatically remove all the candidates highlighted in red, unhighlight those in green, and the wand will revert to its normal orientation. Otherwise the player can delete the red candidates using mouse clicks.

The exhaustive application of the two zero difficulty algorithms can also be requested by the player right-clicking on the hint button. This operation is made available simply to allow players to avoid dealing with trivial candidate removal, but it can result in a partially completed puzzle being completely finished!

## Hint Example

Here, two cells contain the only remaining 3,4 digits in the polyomino and so must be their solutions and so any other 3,4 digits in the polyomino can be deleted.

Of course, use of the hint option is not obligatory and purists can work out everything for themselves and simply use the candidate buttons as a notepad for each cell.

## Checking for Errors

Clicking on the hand button causes the program to check the puzzle for errors (which can occur due to the player removing incorrect candidates). If errors are detected the hand will flip to the thumbs down position. A further click on the hand will reverse all moves made by the player, back to the last time the puzzle was error free. Note that when a hint is requested the program always checks the puzzle for errors first. If errors are detected no hint search will be performed, the hand will flip to thumbs down and the cells with errors will be highlighted.

## Difficulty Score

The Difficulty Score is the middle of the three numbers at the top of the games window. Because puzzles can be solved in many different ways, and players may find harder or easier ways than those the program used when it calculated the score, the Difficulty Score can only provide a rough indication of the difficulty. Nevertheless it does give a useful indication of the relative difficulty of puzzles.

Algorithm | Score(D) |
---|---|

Exclusion Rule | 0 |

Forbidden Neighbour | 0 |

Hidden Singles | 3 |

Naked Pairs | 5 |

Naked Triples | 7 |

Hidden Pairs | 6 |

Hidden Triples | 8 |

Forbidden Pair | 9 |

Forbidden Triple | 10 |

The score for a puzzle is calculated as follows. Let D_{i} be the
difficulty score for algorithm i, and N_{i} be the number of cells
algorithm i was successfully applied to in solving the puzzle.
The difficulty score for the puzzle is then the sum
of N_{i} x D_{i} for all i. During this analysis the program always uses the algorithm with the lowest difficulty score which is effective when applied to the current state of the grid.
The algorithms are explained by examples below.

## Algorithms

The algorithms used by Suguru are explained using examples. Candidates highlighted in green are the "reasons" that the candidates highlighted in red can be removed.

## Exclusion Rule

The exclusion rule: only one of each digit can occur in each polyomino, so once an answer is set all other occurrences of that digit in its polyomino can be deleted. Here, the digit 2 has already been set for a polyomino and so any other digit 2s in the polyomino can be deleted.

## Forbidden Neighbour

Forbidden neighbour: no digit can occur in a cell which touches, orthogonally or diagonally, a cell for which that digit is the solution. Here, the digit 2 has already been set for a polyomino and so a digit 2 which is in cell which touches diagonally can be deleted.

## Hidden Single

Hidden single: all polyominos must contain exactly one of each of the digits; if a cell contains the only remaining copy of a digit in a polyomino, that digit must be the answer for that cell, and any other digits in that cell can be deleted. Here, a polyomino has only one remaining digit 3 and so that must be the answer for the cell it is in and any other digits in the cell can be deleted.

## Naked Pairs

Naked pairs: all polyominos must contain exactly one of each of the digits; if a pair of cells each contain only the same two digits, those digits must be the answers for the two cells, and any other occurrences of those digits in the corresponding polyomino can be deleted. Here, two cells contain only the digits 3 and 4 so they must be their solutions and so any other 3,4 digits in the polyomino can be deleted.

## Hidden Pairs

Hidden pairs: all polyominos must contain exactly one of each of the digits; if a pair of cells contain the only copies of two digits in a polyomino, those digits must be the answers for the two cells, and any other digits in those cells can be deleted. Here, digits 1,2 occur in only two cells and so must be their solutions and so any other digits in those cells can be deleted.

## Naked Triples

Naked triples: all polyominos must contain exactly one of each of the digits; if between them, three cells contain only three different digits, those digits must be the answers for the three cells, and any other occurrences of those digits in the corresponding polyomino can be deleted. Here, the digits 1,4,5 must be the solutions for the three cells and so any other digits 1,4,5 in the polyomino can be deleted.

## Hidden Triples

Hidden triples: all polyominos must contain exactly one of each of the digits; if three cells contain the only copies of three digits in a polyomino, those digits must be the answers for the three cells, and any other digits in those cells can be deleted. Here, digits 1,2,3 must be the solutions for the three cells and so the digit 4 can be deleted.

## Forbidden Pairs

Forbidden pairs: all polyominos must contain exactly one of each of the digits; if a pair of cells contain the only copies of two digits in a polyomino, those digits must be the answers for the two cells, and so any cell touching them both cannot contain those digits. Here, a polyomino must have digits 2,3 in the cells shown and so the adjacent cell can have those digits deleted.

## Forbidden Triples

Forbidden triples: all polyominos must contain exactly one of each of the digits; if three cells contain the only copies of three digits in a polyomino, those digits must be the answers for the three cells, and so any cell touching all three of those cells cannot contain those digits. Here, the 3 cell polyomino must contain digits 1,2,3 and the cell from a neighbouring polyomino which touches all three cells can have its 1,2,3 digits deleted.