What is Qi Men Dun Jia

The imperial battle chart

Qi Men Dun Jia lays the heaven plate, earth plate, spirit plate, and human plate onto the Nine Palaces to read fortune for a given hour and a given direction. Folk tradition calls it imperial learning: Emperor Taizong of Tang once forbade it from leaving the court. In the Three Arts, Qi Men corresponds to Earth (direction); Tai Yi to Heaven (the fate of states); Liu Ren to the Human. This app casts a Time Chart: choose the hour and the direction, then interpret the matter before you act.

The original words

Qi — the Three Wonders: Yi, Bing, and Ding. Men — the Eight Gates. Dun — to conceal. Jia — the heavenly stem that heads the ten stems. The whole phrase: conceal Jia, then divine by the Wonders and the Gates. The stem Jia (the sovereign) hides under the Six Yi; what shows are the three Wonders and the Eight Gates.

Picture this: at any moment, the eight directions around you are not alike. The Nine Palaces sweep all eight — which way is open, which is blocked. Ancient strategists used that to choose a line of march. Yan Bo Diao Sou Ge (Song of the Old Angler on the Misty Waves): yin and yang, forward and reverse — the subtle principle has no end — the two solstices return, one circuit of nine palaces.

Origins — two thousand years, no single author

Legend says the Mysterious Lady of the Ninth Heaven (Jiu Tian Xuan Nü) gave the art to the Yellow Emperor while he fought Chi You, first as 1,080 ju. That is myth. The system was assembled over many generations; no one person invented it.

The name shifted with the ages: Zhou–Qin called it Yin Fu; Han–Wei, Liu Jia; Sui–Tang, Dun Jia; only in Ming–Qing did the four characters Qi Men Dun Jia stand complete. It is often credited to Zhuge Liang — he applied it brilliantly (the Eight Formations Diagram), he did not create it. The earliest written evidence: Bao Pu Zi (The Master Who Embraces Simplicity) by Ge Hong (284–364), the chapter Deng She (Ascending Mountains) — using Tai Yi Dun Jia to choose a day to enter the mountains, not only to array troops.

Dates often told
EraEvent
Spring and Autumn – Warring StatesFormative stage, called Yin Fu
Western HanTradition: Jiang Shang reduced 1,080 ju to 72; Huangshi Gong passed 18 ju to Zhang Liang
Three KingdomsZhuge Liang: the Eight Formations Diagram — enter and leave by eight gates, nine stars in rank and file
Eastern JinGe Hong records it in Bao Pu Zi
TangLi Chunfeng collated the system; transmission among the people was banned
MingLiu Bowen; the book Qi Men Dun Jia Tong Zong (Complete Compendium of Qi Men Dun Jia)

Four layers on the Nine Palaces

The board is a 3×3 matrix of four stacked layers: Heaven, Human, Spirit, Earth. Each cell holds four facts (star · gate · deity · stem). Full fortune needs an auspicious star, an auspicious gate, an auspicious deity, and a stem without clash. It is like reading a film in many layers — one auspicious layer is not enough to conclude.

Heaven plate — Nine Stars

Nine stars: the qi of heaven, the larger cycle. Grounded in the River Chart and the Luo Writing (He Tu and Luo Shu).

Star (Tinh)Home palace (Cung)PhaseCharacter
Tian PengKanWaterInauspicious — plots, the hidden
Tian RuiKunEarthInauspicious — illness, delay
Tian ChongZhenWoodAuspicious — motion, decision
Tian FuXunWoodAuspicious — letters, study
Tian QinCenterEarthAuspicious — loyalty, noble helpers
Tian XinQianMetalAuspicious — medicine, noble helpers
Tian ZhuDuiMetalInauspicious — breakage, dispute
Tian RenGenEarthAuspicious — land, stability
Tian YingLi (Ly)FireMildly auspicious — fame, easily hollow

Human plate — Eight Gates

The Eight Gates are the action layer — where Qi Men is strongest when judging human affairs. The three auspicious gates: Open (Khai), Rest, Life (Sinh). Looking only at the gate is not enough: the Open Gate meeting Tian Peng and Teng She is no longer auspicious.

GateHome palace (Cung)FortuneMeaning
RestKanGreatly auspiciousRest, accordance
Life (Sinh)GenGreatly auspiciousBirth, wealth, trade
HarmZhenInauspiciousLoss, conflict, litigation
BlockXunNeutralClosed; useful when concealment is needed
SceneLi (Ly)NeutralBrightness, fame, easily hollow
DeathKunGreatly inauspiciousEnding, mourning
Fright (Kinh)DuiInauspiciousFear, shock, dispute
Open (Khai)QianGreatly auspiciousOpening, office, affairs

Spirit plate — Eight Deities

Eight Deities: the unseen layer — noble helpers, deceit, litigation, concealment. The same auspicious direction may favor one person and obstruct another: the deity accounts for that part. Zhi Fu follows the ju leader (Jia at the head of the ju). For petitions: Zhi Fu + Tai Yin = hidden support; avoid Teng She + Xuan Wu. The app switches the names Bai Hu/Gou Chen and Xuan Wu/Zhu Que according to yang dun · yin dun.

DeityFortuneCharacter
Zhi FuGreatly auspiciousA noble helper presiding
Teng SheInauspiciousAnxiety, the unexpected
Tai YinAuspiciousConcealment, secrecy
Liu HeAuspiciousUnion, marriage, intermediaries
Bai Hu / Gou ChenInauspiciousClash, injury, litigation
Xuan Wu / Zhu QueInauspiciousDeceit, theft, dispute
Jiu DiAuspiciousStability, defense
Jiu TianAuspiciousOpening, attack

