TECHNOLOGY

Designer Turns Zen Sand-Raking Into a One-Stroke Puzzle Game Called Samon

A new design document reworks the meditative chore of raking a Zen garden into a puzzle: draw one unbroken stroke from the gate that covers every grain of sand. The project, backed by solver experiments across 148 hand-tuned levels, includes a playable prototype.

Close-up of a raked Zen sand garden with parallel grooves, a wooden rake, and a flat stepping stone at the garden's gateTECHNOLOGY

Image: gwern.net · Uploaded by IntraGoals — usage rights confirmed

A design project published online has turned an unlikely source material — the daily chore of raking a Zen dry garden — into a full puzzle game called Samon, Japanese for "sand crest." The premise is simple to state and, as the project's solver experiments show, surprisingly hard to make satisfying: a novice monk walks into a garden of white gravel, sets down his rake, and must walk backwards out to the gate in a single unbroken stroke, covering every cell of sand exactly once without crossing his own path.

The designer, writing under the name Gwern with assistance from an AI system credited as Claude-5.5-opus, formalizes each garden as a grid graph and each valid raking as a Hamiltonian path ending at the gate — the mathematical structure behind the familiar "draw without lifting your pen" puzzle, dressed in temple robes. Walking into the garden, it turns out, is a free action: because every raking must cover every cell, the final pattern is always the exact reverse of the walk in, so the interface can simply ask players to draw a single path from the gate.

The trouble, the project found, is that the bare rule is far too loose to make a good puzzle. An empty 7-by-7 garden with a gate in the corner has 1,510,446 valid solutions, and randomly placed stones tend to produce gardens that are either unsolvable or wide open, offering little of the tightness that makes a puzzle feel designed rather than arbitrary.

The fix came from scoring rather than new rules. Counting turns as a measure of "calm" sharply narrows the field: of those 1.5 million rakings in the 7-by-7 garden, only 66 reach the minimum of 12 turns, and those minimal-turn solutions tend to reproduce the parallel lines and rings around stones seen in real Zen gardens. A further rule borrowed from actual raking technique — a "wide rake" that cannot make a U-turn in open sand and must be set down against a stone or wall — often collapses a garden to a single unique solution. In one tested 8-by-8 garden, the wide-rake rule picked out the sole U-turn-free path among 12 minimal-turn solutions out of more than 6.3 million possible rakings.

Building on those findings, the design adds further mechanics such as ripple stones, wave bands, "grooves" that hint at the route, and pebbles that signal only whether the path goes straight or turns at that point — forcing players to plan ahead. The full game is organized into seven worlds, each introducing one new rule, moving through a day cycle from Dawn to Night with 148 total gardens, each rewarded on completion with a classical poem before the next garden fades in. The project also lays out a hint system built from proofs about the player's own partial route, a sand-renderer for presentation, a level-generation pipeline, and a production plan with pass/fail criteria for future development.

A playable prototype implementing most of the design, including all 148 gardens and their accompanying poems, has been published alongside the write-up, along with the underlying solver code and data for anyone who wants to verify the claims or build on the work.

Sources and further readingSamon: Designing a Zen Garden Raking Puzzle ↗
ABOUT THE DESK

Harsh DV

IntraGoals reports on important changes in technology and work. We check each story for clear writing, trusted sources and useful information before it is published.

KEEP READING

Latest from IntraGoals.

All latest stories ↗