How the engine was validated
Last updated:
This site says its home engine reproduced a paid professional audit to the digit, with 27 of 27 flying-star palace numbers and 32 of 32 directional assignments. That is true. It was one home and one audit, and the audit is a private document that cannot be published. So this page shows what it can: what was compared, how a match was decided, the engine's full output for an invented home that you can re-run, and the same functions checked against examples that other people have published.
The short version
- One home, one paid audit from 2013, one practice. This is a single comparison, not a benchmark suite.
- You cannot check that audit yourself. You can check everything else on this page.
- Section 4 prints the engine's 27 flying-star numbers and 32 Eight House assignments for an invented home, each with its rule. A test fails if the printed tables ever differ from a fresh run of the engine.
- Section 5 checks the same arithmetic against published sources. All 648 numbers in 24 published flying-star charts agree, and a published Eight House verse agrees in 56 of 56 places in one printing and 54 of 56 in another.
1. What was compared
The site's author bought a written feng shui audit of one residence from a professional practice in 2013, and compared the engine's output with it line by line. The totals were 27 flying-star numbers and 32 Eight House assignments. This page counts them as follows, and section 4 uses the same count.
- A nine-palace flying-star chart has three numbers in each palace: the period star, the mountain star and the facing star. Nine palaces times three numbers is 27.
- Eight House gives one star to each of the eight directions for a person's life trigram. Eight directions for each of four people is 32.
A match means the engine printed the same number, or the same star name, as the audit for the same palace or direction. There was no tolerance, no rounding and no partial credit. One different digit would have been a miss.
Not published: the name of the practice, the practitioner, the property and everyone connected with it, and any page, quote or image of the document. It is a third party's paid work about a private home.
2. How the engine produces each number
Each number comes from one engine function and one rule. Periods are 20 years long and count from 1864, so period 8 runs from 2004 to 2023.
| Number | Engine function | Rule |
|---|---|---|
| Period star | base_chart | The period number goes in the centre and flies forward along the Luoshu path: centre, northwest, west, northeast, south, north, southwest, east, southeast. |
| Mountain star | natal_chart | The period star in the sitting palace goes in the centre and flies forward or backward. The direction comes from the mountain, in the same yuan as the sitting mountain, in that star's own trigram. |
| Facing star | natal_chart | The same rule, starting from the period star in the facing palace. |
| Which chart | natal_chart_from_degrees | The compass bearing gives the facing mountain, one of 24 of 15 degrees each. Within 3 degrees of its centre the plain chart is used. From 3 to 6.5 degrees the replacement-star chart is used. Within 1 degree of a boundary both neighbouring charts are shown. |
| Life trigram | ming_gua | Add the digits of the birth year, counted from Start of Spring, until one digit is left. Men take 11 minus that digit, women take that digit plus 4. A result of 5 becomes 2 for men and 8 for women. |
| Direction star | youxing_stars | Compare the three lines of the life trigram with the three lines of the trigram in each direction. The pattern of lines that differ names the star, as the table below shows. |
| Lines that differ | Star |
|---|---|
| top | 生氣 Vitality |
| middle | 絕命 Severed Fate |
| bottom | 禍害 Mishap |
| top and middle | 五鬼 Five Ghosts |
| top and bottom | 六煞 Six Killings |
| middle and bottom | 天醫 Heavenly Doctor |
| all three | 延年 Longevity |
| none | 伏位 Stability |
3. What this does not show
- One home. A single residence tests a small part of the possible charts.
- One practice. The audit is one professional's work. Practitioners differ, and agreeing with one is not agreeing with all.
- One document. Nobody outside can repeat the comparison, because nobody else can see the document.
- Agreement is not proof. Two sources that print the same number show that they apply the same convention. They do not show that the convention describes anything real. Schools disagree: some lineages chart a mixed facing that stays inside one trigram with the plain chart, where this engine switches to the replacement-star chart beyond 3 degrees.
- Arithmetic only. Matching star numbers and direction names says nothing about whether the readings built on them are right.
- Not the calendar layer. The separate claim that BaZi charts match commercial chart products is not covered here.
4. Reproduce it: an invented home
Nothing in this section is a real house. The home, the people and the floor plan are made up for this page. Run the same functions on your own inputs and compare.
| Input | Value |
|---|---|
| Front of the house faces | 256° |
| Mountain faced | 庚 |
| Offset from the mountain's centre | 1° |
| Facing zone | 正向 true facing |
| Built and first occupied | 2016 |
| Period | 8 |
| Chart used | 下卦 plain chart |
| Sitting mountain | 甲 yang Wood |
| Facing mountain | 庚 |
| Structure | 雙星到坐 double stars at the sitting |
4.1 Flying stars: 27 numbers
The chart is built from three flights. The mountain flight starts from the period star in the sitting palace, and the facing flight from the period star in the facing palace. The reference mountain is the one that sets the direction of each flight, as described in section 2.
| Number | Engine function | Start palace | Start star | Reference mountain | Flight |
|---|---|---|---|---|---|
| Period star | base_chart | centre | 8 | none | forward |
| Mountain star | natal_chart, _polarity_for | 震 east | 6 | 戌 Dog, Earth | backward |
| Facing star | natal_chart, _polarity_for | 兌 west | 1 | 壬 yang Water | forward |
Each number is the flight's start star plus or minus the palace's step along the Luoshu path. A result past 9 or below 1 is brought back into 1 to 9 by adding or subtracting 9. The steps are: centre 0, northwest 1, west 2, northeast 3, south 4, north 5, southwest 6, east 7, southeast 8.
| Palace | Step | Period star | Mountain star | Facing star |
|---|---|---|---|---|
| 中 centre | 0 | 8 + 0 = 8 | 6 − 0 = 6 | 1 + 0 = 1 |
| 乾 northwest | 1 | 8 + 1 = 9 | 6 − 1 = 5 | 1 + 1 = 2 |
| 兌 west | 2 | 8 + 2 = 10 → 1 | 6 − 2 = 4 | 1 + 2 = 3 |
| 艮 northeast | 3 | 8 + 3 = 11 → 2 | 6 − 3 = 3 | 1 + 3 = 4 |
| 離 south | 4 | 8 + 4 = 12 → 3 | 6 − 4 = 2 | 1 + 4 = 5 |
| 坎 north | 5 | 8 + 5 = 13 → 4 | 6 − 5 = 1 | 1 + 5 = 6 |
| 坤 southwest | 6 | 8 + 6 = 14 → 5 | 6 − 6 = 0 → 9 | 1 + 6 = 7 |
| 震 east | 7 | 8 + 7 = 15 → 6 | 6 − 7 = −1 → 8 | 1 + 7 = 8 |
| 巽 southeast | 8 | 8 + 8 = 16 → 7 | 6 − 8 = −2 → 7 | 1 + 8 = 9 |
4.2 Eight House: 32 assignments
Four invented residents. Each life trigram is worked out by the life-trigram function in section 2.
| Resident | Sex | Born | Life trigram | Group |
|---|---|---|---|---|
| A | man | 1972 | 坎 | East |
| B | woman | 1975 | 艮 | West |
| C | man | 2003 | 乾 | West |
| D | woman | 2006 | 震 | East |
Each cell below is the star that the direction-star function in section 2 gives for that direction, with the pattern of changed lines that produces it underneath.
| Direction | Resident A 坎 | Resident B 艮 | Resident C 乾 | Resident D 震 |
|---|---|---|---|---|
| 坎 north | 伏位 none | 五鬼 top and middle | 六煞 top and bottom | 天醫 middle and bottom |
| 艮 northeast | 五鬼 top and middle | 伏位 none | 天醫 middle and bottom | 六煞 top and bottom |
| 震 east | 天醫 middle and bottom | 六煞 top and bottom | 五鬼 top and middle | 伏位 none |
| 巽 southeast | 生氣 top | 絕命 middle | 禍害 bottom | 延年 all three |
| 離 south | 延年 all three | 禍害 bottom | 絕命 middle | 生氣 top |
| 坤 southwest | 絕命 middle | 生氣 top | 延年 all three | 禍害 bottom |
| 兌 west | 禍害 bottom | 延年 all three | 生氣 top | 絕命 middle |
| 乾 northwest | 六煞 top and bottom | 天醫 middle and bottom | 伏位 none | 五鬼 top and middle |
4.3 Floor plan: which room falls in which palace
The plan is a rectangle 12 metres wide and 9 metres deep, with north at the top and the front door on the west wall. Each room goes in the palace whose 45-degree slice of the compass holds it, seen from the centre of the whole plan.
Function: assign_pie
| Room | West edge (m) | East edge (m) | North edge (m) | South edge (m) | Bearing from the centre | Palace |
|---|---|---|---|---|---|---|
| Study | 0 | 4 | 0 | 3 | 306.9° | 乾 northwest |
| Bedroom 2 | 4 | 8 | 0 | 3 | 0° | 坎 north |
| Master bedroom | 8 | 12 | 0 | 4 | 58° | 艮 northeast |
| Living room | 0 | 5 | 3 | 9 | 246.8° | 坤 southwest |
| Dining room | 5 | 8 | 3 | 6 | 90° | 中 centre |
| Bathroom | 8 | 12 | 4 | 6 | 97.1° | 震 east |
| Kitchen | 5 | 8 | 6 | 9 | 170.5° | 離 south |
| Bedroom 3 | 8 | 12 | 6 | 9 | 126.9° | 巽 southeast |
4.4 Re-run it
The tables above are written by a script that calls the engine functions named in section 2. A test fails if this page and a fresh run ever differ. The script ships with the engine's source code.
python3 scripts/build_validation.py --checkcompares this page with a fresh run.python3 scripts/build_validation.py --jsonprints the numbers it computes.
5. Checked against published examples
These checks use public sources that print their own answers. They were added in October 2026 and are separate from the 2013 comparison. The sources are modern printings, not a classical edition, and the engine was not changed to make any of them pass.
| Published example | Engine agrees |
|---|---|
| Flying-star charts, period 8, all 24 facing mountains | 648/648 |
| Eight House verse, printing 1 | 56/56 |
| Eight House verse, printing 2 | 54/56 |
| Two base numbers in a published sentence | 2/2 |
5.1 Flying-star charts from a public calculator
A public feng shui calculator publishes a complete period 8 chart for each of the 24 facing mountains, with the period, mountain and facing star in all nine palaces. We compared every page with the engine's plain chart for the same facing mountain. All 648 numbers agree: 24 charts, nine palaces, three numbers each.
The limit of this check: the source is another program, not a classical text. It shows that two implementations of the same convention agree. It covers plain charts only, so it does not test the replacement-star chart for mixed facings.
| Page | Facing range | Facing mountain | Structure | Matching |
|---|---|---|---|---|
| S1 | 157.6°-172.5° | 丙 yang Fire | 雙星到坐 | 27/27 |
| S2 | 172.6°-187.5° | 午 Horse, Fire | 雙星到向 double stars at the facing | 27/27 |
| S3 | 187.6°-202.5° | 丁 yin Fire | 雙星到向 | 27/27 |
| SW1 | 202.6°-217.5° | 未 Goat, Earth | 旺山旺向 prosperous sitting and facing | 27/27 |
| SW2 | 217.6°-232.5° | 坤 | 上山下水 reversed stars | 27/27 |
| SW3 | 232.6°-247.5° | 申 Monkey, | 上山下水 | 27/27 |
| W1 | 247.6°-262.5° | 庚 | 雙星到坐 | 27/27 |
| W2 | 262.6°-277.5° | 酉 Rooster, | 雙星到向 | 27/27 |
| W3 | 277.6°-292.5° | 辛 | 雙星到向 | 27/27 |
| NW1 | 292.6°-307.5° | 戌 | 上山下水 | 27/27 |
| NW2 | 307.6°-322.5° | 乾 | 旺山旺向 | 27/27 |
| NW3 | 322.6°-337.5° | 亥 Pig, Water | 旺山旺向 | 27/27 |
| N1 | 337.6°-352.5° | 壬 | 雙星到向 | 27/27 |
| N2 | 352.6°-7.5° | 子 Rat, Water | 雙星到坐 | 27/27 |
| N3 | 7.6°-22.5° | 癸 yin Water | 雙星到坐 | 27/27 |
| NE1 | 22.6°-37.5° | 丑 Ox, Earth | 旺山旺向 | 27/27 |
| NE2 | 37.6°-52.5° | 艮 | 上山下水 | 27/27 |
| NE3 | 52.6°-67.5° | 寅 Tiger, Wood | 上山下水 | 27/27 |
| E1 | 67.6°-82.5° | 甲 | 雙星到向 | 27/27 |
| E2 | 82.6°-97.5° | 卯 Rabbit, Wood | 雙星到坐 | 27/27 |
| E3 | 97.6°-112.5° | 乙 yin Wood | 雙星到坐 | 27/27 |
| SE1 | 112.6°-127.5° | 辰 Dragon, Earth | 上山下水 | 27/27 |
| SE2 | 127.6°-142.5° | 巽 | 旺山旺向 | 27/27 |
| SE3 | 142.6°-157.5° | 巳 Snake, Fire | 旺山旺向 | 27/27 |
5.2 The Eight House verse
The direction stars are taught as a verse, the Great Wandering Year song, with one line for each life trigram. A line names the stars of the other seven trigrams, going clockwise from north and skipping its own. One source spells this out for one line, and the table reads it out. We read every line the same way.
| Direction | Letter in the verse | Star |
|---|---|---|
| 坎 north | 六 Six Killings | 六煞 |
| 艮 northeast | 天 Heavenly Doctor | 天醫 |
| 震 east | 五 Five Ghosts | 五鬼 |
| 巽 southeast | 祸 Mishap | 禍害 |
| 離 south | 绝 Severed Fate | 絕命 |
| 坤 southwest | 延 Longevity | 延年 |
| 兌 west | 生 Vitality | 生氣 |
The engine never reads this verse. It computes each row from the trigram lines, so the comparison is a real one. We compared all eight lines in two public printings, which print the verse in simplified characters.
| Head trigram | Printing 1 | Matching | Printing 2 | Matching |
|---|---|---|---|---|
| 乾 | 乾六天五祸绝延生 Six Killings, Heavenly Doctor, Five Ghosts, Mishap, Severed Fate, Longevity, Vitality | 7/7 | 乾六天五祸绝延生 Six Killings, Heavenly Doctor, Five Ghosts, Mishap, Severed Fate, Longevity, Vitality | 7/7 |
| 坎 | 坎五天生延绝祸六 Five Ghosts, Heavenly Doctor, Vitality, Longevity, Severed Fate, Mishap, Six Killings | 7/7 | 坎五天生延绝祸六 Five Ghosts, Heavenly Doctor, Vitality, Longevity, Severed Fate, Mishap, Six Killings | 7/7 |
| 艮 | 艮六绝祸生延天五 Six Killings, Severed Fate, Mishap, Vitality, Longevity, Heavenly Doctor, Five Ghosts | 7/7 | 艮六绝祸生延天五 Six Killings, Severed Fate, Mishap, Vitality, Longevity, Heavenly Doctor, Five Ghosts | 7/7 |
| 震 | 震延生祸绝五天六 Longevity, Vitality, Mishap, Severed Fate, Five Ghosts, Heavenly Doctor, Six Killings | 7/7 | 震延生祸绝五天六 Longevity, Vitality, Mishap, Severed Fate, Five Ghosts, Heavenly Doctor, Six Killings | 7/7 |
| 巽 | 巽天五六祸生绝延 Heavenly Doctor, Five Ghosts, Six Killings, Mishap, Vitality, Severed Fate, Longevity | 7/7 | 巽天五六祸生绝延 Heavenly Doctor, Five Ghosts, Six Killings, Mishap, Vitality, Severed Fate, Longevity | 7/7 |
| 離 | 离六五绝延祸生天 Six Killings, Five Ghosts, Severed Fate, Longevity, Mishap, Vitality, Heavenly Doctor | 7/7 | 离六五绝延祸天生 Six Killings, Five Ghosts, Severed Fate, Longevity, Mishap, Heavenly Doctor, Vitality | 5/7 |
| 坤 | 坤天延绝生祸五六 Heavenly Doctor, Longevity, Severed Fate, Vitality, Mishap, Five Ghosts, Six Killings | 7/7 | 坤天延绝生祸五六 Heavenly Doctor, Longevity, Severed Fate, Vitality, Mishap, Five Ghosts, Six Killings | 7/7 |
| 兌 | 兑生祸延绝六五天 Vitality, Mishap, Longevity, Severed Fate, Six Killings, Five Ghosts, Heavenly Doctor | 7/7 | 兑生祸延绝六五天 Vitality, Mishap, Longevity, Severed Fate, Six Killings, Five Ghosts, Heavenly Doctor | 7/7 |
Printing 1 agrees with the engine in all 56 places. Printing 2 differs in two places, both in one line, where it swaps the stars of two directions:
| Printing | Line | Direction | Verse says | Engine computes |
|---|---|---|---|---|
| 2 | 離 | 震 | 天醫 | 生氣 |
| 2 | 離 | 巽 | 生氣 | 天醫 |
The two printings disagree with each other. The engine's row for that line comes from the line-change rule and matches printing 1. We have not checked either page against a primary edition, so we do not say which printing is the original.
5.3 One published sentence
The Wikipedia article on Flying Star Feng Shui says: "In a Period-8 building that faces southwest, the number that locates in Facing Palace is number 5 whereas the number in Sitting Palace is number 2." The engine's period 8 base chart puts 5 in the southwest palace and 2 in the northeast palace, the palace opposite. Both numbers agree.
6. Sources
All retrieved on 11 October 2026.
- Skill On, "Feng Shui Calculator: Period 8", 24 facing pages. The first column of the table in 5.1 links to each page.
- 易奇文化 (yiqibazi.com), "八宅大游年歌诀", 29 September 2022. This is printing 1.
- 南虚子易学网 (nanxuzi.com), "他山之石:八宅风水之大游年歌", 27 March 2020. This is printing 2, and the source of the worked reading in 5.2.
- Wikipedia, "Flying Star Feng Shui", section "Rules and Procedures" and the periods table.