Introduction

Hitori is yet another good game from Nicoli. Please see the first figure and the worked example.

Contents

It is played on a rectangular grid of cells, each containing a number.



There are three rules:

1. No number can appear in a row or column more than once.

2. Shaded squares/cells must not touch each other vertically or horizontally.

3. When the grid is completed all circled squares/cells form a single continuous area.

When a player solves a puzzle using pencil and paper, squares are shaded or are "circled" by drawing a circle round the number. Any squares left unshaded or not circled are assumed to be circled. In our version we use colours. By default, shaded cells are dark grey and circled cells yellow. All cells must be coloured before the game is considered complete.

Hitori Example 1

Hitori Example 1

A partially complete Hitori game showing a hint in operation. Shaded cells are dark grey, circled cells are yellow. The hint cell is shaded orange and the numbers explaining the hint are highlighted in red. The answer for the hint cell is "shaded". Spotting patterns such as this is one of the keys to solving Hitori puzzles. Another is exemplified by the 5 in the bottom row: if it were to be shaded it would block access to the circled cells to its left. Hence it must be circled.

The game contains 2000 puzzles, each with grids of 9x9 cells and roughly sorted into on difficulty (easiest first).

The best way to see how the game is played is to read the caption and then watch the worked example.

The program starts with a randomly selected puzzle displayed. It shows a grid of white cells, each containing a number between 1 and 9. Players can shade cells with a left mouse click, circle with right mouse, and can undo with middle mouse.

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. The next button to the right is used for selecting puzzles: left mouse will select a random puzzle and right mouse the next one in sequence. Next is 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 second the puzzle difficulty score 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 1999 followed by 'Enter' to load the corresponding puzzle.

When a hint is requested using the wand a cell in the grid will be shaded the current hint colour (orange by default) and the numbers making up the discovered pattern coloured red or green (default colours). Red indicating matching values and green denoting access. If the player can work out the hint cell's correct colour they can set it in the usual way. If not a further click on the wand will colour it. When a hint is requested the clock display is used to show the code for the algorithm used.

If the player clicks the thumb button the grid is checked for errors and they are reported as follows: the thumb turns down and the inccorrect cells are shaded red. A further click on the thumb will remove the red shading and undo all changes since the first mistake was made.

If the player requests a hint when errors are present no hint will be given and the thumb will turn down and the mistakes marked. The errors must be corrected using the thumb button before a hint can be given.

Hitori Worked Example

A video from Hitori showing a puzzle being solved by the worlds most hesitant player. She starts by selecting puzzle 1000. Two places where a cell is sandwiched between identical numbers (algorithm Pairs 0) are quickly spotted and circled. The circled 7 means that another 7 in the same column can be shaded (algorithm Shade Matches) and then surrounded by circled cells (algorithm Encircle Shaded). This leads to another shading. And so she proceeds, occasionally clicking on the thumb to check for mistakes. Later she deliberately tries to make mistakes to demonstrate the error handling, eventually succeeding. Towards the end, to shorten the video, she simply uses the hint button to fill in the cells. This puzzle requires a very limited set of solving techniques but notice the Linkage 0 and Linkage 1 algorithms which become useful towards the end when the grid has filled out.

Algorithms

A reminder of the rules.

No number can appear in a row or column more than once.

Shaded squares must not touch each other vertically or horizontally.

When the grid is completed all circled squares form a single continuous area.

Given the rules of the game the overall form of some the algorithms might be evident but the individual details are less obvious. Once a cell is circled any other occurrences of its value in the same row or column can be shaded. As shaded cells cannot touch orthgonally, once a cell is shaded the cells touching it vertically or horizontally can immediately be circled. A cell must be circled if by shading it we would block access to circled cells. This last strategy, of looking for the consequences of circling or shading, is key to many of the algorithms.

The algorithms are described below in the order in which the hint algorithm applies them: ie roughly in order of their difficulty. Be aware that for each example shown here there are symmetry related versions of the same pattern.

Algorithm Encircle Shaded

Algorithm Encircle Shaded

Shaded cells cannot touch orthogonally. The cell with the orange background is adjacent to a shaded cell and so must be circled.

Algorithm Shade Matches

Algorithm Shade Matches

No row or column can have more than one occurrence of any given number. The cell with the orange background and red 7 is in the same column as a circled 7, so it must be shaded.

Algorithm Triples 0

Algorithm Triples 0

Shaded cells cannot touch orthogonally. The cell with the orange background and red 4 is sandwiched between two cells containing 4s. The only way to avoid adjacent shaded cells is to circle the orange cell.

Algorithm Pairs 0

Algorithm Pairs 0

Shaded cells cannot touch orthogonally. The cell with the orange background is sandwiched between two cells containing 3s. One of these 3s must be shaded, so the only way to avoid adjacent shaded cells is to circle the orange coloured cell.

