Ziwei Notes › History
History & Sources
From manuscript to software: how Zi Wei Dou Shu took shape, its texts, and how it spread
1. Its place among the arts
Chinese fate calculation has roughly three strands: Zi Ping Ba Zi, which sets four pillars from the gan-zhi of year, month, day and hour and reasons through the five phases;
Qi Zheng Si Yu, built on the motion of sun, moon, planets and the twenty-eight mansions (its classic is usually titled Guo Lao Xing Zong);
and Zi Wei Dou Shu, which takes the stars of the Purple Forbidden Enclosure near the north pole as its names and lays them out across a grid of palaces.
Each has its own "language": Ba Zi speaks through gan-zhi and the ten gods, Qi Zheng Si Yu through celestial positions and aspects,
while Zi Wei Dou Shu places a hundred-plus stars into a twelve-square diagram and, through their temperament, brightness and Four Transformations,
builds a symbolic system of human affairs and character. It does not depend on observation or computation — it is a highly codified system of images.
That is part of why it spread so widely: a chart can be taken in at a glance, and anyone can say a few words about it.
Zi Wei Dou Shu did not appear out of nowhere. Researchers have long noted its kinship with an older system, the Eighteen Flying Stars.
That system likewise distributes eighteen stars — Zi Wei, Tian Xu, Tian Gui, Tian Yin and so on — across the twelve palaces; its rules and judgments overlap clearly with the later art,
and it is regarded as the predecessor or a parallel branch of Zi Wei Dou Shu.
The skeleton of the received system can be summarised thus: the gan-zhi of the birth year fixes the five-element phase and the position of Zi Wei;
the month and hour place the remaining stars; the yearly stem raises the Four Transformations;
and human affairs are then unfolded through the twelve palaces. Compared with the Eighteen Flying Stars its star count is greatly expanded
(fourteen major stars plus dozens of auxiliaries and harmful stars), the Four Transformations are promoted to a pivotal role,
and judgment moves from "one star, one verdict" toward "star combinations pulled by the Four Transformations".
To read the evolution of such an art, look at its vocabulary: the smaller the vocabulary, the more it relies on single-word verdicts;
the denser the vocabulary, the more it leans on combinations and relations. The expansion of Zi Wei Dou Shu essentially turned verdicts into sentences.
3. The question of authorship
Older copies usually credit the art to the early Song Daoist Chen Tuan (styled Xiyi), and Ming editions often bear the line "compiled by Chen Tuan, commented by Luo Hongxian".
Yet on the surviving evidence the complete system leaves no trace in Song literature, and its formation is generally dated no earlier than the mid-Ming.
Attributing a work to an earlier master is extremely common in this literature: a famous name helps a text travel and helps a doctrine gain authority.
When reading these books, therefore, one should treat the author line as a marker of transmission rather than a historical record;
what can actually be examined is the edition and the content.
Note: judgments about origins should rest on surviving editions, bibliographic records and internal evidence — not on popular lore.
4. The main texts
| Text | Date / edition | What it offers |
| Eighteen Flying Stars Ce Tian Zi Wei Dou Shu |
Pre-Ming method; copied through Ming and Qing |
Eighteen stars across twelve palaces; regarded as the predecessor system, useful to read beside the received version. |
| Zi Wei Dou Shu Quan Ji (Complete Works) |
Ming printed edition, often reprinted in Qing |
A relatively complete system — star placement, star verses and pattern entries — and one of the most used old texts today. |
| Zi Wei Dou Shu Quan Shu (Complete Book) |
Ming–Qing editions, varying scroll counts |
Usually carries the "Chen Tuan compiled, Luo Hongxian commented" line; content is largely star verses and verdicts. |
| Dou Shu Xuan Wei and other Qing works |
Qing to Republican era |
Practice-oriented collections of formulas; a transitional form before the schools diverged. |
These books share one trait: heavy on verse, light on argument. They offer quantities of four- and seven-character star verses and named patterns,
but rarely explain "why". Most later disagreements between schools come down to how those verses are interpreted.
5. Modern times and the schools
In the second half of the twentieth century the art was systematically reorganised in Hong Kong and Taiwan, and several influential approaches took shape:
- San He (Trine) school: works mainly from star combinations, brightness (miao / wang / li / xian) and the aspects of the trine and opposite palaces; the most widespread approach, strong at describing character and patterns.
- Si Hua (Flying Star) school: takes the "flying in and flying out" of the Four Transformations as the pivot, reading the pull and causal chains between palaces; strong at describing how events arise and turn.
- Zhong Zhou school: stresses transmitted oral formulas and reading star systems as wholes, with finer distinctions of a star's "substance and function".
The three are not mutually exclusive; they differ in the angle from which an image is taken. On one chart, San He asks "which stars gather here",
Si Hua asks "which two palaces are pulling at each other", Zhong Zhou asks "which face of this star is being used in this position".
Modern students typically ground themselves in San He and use Si Hua to read change — the most common path today.
6. Into the digital age
Casting a chart used to be drudgery: placing stars meant consulting many tables, and intercalary months, solar terms and true solar time all had to be corrected by hand.
From the 1990s computer programs automated that table work, and only then did the art move from a handful of manuscripts to a mass audience.
More recently, rules have been written as code and texts generated by models — the
desktop tool offered here is of that kind. It fixes star placement, palaces and transformations into reproducible code,
then has a language model compose the prose. The benefit is that the chart itself is stable and reproducible;
but the reading text remains a piece of writing, valuable as a cultural mirror rather than as a definitive answer.
Keep sources and legends apart: the history given here rests on surviving texts and mainstream research, and passages involving attribution or dating are flagged as uncertain.