Earth plate — Three Wonders, Six Yi, concealing Jia

A fixed ground: the Three Wonders — Yi (sun), Bing (moon), Ding (star) — and the Six Yi: Wu, Ji, Geng, Xin, Ren, Gui. Jia hides under the Six Yi: Jia Zi–Wu, Jia Xu–Ji, Jia Shen–Geng, Jia Wu–Xin, Jia Chen–Ren, Jia Yin–Gui — that is concealing Jia. Stems and branches drive the whole board.

Eighteen ju — nine yang, nine yin

A year is divided by the twenty-four solar terms: nine Yang Dun ju (from Winter Solstice until before Summer Solstice) and nine Yin Dun ju (from Summer Solstice until before Winter Solstice). Each ju is a way of placing the Three Wonders and Six Yi on the earth plate.

Tradition: 1,080 ju → Jiang Shang 72 → Zhang Liang 18. 360 days / 20 yuan (each yuan 18 days) match the repeating 18 ju. Yang Dun runs forward (1→2→3…); Yin Dun runs reverse (9→8→7…). Yan Bo Diao Sou Ge: in yang dun the Yi move forward and the Wonders reverse; in yin dun the Yi reverse and the Wonders move forward.

In this app

It casts a Time Chart — the ju changes every two hours, as event divination requires. Day charts and year charts are other layers; the app does not take them as the default.

Two board types: rotating board and flying board. Three placement methods: Zhi Run, Chai Bu, and Yin board. The Board tab is free to view. Hour and Direction are rented by the hour (one package opens both). Live strategy is a separate package. Study is gated by VIP/Coach.

Two modern branches: Numerics — compute the board, then interpret by rule, which can be checked; Ritual magic — adds talismans and rite. The app follows numerics.

What it is used for

Hour and direction

Choose an hour to meet, sign, or open; choose a direction of travel. Eight Mansions feng shui reads a house’s fixed facing; Qi Men adds the time dimension — the same direction differs at the Zi hour and the Wu hour. The Hour and Direction tabs in the app do exactly that.

Judging a matter

Ask about one matter, cast a board for the hour of the question, and read the four layers at the Useful God palace. The Board tab plus the topical essays in Study.

Not laboratory science

No quantitative study has yet proved or disproved it. Its value is a frame: it forces you to weigh time, direction, and circumstance before you act — a second opinion beside rational analysis, not a substitute.

Four common misunderstandings

Zhuge Liang did not invent it

He used the Eight Formations Diagram. The system existed from the Warring States, centuries before him. Later books that write “first by Zhuge Liang” are false attributions. Ge Hong is the one who recorded it early in a book.

Not a supernatural spell

At the same moment, two people compute the same board — the formula is determinate. The mystery is the interpretation, as when two physicians read one film.

Not the Eight Gates alone

The gate is one of four layers. The Open Gate + Tian Peng + Teng She is no longer auspicious.

Not identical with the I Ching

They share the eight trigrams, the Nine Palaces, and yin–yang. The Changes have 64 hexagrams; Qi Men has 18 ju, four layers on the board. They meet in philosophy; they differ in method.

Quick questions

How does it differ from Liu Ren?

They belong to the same Three Arts. Qi Men: which way to go, at which hour. Liu Ren: which person, what matter, how it ends. One is space–time; the other is human affairs.

Where should study begin?

Stems and branches, the Five Phases, the eight trigrams, the Nine Palaces, the twenty-four solar terms — then cast a board, then interpret. The Study tab in the app is a dictionary of gates · stars · deities and topical essays; this page is the door.

Why is it called imperial learning?

In the Tang it was forbidden to teach the people. Whoever held Qi Men could choose the line of attack; if the enemy knew it, the advantage was lost. That ban still leaves an aura of secrecy.

How does a Time Chart differ from a day chart?

A Time Chart follows the hour, changing every two hours, for event divination. A day chart follows the day, for broader date selection. A year chart looks at the year. This app casts a Time Chart.

How does it relate to feng shui?

Feng shui is mainly fixed space. Qi Men adds the hour. The same house facing, at a different time, has a different fortune.

Reference materials

Content in the app is compiled and rewritten (not quoted verbatim), drawn from the classical Qi Men corpus and from applied methods in circulation. The dictionary (Eight Gates · Nine Stars · Eight Deities · heavenly stems · Nine Palaces) and the topical essays are a synthesis, not tied to a single author — each entry does not cite a separate source.

Foundational texts
WorkNote
Bao Pu Zi (The Master Who Embraces Simplicity) — Ge Hong (284–364)Chapter Deng She (Ascending Mountains): an early written record of Dun Jia
Yan Bo Diao Sou Ge (Song of the Old Angler on the Misty Waves)Foundational mnemonic verse: yin–yang forward and reverse, eighteen ju
Qi Men Dun Jia Tong Zong (Complete Compendium of Qi Men Dun Jia, Ming dynasty)A collected treatise on configurations; often attributed to Liu Bowen
Li Chunfeng’s collation (Tang dynasty)Systematized the ju; the period when popular transmission was banned

The closer the hour of casting, the more reliable the ju and the star placements. Cast a chart in the app — view the Nine Palaces for free.

Cast a Qi Men Dun Jia chart