Algorithm Pairs 1

Algorithm Pairs 1

Shaded cells cannot touch orthogonally. The cell with the orange background and value 8 is in the same row as a pair of adjacent 8s. One of the adjacent 8s must be circled to avoid adjacent shaded cells, so the orange coloured cell must also be shaded to avoid there being two identical values in the same row.

Algorithm Corner 0

Algorithm Corner 0

Shaded cells cannot touch orthogonally. The cell with the orange background is in a square of 7s. The only configuration which will avoid a pair of adjacent shaded cells and not block access to the corner is to shade the orange coloured cell and the cell diagonally adjacent. The other two 7s must be circled.

Algorithm Corner 1

Algorithm Corner 1

Shaded cells cannot touch orthogonally. The cell with the orange background is in a triangle of 4s. The only configuration which will avoid a pair of adjacent shaded cells and not block access to the corner is to shade the orange coloured cell. The other two 4s must be circled.

Algorithm Corner 2

Algorithm Corner 2

Shaded cells cannot touch orthogonally. The cell with the orange background is one of a pair of adjacent 5s and adjacent to a pair of 4s. The only configuration which will avoid a pair of adjacent shaded cells and not block access to the corner is to shade the orange coloured cell. The adjacent 4 and the other 5 must be circled.

Algorithm Corner 3

Algorithm Corner 3

The cell with the orange background is next to a pair of 2s. One of the 2s must be shaded. If the cell with the orange background is shaded, the 2 to its left must be circled, and the cell above that shaded. But then the cell in the corner would be blocked. Hence the cell with the orange background must be circled.

Algorithm Corner 4

Algorithm Corner 4

Shaded cells cannot touch orthogonally. The cell with the orange background is one of a triangle of 1s. If the orange cell is shaded, the 1 above it must be circled and the 1 to its right shaded. Then the 5 in the corner cannot be shaded and so must be circled. But it cannot be circled as the two shaded 1s have blocked its access to the other circled cells. Hence the orange cell must be circled.

Algorithm Corner 5

Algorithm Corner 5

The cell with the orange background is next to a pair of 5s. One of the 5s must be shaded. If the cell with the orange background is shaded, the 5 to its right must be circled, and the cell above it shaded. But then the cell in the corner must be circled. However it would then be blocked. Hence the cell with the orange background must be circled.

Algorithm Corner 6

Algorithm Corner 6

The cell with the orange background is next to a pair of 9s. One of the 9s must be shaded. If the hint cell is shaded the 9 to its left must be circled and the 9 below that shaded. But then there would be no access to the circled 9. So the hint cell must be circled.


Algorithm Edge 0

Algorithm Edge 0

The hint cell is above a pair of 2s adjacent to a pair of 7s. If the hint cell is shaded, the 2 directly below must be circled. Then the 7 to its right and the lower 2 must be shaded. But now the higher 2 is blocked on all sides. Hence the hint cell must be circled.

Algorithm Edge 1

Algorithm Edge 1

The hint cell is touching three pairs of cells with matching numbers. If the hint cell is shaded, the cells it is touching must be circled. This includes one cell in the matching pairs, so now its matching cell must be shaded and then surrounded by circled cells. Then the partners of the matching cells must be shaded, but this leads to a circled cell being blocked. So the hint cell must be circled.

Algorithm Pairs 2

Algorithm Pairs 2

The hint cell is touching one each of two pairs of cell with matching numbers. A cell from one pair is adjacent to one of the other pair. We know that one of each pair must be shaded. If the hint cell were shaded the cells it touches must be circled, including one of each matching pair. This means that the other matching cells must be shaded. But then we would have touching shaded cells. So the hint cell cannot be shaded and must be circled

Algorithm Pairs 3

Algorithm Pairs 3

The hint cell is between two pairs of 2 and 3, and matches the 2s. If we circle the hint cell both of the 2s must be shaded. But we cannot have two 3s in the same column and so one must be shaded. However, then we would have two adjacent shaded cells. Hence, the hint cell must be shaded.




Algorithm Pairs 4

Algorithm Pairs 4

The column containing the hint cell has a pair of 5s sandwiched between a pair of 1s. The hint cell is also a 1. If the hint cell is circled both of the other 1s in the column must be shaded. But one of the 5s must also be shaded, each of which would be adjacent to a shaded 1. Hence the clue cell must be shaded.

Algorithm Linkage 0

Algorithm Linkage 0

The hint cell provides the only access to an adjacent circled 5, and so must, itself be circled.




Algorithm Linkage 2

Algorithm Linkage 2

The hint cell provides the only access between the circled cells in two parts of the board, and so must be circled.