Qimen Engine Accuracy & Methodology

How we compute a chart, which programs we compared it with, and the reason behind every difference. Every number is read from the latest test run file.

In short

SPYLL tested its Qimen engine on 10,000 moments picked on purpose where mistakes are easy, and compared the results with reference programs. No difference is left unexplained. Every difference comes from a different rule choice or from a mistake in the reference program, and each cause is listed below.

See the numbers and technical detail

Why Chai Bu Zhuan Pan is labeled popular method

Our main Qimen engine runs Chai Bu (拆补) with a rotating plate (转盘). We label it popular method because modern practitioners and libraries adopt it widely. Qing court manuals like Yuding Qimen Baojian actually favor Zhi Run over early Chai Bu variants, so popular method avoids misleading antiquity claims.

Engine Conventions

  • 23:00 day boundary matches SPYLL's BaZi wall-clock rollover convention.
  • Center Palace 5 hosts on Kun Palace 2 (寄坤二宫) for rotating stars and stems.
  • 24 solar term boundaries use exact astronomical instants evaluated against UTC+8.
  • Deity seats 5 and 6 follow White Tiger then Black Tortoise, while documenting Tongzong (Gou Chen, Zhu Que) and Yuding (Zhu Que, Bai Hu) variants as disputed.

Difference from Destiny Palace inside BaZi results

The Destiny Palace card inside SPYLL's main BaZi report uses a modern profiling framework built for natal personality insight. This calculator and daily planner compute popular-method Chai Bu hour charts independently.

10,000-Sample Weighted Cross-Check (1900 to 2100 WITA)

We compared 10,000 weighted timestamps (near jie qi, 23:00 hours, 旬首 in the centre, Fu Tou days) with four programs. The Independence column says what each program really tests. Only taobi and kinqimen bring their own code and calendar. The reference rewrites the rules from the classical text on the sxtwl calendar, but it makes the same school choices we do (拆补, 寄坤二, 23:00 day roll). It checks implementation and calendar, not the choice of school.

10,000-Sample Weighted Cross-Check (1900 to 2100 WITA)
Compared withIndependenceComparedExact matchConventionOracle bugOracle limitationOur bugUnexplained
qimen-rsOwn code, same calendar family as ours10,00010,00000000
Independent reference (sxtwl calendar and classical rules)Rules rewritten, sxtwl calendar, same school choices as ours10,00010,00000000
taobiOwn code and own calendar9,5117,0962,1911121300
kinqimenOwn code and own calendar10,0003,1494,4011962,25400

Secondary check (not counted as an oracle)

Secondary check (not counted as an oracle)
Compared withIndependenceComparedExact matchConventionOracle bugOracle limitationOur bugUnexplained
taobi-layout-check (not independent: given our Ju, verifies plate layout only)Plate layout only9,5119,51100000
  • taobi reads the host timezone history. 489 instants where Shanghai clocks were not UTC+8 (before 1901, war time, daylight saving) are left out of the taobi rows.
  • qimena.com CC0 Ju table: 72 of 72 cells match.
  • qimena.com CC0 fixture: 56 of 56 rows match on four pillars, dun type and Ju number. The file holds no boards, so boards are not compared.
  • lunar-typescript jie qi times are at most 0.52 minutes from the Hong Kong Observatory data, and 72 of 72 times are within 1 minute.
  • The whole run gives identical output under host timezones Asia/Jakarta, UTC, Asia/Shanghai.
  • 4,930 rows carry the kinqimen deity seat difference (勾陈 and 朱雀), counted in whichever group owns the row.
  • Gate status: passed. Zero unexplained differences.

Cause of each difference

Each sample row lands in exactly one group. When a row has several causes, the highest-priority group owns it: oracle bug first, then oracle limitation, then convention.

Cause of each difference
Compared withKindCauseRows
kinqimenConventionkinqimen puts 勾陈 and 朱雀 in deity seats 5 and 6 on every yang-dun chart (seat convention, we use 白虎 and 玄武)4,401
taobiConventiontaobi turns the day at 00:00, we turn it at 23:00 (convention)2,191
kinqimenOracle limitationkinqimen does not print the hosted centre heaven stem1,436
kinqimenOracle limitationkinqimen computes the month or year pillar per day, not at the jie qi instant781
taobiOracle limitationtaobi switches jie qi later than three calendars (lunar-typescript, sxtwl, astronomia), by up to about 2.6 minutes in 2069 to 2097213
kinqimenOracle bugkinqimen builds the plate one hour early at some hours, wrong hour pillar109
kinqimenOracle bugkinqimen prints heaven stems that contradict its own stars on Fu Yin charts87
kinqimenOracle limitationkinqimen switches jie qi less than 3 minutes from the instant three calendars give37
taobiOracle bugtaobi adds a 5 minute correction before 1970, so its day pillar lags at 00:00 to 00:0411

We also verified Kong Wang, Hour Horse, Day Horse, Men Po, Ji Xing, and Ru Mu across all 10,000 samples against qimen-rs with 10,000/10,000 exact matches. (10,000/10,000 Kong Wang, Horse, Men Po, Ji Xing, Ru Mu).

Documented Classical Disagreements

deitySeats5And6

Deity seats 5 and 6 use White Tiger (白虎) then Black Tortoise (玄武). Tongzong lists Gou Chen and Zhu Que; Yuding lists Zhu Que and Bai Hu.

kongWangBasis

Default Kong Wang uses the hour Xun; day Xun void is also exposed. Miji Daquan uses both hour and day voids depending on matter.

horseStarBasis

