Yarrow Stalks (大衍筮法)

Fifty Stalks, Eighteen Changes — the Oldest Cast of the I-Ching

Overview

Before coins, there were stalks. The Da Yan casting (大衍筮法) is the method the I-Ching's own Great Commentary describes: fifty dried yarrow stalks, one set aside untouched as the ultimate (太極), and the remaining forty-nine divided, counted and winnowed through three 'changes' for each line — eighteen changes in all for a hexagram. It is slow by design: a meditation as much as a mechanism. And hidden in its choreography is one of divination's most famous pieces of mathematics — the yarrow procedure does not treat the four line-types equally. A moving yang arrives three times as often as a moving yin (3/16 against 1/16), an asymmetry the quicker three-coin method flattens away entirely. askTIAN's engine performs the authentic procedure — divide in two, hang one, count by fours, set the remainders aside — with a complete stalk-level audit for every change, asserts the arithmetic the ritual forces, identifies the hexagram by its true King Wen number, and proves the traditional probabilities by exact enumeration in its test suite rather than asking anyone to take them on faith.

Origin & history

The procedure descends from the 大衍章 of the Great Commentary (繫辭上) — 'the number of the great expansion is fifty; the use is forty-nine' — and its working form was standardized by Zhu Xi in his 筮儀 (Ritual of Milfoil Divination). Each change: the forty-nine (then fewer) stalks are divided into two heaps at random (分二, imaging the two powers); one stalk from the right heap is hung between the little fingers (掛一, imaging the third — humanity between heaven and earth); each heap is counted off by fours (揲四, imaging the four seasons); and the remainders are set aside (歸奇). The arithmetic is airtight: with the hung stalk in every change, the first change must discard exactly five or nine stalks and the second and third exactly four or eight, leaving twenty-four, twenty-eight, thirty-two or thirty-six — four times the line values six through nine. The old yin, young yang, young yin and old yang fall out at one, five, seven and three sixteenths respectively.

The stalks are the senior method — the Zuozhuan's divination stories are stalk-casts, centuries before coins — but the ritual's length made the three-coin shortcut the popular standard, and the two methods quietly diverge in their odds: coins give both moving lines an equal one-in-eight, while the stalks make yang eager to move and yin reluctant, a difference generations of diviners have read meaning into. Transmission also split on a detail: Zhu Xi's ritual hangs the one stalk in every change, while the school of 郭雍 hangs it only in the first — and the arithmetic is unforgiving: the variant provably changes the distribution. askTIAN implements the Zhu Xi form and names the variant in every response rather than merging them. The last modeling subtlety is disclosed the same way: the canonical probabilities assume the remainder classes are equally likely, which is the tradition's own idealization; modeling the physical split as a uniform heap size instead drifts slightly from the textbook figures. The engine draws the canonical remainder class and then realizes a true, valid split — so every cast carries an honest stalk count and the traditional odds hold exactly.

How it works

Each of the six lines runs three changes from a forty-nine-stalk pile. Per change the engine draws the left heap's remainder class (the canonical randomness), realizes an actual valid division consistent with it, hangs the one stalk, counts both heaps by fours and sets the remainders aside — returning the full audit: both heap sizes, the hung stalk, both remainders, the discard, and the pile carried forward. The procedure's arithmetic is asserted on every cast — a first-change discard outside {5, 9} or a later one outside {4, 8} would throw rather than return, and the final pile must be exactly four times the line value. Lines come back as 6/7/8/9 with their classical names (老陰, 少陽, 少陰, 老陽), sixes and nines flagged as moving; the hexagram is identified through the shared King Wen tables every other I-Ching endpoint uses, and the moving lines flip into the changing hexagram (之卦), null when nothing moves. The test suite proves the line distribution — one, five, seven and three sixteenths — by exhaustively enumerating all sixty-four remainder combinations, then confirms the engine reproduces it across ten thousand seeded lines. A seed makes any cast reproducible.

Good for

Use cases

The Slow Oracle

Render each line's three changes from the audit — the two heaps, the hung stalk, the counted fours, the discard — as an animated ritual, then reveal the line. Eighteen scenes to a hexagram: the ceremony, digitized without being falsified.

Stalks Beside Coins

Cast the same question with iching.yarrow and iching.coinToss and show both hexagrams with their method odds — a living demonstration of why the two traditions can breathe differently on the same question.

Changing-Hexagram Reading

Take the primary and changing hexagrams with the moving lines into iching.relations for the nuclear, opposite and reversed forms — the full classical reading stack from one authentic cast.

Probability Classroom

The endpoint returns the exact odds and the test suite proves them by enumeration — ready-made material for teaching how ritual choreography encodes probability.

Key terms

大衍筮法
The 'great expansion' casting: fifty stalks, one set aside, forty-nine worked through eighteen changes into a hexagram — the method the Great Commentary itself describes.
分二 / 掛一 / 揲四 / 歸奇
The four acts of each change: divide the pile in two, hang one stalk between the fingers, count each heap by fours, set the remainders aside. Three changes make a line.
太極 (The Set-Aside Stalk)
The fiftieth stalk, removed before the work begins and never used — the unmoving ultimate the forty-nine revolve around.
老陽 / 老陰 (Moving Lines)
Line values 9 and 6 — yang and yin at their extremes, about to turn into their opposites. They mark the reading's moving lines and generate the changing hexagram.
The Yarrow Odds
老陰 1/16, 少陽 5/16, 少陰 7/16, 老陽 3/16 — a theorem of the procedure, proven by exact enumeration in the test suite. Coins flatten this to 1/8, 3/8, 3/8, 1/8.
The Forced Discards
With the hung stalk in every change, the first change must discard 5 or 9 stalks and the later two 4 or 8 — arithmetic the engine asserts on every single cast.
郭雍 Variant
The school that hangs the stalk only in the first change — provably a different distribution, disclosed in every response rather than silently merged.
之卦 (Changing Hexagram)
The hexagram the moving lines turn into — the reading's direction of travel, null when no line moves.

API

The askTIAN Yarrow API performs the authentic eighteen-change Da Yan procedure with a complete stalk-level audit — both heaps, the hung stalk, both remainders and the discard for every one of the eighteen changes — asserting the ritual's forced arithmetic on every cast and identifying the hexagram by its true King Wen number through the same shared tables as every other I-Ching endpoint. Lines carry their classical names and moving flags; moving lines flip into the changing hexagram. The famous yarrow probabilities are returned with the cast and PROVEN in the open test suite by exhaustive enumeration of all sixty-four remainder combinations, with a ten-thousand-line statistical confirmation behind it. The Zhu Xi ritual is implemented; the 郭雍 variant and the split-modeling subtlety are disclosed in the method string. Deterministic under a seed; 2 TIAN pay-per-call; pure compute, no LLM.

Endpoint: POST /trpc/iching.yarrow — 2 TIAN Points. See the API documentation and Playground.