Qi Men Dun Jia

Chinese military-divinatory art; classical form in the Yan Bo Diao Sou Ge and Ming–Qing compendia

Qi Men Dun Jia ('Mysterious Gates Escaping Technique') casts a nine-palace chart for each double-hour from the sexagenary calendar and the solar terms, rotating the nine stars, eight gates and eight deities over a fixed earth plate. Legend attributes it to military strategists; its classical mechanics are preserved in mnemonic verses and the Ming–Qing compendia. The schools genuinely disagree on how to determine the ju in edge periods — this engine computes the chai-bu (split-and-patch) method and says so.

What it measures

For one double-hour: the ju number (1–9, from the solar term in effect and the day's fu-tou), the earth plate of six ceremonial stems and three nobles, and the heaven, human and deity plates rotated so the duty star and duty gate follow the hour — pure calendar arithmetic once the school is fixed.

Where practitioners disagree

Still open

Rotating-plate details in the yin half-year vary between lineages, and the substitute conventions for the centre palace differ — the chart states its own conventions rather than claiming universality.

Sources

All technique histories