Default Travelling Horse uses the hour branch; day-branch horse is also recorded. Miji Daquan Vol. 1 tables key Horse to day branch while other sections use hour branch.

menPoPairs

Men Po applies the full five-element control rule (door controls palace element). Yu Ding lists 13 pairs and Tong Zong lists 11. Tongzong's printed list enumerates 11 pairs omitting Shang on Kun-2 and Jing on Dui-7.

ruMuPalaces

Three Wonders Tomb uses Yi->Kun(2), Bing->Qian(6), Ding->Gen(8) per Tongzong. Yuding places both Bing and Ding in Qian(6).

fuYinOnLiuJiaHour

Fu Yin flags structural home alignment while separately flagging 六甲 hours. Yanyi calls all six Jia hours Fu Yin; Yuding rejects counting six Jia hours as Fu Yin.

青龙返首 (Green Dragon Turns Head)

Tongzong specifies active Zhi Fu Jia on Bing, while Miji Daquan's 81 table treats general Wu on Bing.

飞鸟跌穴 (Flying Bird Falls into Cave)

Yanyi writes Bing over Jia; the code uses Earthly Wu as the stand-in for Jia. Tongzong's 40-formation list writes Bing over the Earth-plate Jia Zhi Fu.

玉女守门 (Jade Maiden Guarding the Door)

Yanyi and Yuding place Zhi Shi over Earthly Ding; Tongzong's 40-list uses Lin's stem-pair list.

神遁 (Spirit Concealment)

Tongzong's 40-formation list reads Spirit Concealment as Rest Door, Yi, and Nine Heaven, while Yanyi (used by the code) reads Bing, Nine Heaven, and Life Door.

地假 (Earthly Borrowing)

Yanyi also lists Delusion Door with Ding/Ji/Gui over Six Harmony (suited to flight) and over Tai Yin (suited to sending scouts). Miji records a second Di Jia with Harm Door and Ding/Ji/Gui over Tai Yin. SPYLL detects Delusion Door over Nine Earth.

人假 (Human Borrowing)

Miji writes Fear Door with Six Harmony and records the variant (one text has Ren); Yanyi writes Fear Door with Six Harmony and records no variant. On the SPYLL plate Six Harmony and Nine Heaven cannot share a palace, so SPYLL uses the Ren variant. That is a SPYLL choice, not the wording of the books.

月格 (Month Geng Structure)

Tongzong checks the month pillar stem, whereas Yuding checks the first day stem of the lunar month.

时格 (Hour Geng Structure)

Tongzong specifies Three Wonders on Hour Stem while Yuding applies to any Hour Stem.

荧入太白 (Mars Enters Venus)

One passage of Tongzong writes that Ying Ru Bai favors the guest, while another passage (Bing over Geng) says it favors the host and not the guest.

天网四张 (Heavenly Net)

Net height thresholds differ: Tongzong splits palaces 1-5 vs 6-9, while Yanbo splits 1-2, 3-4, 8-9.

伏吟 (Concealed Chanting (Stasis))

Yuding (释反吟伏吟) rejects counting the six Jia hours as Fu Yin: in those hours the Zhi Fu and Zhi Shi each keep their own place, which it calls Dun Jia. The quote above is Yanyi, which counts them.

六仪击刑 (Six Instruments Punishment)

Yuding records a minority variant shifting Ji to 8, Geng to 4, and Gui to 2.

三奇入墓 (Three Wonders Enter Tomb)

Yuding places both Bing and Ding's tomb in Qian(6).

门迫 (Door Pressure)

Yuding (释迫) lists 13 door-and-palace pairs. Tongzong's list holds 11 pairs, without Shang in Palace 2 and Jing in Palace 7. SPYLL uses Yuding's 13 pairs, which equal full five-element control (the door controls its palace).

Seeking profit & cashflow

Miji Daquan Vol. 20 verse points to Rest Door (休门) for profit while Vol. 10 and Tongzong point to Life Door (生门); Tongzong and Yanyi also disagree on Tian Ren for commerce.

Deals, trade, & lending

For loans, Miji Daquan gives two distinct stand-in systems across Vol. 7 and Vol. 10, while verse guides use Harm Door (伤门) strictly for debt collection.

Seeking a post & meeting decision-makers

Miji Daquan Vol. 20 verse and Yanyi's Heaven Concealment cite Life Door (生门) for seeking office, while Tongzong favors Rest Door (休门) over Open Door for senior audiences.

Exams, tests, & submissions

Miji Daquan Vol. 7 assigns essays to Six Ding, Vol. 9 widens to Scenery Door and Zhu Que, whereas Tongzong lists Open Door suitability for exams.

Travellers & lost belongings

For traveller timing under Geng Ge (庚格), Miji Daquan predicts return on that cycle whereas Yanyi and Yuding state the opposite (absent or not coming). For finding people or old things, Miji Daquan points to Scenery Door (寻人觅故须逢景), not Delusion Door.

Relationships & partner alignment

Miji Daquan tracks Yi, Geng, and Liu He palaces while Tongzong relies on auspicious door suitability (Life, Rest, Open).

Home, property, & dispute resolution

For housing, Tongzong checks the earth plate under Zhi Fu while Miji Daquan checks the hour stem or Life Door. For disputes, Tongzong bars Rest Door from legal rulings while Miji Daquan Vol. 22 allows it.

Qualitative Rating & Tie-Break Rules

Hours sharing the same qualitative tier receive an equal rank. Within an equal rank, display order flows chronologically from earliest shichen (01:00) to latest (23:00).

Qimen outputs serve cultural study and reflection only, with no guarantee of financial return, luck, medical outcomes, or legal results.