~ / projects / sudoku-hidato

Hidato Puzzle Solver & Generator

A solver and generator for Hidato logic puzzles written in Haskell: it can crack any puzzle you give it and invent new solvable ones from scratch.

Hidato is a logic puzzle where you fill a grid with consecutive numbers so that each one touches the next, horizontally, vertically, or diagonally. This project does both halves of the puzzle’s life cycle: solving any given board, and generating fresh puzzles of any size that are guaranteed to have a solution.

Solving is a search problem: from each placed number, the solver explores where the next one can legally go, backtracking when a path dead-ends. The generator works the other way round, building a valid solution first and then hiding numbers to produce a playable puzzle.

The interesting constraint is the language: everything is Haskell, where the lack of mutable state pushes the whole design toward pure functions and recursion. The result is a compact solver whose search logic reads close to its mathematical definition, documented in an included report.

FACTS

Category: algorithms