Samon (砂紋, “sand crest”) is a Zen garden raking puzzle inspired by the meditative act of restoring order to sand. Originally sketched in 2023, this design turns that concept into a full game with a solver, level generator, and playable prototype. The puzzle challenges players to rake sand into prescribed patterns using a rake that yields parallel lines, mirroring the aesthetic and satisfying nature of actual Zen gardens. The system includes rules for ripple rings, wave bands, ichimatsu blocks, grooves, and pebbles, with constraints like no-U-turns and fixed rake starts. Difficulty scales through deductive grading and par solutions, with tools to enumerate all valid rakings and measure aesthetic beauty.
The project includes open-source code: src/zgsolve.c for exact DFS solving, src/zg.py for garden modeling and solver logic, src/zcp.py for CP-SAT proofs, and src/grader.py for deductive evaluation. All 223 files (1.8 MB) are available as a .zip download, including logs, poems, and test data. Build instructions require gcc, ortools, cairosvg, playwright, and ffmpeg. Paths are configured for /home/claude/zen/ but can be adjusted via sed. The single-file edition embeds the entire codebase in its appendix.
Fuente: Hacker News · Resumido por HeadlinesBriefing