Building a Hamiltonian Path Puzzle
Summary
The article presents Number Trail, a Hamiltonian-path puzzle implemented in plain HTML/JS, and explains its core concepts from puzzle file format to board rendering and random generation. It discusses the NP-completeness of Hamiltonian path problems, the use of Warnsdorff's heuristic to build paths, and how clues and walls are placed to guarantee at least one valid solution. It also covers user interaction, path validation, and score persistence.