Hitori Puzzle

Hitori logic puzzle solver (explanation of puzzle). Solving in fdq, a Finite Domain Constraint Solver By Peter van der Zee, © pvdz.ee, September 2017.

Back to demo list

Given a 9x9 grid filled with numbers 1-9, clear some cells such that cleared cells don't touch each other (diagonal is fine) and such that each row and col only contains unique numbers (or empty cells), and such that each non-empty cell can be reached from each other non-empty cell through hor/ver moves. (While technically you can eliminate numbers that are already unique, you don't usually do this as doing so doesn't help at all.)

0 means empty but a Hitori usually starts with a fully filled grid so it's mostly a solver artifact

(Trying to load library)












Input dsl:

Output:

Import:
Export:

Note: Solving won't work in Edge and Safari until they support TextEncoder (or when the standards committee grace us with a simpler method of converting string to Uint8Array, whichever comes first).

Firefox ... sometimes works. It seems to handle Uint8Array slightly different from v8 which might cause binary desyncs :'( ymmv

(Between):