Zhuge Shenshu (諸葛神數)

Three Characters, One of 384 Answers

Overview

Write three characters — any three, the ones that rise when you hold the question — and the strategist answers. The Zhuge Shenshu (諸葛神數, also 諸葛武侯巧連神數) is the character oracle that wears Zhuge Liang's name: the stroke counts of your three characters, taken by the traditional Kangxi convention, assemble into a three-digit number, the number sheds 384 until it lands in range, and the landing is your lot — one of 384 classical verses, one for every line of every hexagram of the I-Ching. Lot 1 opens with a placard on heaven's gate and a champion foretold; lot 384 closes the book with flowers that prove nothing and fruit that proves everything. askTIAN implements the oracle the way its own rule demands — real traditional stroke counts from the same verified Kangxi pipeline as its name-analysis engine, the classical digit rule with its worked example test-locked, and the 384 verses served verbatim from the public-domain text.

Origin & history

The oracle is 托名 — lodged under the great strategist's name, as Chinese folk classics do — and askTIAN discloses that on every response: this is a later folk oracle, not a Three Kingdoms document. Its architecture, though, is elegant and genuinely old in spirit: 384 answers because the I-Ching has 384 lines (64 hexagrams × 6), so every cast lands on a line of the Changes by way of arithmetic rather than stalks. The casting rule is precise: strokes are counted on the traditional forms by the Kangxi dictionary convention; each character yields a digit — one to nine as they stand, an exact ten or twenty counting as zero, anything else its ones digit (fifteen casts as five); the three digits form hundreds, tens and units; zero total becomes 384; and any total above 384 sheds 384 repeatedly — the classical exposition's own example walks 795 down through 411 to lot 27.

The Zhuge Shenshu remains a living stall-and-app oracle across the Chinese-speaking world — the write-three-characters ritual is its signature, distinct from temple lots drawn from a cylinder or coins thrown on a table. Transmission has the usual seams, and askTIAN maps them rather than smoothing them: the exact-tens rule genuinely differs between lines (the classical exposition counts a ten-stroke character as zero; a modern implementation counts it as one) — the classical rule is followed and the variant disclosed; and stroke counting itself is the oracle's quiet failure point online, where simplified-form counts silently corrupt the cast. That is the corruption this implementation was built to avoid: the same Kangxi pipeline that fixed the name-analysis engine (traditional variants, radical full-forms, the numeral rule) feeds the cast, so 测 correctly casts as 測 at thirteen strokes.

How it works

Send exactly three Chinese characters. Each is resolved through the verified Kangxi pipeline — simplified forms convert to their traditional variants, radicals count as their full forms, the numerals count by value — and a character without a recorded count is refused by name, never guessed. The classical digit rule turns each count into a digit, the digits assemble into the three-figure number, and the reduction walks it into range with every step reported: the response carries the full audit (each character, its traditional strokes, its digit, the raw number, the shedding steps, the final lot) alongside the lot's classical verse, verbatim. A companion endpoint looks up any lot directly by number — for rendering the whole book, or returning to a saved cast. The modern commentary that circulates with online transcriptions is deliberately not shipped: the classical verse is the oracle; interpretation belongs to the reader — or to a language model you feed the verse to, grounded by the deterministic layer.

Good for

Use cases

The Three-Character Ritual

The user types three characters with their question in mind; the response animates the stroke counts, the assembling number, the shedding steps, and lands on the verse — the stall experience, digitized with the arithmetic shown.

The Book of 384

Render all lots via the direct lookup as a browsable classical book, the day's casts highlighting their pages — verse-first, commentary-free.

Character Oracle Rack

One input, two oracles: the same three characters through zhuge.cast (the lot) and cezi.cast (the hexagram with 體用) — arithmetic cousins from the same stroke foundation.

Model-Read Lots

Feed the verbatim verse plus the querent's question to your model for the prose reading — the classical basis fixed by the deterministic cast, the interpretation added on top.

Key terms

諸葛神數 / 巧連神數
The 384-lot character oracle under Zhuge Liang's traditional byline — three written characters, stroke arithmetic, one classical verse.
The Three Characters
Written or typed with the question held in mind — the oracle's randomness is the querent's own impulse, like cezi's but resolved to a lot rather than a hexagram.
The Digit Rule
1–9 strokes count as themselves; exact tens count as ZERO (the classical rule — a modern variant says one, disclosed); anything else its ones digit. Fifteen casts as five.
Shedding 384
Totals above 384 subtract 384 repeatedly until in range; a zero total becomes 384 itself. The classical example 795 → 411 → 27 is test-locked.
Kangxi Strokes
The oracle's own convention — counted here by the verified pipeline behind nameAnalysis: traditional variants, radical full-forms, the numeral rule. The failure point of most online implementations, done right.
签诗 (The Lot Verse)
The classical verse of each lot, served verbatim from the public-domain text — the modern commentary that circulates with transcriptions is deliberately not shipped.
托名 (Lodged Attribution)
The Zhuge Liang byline is traditional, not documentary — disclosed on every response.
zhuge.lot
The direct-lookup companion (1–384) for rendering the book or revisiting a saved cast.

API

The askTIAN Zhuge Shenshu API performs the write-three-characters cast with the oracle's own required convention actually implemented: traditional/Kangxi stroke counts from the verified pipeline (simplified input converts; unknown characters refused by name), the classical digit rule with the exact-tens school split disclosed, the full derivation audit in every response, and the classical worked example locked as a gold test. The 384 classical verses are served verbatim from the public-domain text — commentary-free, LLM-ready. With zhuge.lot for direct lookups. Pure deterministic compute, no LLM, 2 TIAN (1 TIAN for lookups).

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