Skip to main content

Futoshiki Solver

Solve a Futoshiki puzzle from its given digits and inequality signs.

Futoshiki, sometimes called Hutoshiki or More or Less, is a Latin square with inequalities. Every row and column must hold each number from 1 to the grid size exactly once, and wherever a greater-than or less-than sign sits between two neighbouring cells, the values must obey it. Type any given digits into the cells, click between cells to place inequality signs, then solve.

Click a gap between two cells to cycle its sign: none, then each direction. The sign always opens toward the larger number.

How it works

The grid is a Latin square: each row and column must contain every number from 1 to the grid size exactly once. Each inequality sign adds a rule between two touching cells, where the open side of the sign faces the larger value.

The solver backtracks, always filling the cell with the fewest remaining candidates first, and rejects an inequality the moment both of its cells are filled the wrong way round. It also reports when a puzzle has more than one solution, which usually means a sign or a given is missing.