Lingqi Jing (靈棋經)

Twelve Tokens, 125 Answers — the Divine Chess Oracle

Overview

Before coins simplified the I-Ching cast, China already had a pocket oracle: the Lingqi Jing, the Divine Chess Classic. Twelve small tokens — four marked 上 for heaven, four 中 for humanity, four 下 for earth, each with a marked face and a blank one — are cupped, shaken, and thrown at once. Count the marked faces standing up in each class and you have the cast: 一上一中一下 opens the great gate of 大通卦, the ascending image; all twelve blank is the 陰饅卦, the formless — the rarest answer in the book, arriving once in four thousand casts. Each of the 125 possible throws keys a classical response: a hexagram-like name, an image phrase, the 象曰 judgment, the 詩曰 verse. askTIAN serves the complete received text verbatim — all 125 entries, machine-verified for completeness — behind a seeded cast that returns the full twelve-token audit and, unusually for a divination API, tells you exactly how probable your answer was.

Origin & history

The Lingqi Jing travels under grand names: tradition ascribes it to 東方朔, the Han court wit, or has 張良 receive it from the sage 黃石公 alongside the art of war — attributions askTIAN discloses as 托名, the lodged bylines of Chinese classic-making, not documentation. The received text is genuinely old regardless: commentary layers were accumulating by the Six Dynasties, 劉基 of the Ming annotated it, and the 四庫全書 canonized it among the divination classics. Its architecture is a compressed cosmology — heaven, humanity and earth each given four tokens, the three counts forming a three-digit reading of the querent's moment — and its 125 responses form one of the earliest complete response-books in the divination literature.

The oracle lived as a traveller's practice — twelve tokens carry lighter than fifty yarrow stalks — and its verses seeded centuries of temple-lot poetry that followed. The text askTIAN ships is the public-domain received version from Chinese Wikisource, parsed with care: the classic's own headings omit zero counts (「二下」 means no heavens, no humanity, two earths), and the all-blank cast carries its own entry, the formless 陰饅卦 — all 125 combinations verified present exactly once before a single cast was served. The tone grading (auspicious, inauspicious, mixed, neutral) that accompanies each response is the engine's transparent keyword layer over the entry's name and image only, labelled as modern convenience — the classical text grades itself through its own words.

How it works

A cast simulates the physical act: twelve fair tokens, each landing marked-face-up or blank, the full flip audit returned so every cast can be inspected token by token. The three face-up counts key the response, which arrives verbatim — name, image, attribute line, 象曰, 詩曰, and the complete entry body. Then the honesty layer the tradition itself implies but websites never state: with fair tokens each class's count follows a Binomial(4, ½) distribution, so the 125 responses are deliberately not equally likely — the centre casts arrive hundreds of times more often than the extremes. Every response reports its own probability (the 陰饅卦 at 1/4096, the 2上2中2下 centre at 216/4096), and the test suite locks the arithmetic: probabilities sum to exactly one, the extremes and centre match theory, and a four-thousand-cast statistical run confirms the engine's tokens are fair. Pass a seed for a reproducible cast; omit it for a fresh throw.

Good for

Use cases

The Pocket Oracle

One call, one throw: the twelve tokens animate from the audit, the counts assemble, and the classical response lands with its verse — the traveller's oracle, digitized without being falsified.

Rarity-Aware Readings

Surface the probability with the response: a 1-in-4,096 陰饅卦 deserves different framing than a common centre cast, and this is the only oracle API that tells you which you got.

The Response Book

Render all 125 entries as the classic's own book — names, images, verses — with the cast highlighting tonight's page; the tone layer optional, the text primary.

LLM-Grounded Prose

Feed the verbatim 象曰 and 詩曰 into your model as grounded context for a modern reading — the classical basis guaranteed by the deterministic layer, the prose added on top.

Key terms

靈棋 (The Divine Chess)
The twelve tokens — four marked 上, four 中, four 下, each with a marked and a blank face — whose simultaneous throw is the cast.
上·中·下 (Heaven, Humanity, Earth)
The three classes of tokens; the three face-up counts (0–4 each) form the cast's identity, 125 combinations in all.
象曰 / 詩曰
Each response's two classical layers: the judgment (象曰) and the verse (詩曰) — served verbatim from the received text.
陰饅卦
The all-blank cast — the formless image, and the book's rarest response at 1 in 4,096 fair throws.
The Probability Layer
Fair tokens make each class Binomial(4, ½); the responses are deliberately not equally likely, and every cast reports its own probability — stated, never hidden.
托名 (Lodged Attribution)
The Han bylines — 東方朔, 張良 from 黃石公 — are traditional attributions, disclosed as such; the received text's antiquity stands on its own commentary history.
The Token Audit
Every cast returns all twelve token faces, so the throw can be inspected, rendered, or animated token by token.
Tone Grading
The engine's transparent keyword layer over each entry's name and image — a modern convenience labelled as such, never presented as classical markup.

API

The askTIAN Lingqi Jing API throws the twelve tokens with a full per-token audit, keys the cast into the complete received text — all 125 responses verbatim from the public-domain classic, completeness machine-verified — and reports what no other divination endpoint does: the exact probability of the cast you received, with the arithmetic locked by tests (sum exactly 1, extremes 1/4096, statistical fairness over thousands of casts). Attributions disclosed as 托名; tone grading labelled as the engine's own layer; deterministic under a seed. Pure compute, no LLM, 2 TIAN pay-per-call in the draw-oracle family.

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