Nine Rings: why 341 moves is not a guess

You take the seventh ring off, feel clever, reach for the eighth — and the puzzle explains that the eighth is not yours to touch. The ring you just freed has to go back on the sword. Then it has to come off again. That is not a mean designer and not a broken interface: it is how the task itself works, and this single rule holds every bit of difficulty a two-hundred-year-old puzzle has.

Gameplay screenshot: Nine Rings

One rule, and it is expensive

Nine rings sit on a sword and all of them have to come off. The first ring moves whenever you like. The second only if the first is still on the sword. The third only if the second is on and the first is off. In general: to touch ring k, its neighbour k−1 must be lying on the sword and every ring before that must already be off. A tap that breaks the rule does not warn you and does not explain itself — the position simply stays where it was.

That is where the famous dance comes from. A far ring comes off only by putting a near ring back. You step two moves backwards to advance one, and the further right the ring, the longer the clearing takes. There is no cleverness in the task that cancels this: the whole puzzle is that one condition.

341 is a measurement, not an estimate

Here is what turns the rings from an evening toy into a school arithmetic problem: a position is nine bits. Each ring is either on the sword or off, there is no third option, so the whole world of the puzzle is 512 positions — one bit per ring. That is the page count of a thin booklet, and walking all of them is not a feat, it is a line of code.

So the "minimum number of moves" is not guessed here. It is read off a table: one breadth-first search from the empty sword sorts all 512 positions into "how many moves from here to nothing", and the distance from "all nine on the sword" to nothing comes out as 341.

The same number falls out of a formula, which is the nice part. Let T(n) be the minimum for n rings. To take the n-th ring off you have to arrange the head of the line as "ring n−1 on the sword, everything before it off", and later you must return that n−1 and clear it a second time — which gives T(n) = T(n−1) + 2·T(n−2) + 1 with T(1) = 1 and T(2) = 2. The row comes out as 1, 2, 5, 10, 21, 42, 85, 170, 341: each value roughly doubles, and in closed form it is (2 to the power n+1, minus one) divided by three for odd n. Put in nine: (1024 − 1) / 3 = 341.

Inside the game those two routes are required to agree. The graph search and the closed formula are computed independently, the panel quotes the search, and the formula sits next to it as an honesty check — a mismatch would be obvious without any tooling.

Where it came from

The rings are a Chinese task — 九连环, "nine linked rings" — and in the Chinese tradition they were a test of patience rather than a sport. In Europe they arrived under a name that says everything: in French the puzzle is called baguenaudier, from a verb meaning "to hang around with nothing to do". Historically it is the thing you picked up while waiting for something. Girolamo Cardano described it in the sixteenth century, which is why Western books still call it Cardano's rings.

The telling part is that the folk reputation and the mathematics never matched. People played with this of an evening, not noticing that every move advanced a binary counter: a position of nine rings is a number from 0 to 511, and an optimal run walks it through almost every value.

What this version has

Not one number on screen is stated casually. "Minimum" in the panel is the distance to the empty sword from that table; "moves left" is what remains on the shortest route right now. The four difficulty bands were cut from the histogram of those distances rather than invented, and the 64 campaign levels were selected in ascending order of the same measure: from one move to 511.

Three modes. Campaign, with the shelf opening as you clear it. Daily — one task for the whole world until midnight, derived from the date, so a link to it lands any visitor on exactly the same position. Random — an endless game inside the band you picked, with the seed written into the address bar, so "look what I got" works without sending saves around.

Hint always walks the shortest route, undo takes a move back, and Demo plays the level to the end on its own. None of it touches your records: the demo writes no stars, unlocks no shelf and submits no score. Your score is the star total across the campaign, 192 at best — three stars for solving in exactly the minimum, two for overshooting by no more than three moves, one for simply finishing.

Controls

  • tap or click a ring to take it off or put it back; on a phone, straight on the field, there is no joystick to hunt for
  • U undoes a move, H is a hint, D runs the demo, R restarts the level
  • F goes full screen, and RU/EN follows the page language

A few tips

  • Do not reach for the far ring by eye. Look at its left neighbour: if that one is off, the far ring will not move and you have spent a tap for nothing.
  • The first two rings are the gearbox. Almost all the time you burn on distant rings goes into keeping the first and second in the right order — learn not to touch the first one without a reason.
  • Watch "moves left" rather than "moves". The first number tells the truth about how far you have strayed from the optimal route; the second only says what you already spent.
  • Three stars are worth exactly the minimum. If you slipped onto a longer path, restarting is cheaper than an honest slog: the record keeps your best run, not your last one.
  • Open the demo on a third-band level. It shows the game putting rings back to get further, which is the fastest way to understand the rule once.

Thirty-four tens of moves, and every one of them is mandatory. Nine Rings: Chinese Puzzle

INFO
[Partner ads]

We use cook​ies for analytics. Click "OK" to consent.

Details