Skip to main content

How we validate the chart

On this page

Xingge's charts are computed by code, not by AI. How Xingge casts a chart sets out the conventions. This page is the evidence: what each convention was checked against, how many cases, and where differences remain.

What is checked, and by what

What gets checked is the chart itself: the lunar date, the Life and Body Palaces, the Five Elements Bureau, every star's position and brightness, the four transformations, the Decade, Minor, Annual and Monthly Luck, and the Life and Body Masters. All of it is computed by code, and the same birth details give the same chart on the website, in the app and on a shared link.

The checking is done by code too. Chart output is compared with outside data and with independently written rules, and anything that doesn't match is listed. AI plays no part in casting or checking the chart. Its only job is to put readings into words, and it never moves a star.

The calendar: checked against the Hong Kong Observatory

The first step in casting a chart is turning a birth date into a lunar date. The year's stem and branch, the month, the day and any leap month all come from this step, so if it is wrong, everything after it is wrong.

  • Reference: the Hong Kong Observatory's Gregorian–lunar calendar conversion table, 1901 to 2100.
  • Scope: 72,999 days, each compared for lunar year, month, day and leap month.
  • Result: one known difference, from 28 September to 27 October 2057 (30 days). The new moon that month falls around midnight Beijing time. The Observatory puts the first day on 28 September; the calendar Xingge uses, like the Purple Mountain Observatory almanac, puts it on 29 September. It is a future date and affects no one's birth chart today.
  • Solar terms: the solar terms used for Ba Zi and the almanac were checked against 4,800 Observatory dates. One is a day apart: Da Han on 21 January 1979. Zi Wei Dou Shu charts don't use solar terms, so they are unaffected.

The calendar check is part of the automated tests, and every test run rechecks all 72,999 days.

Star placement: checked against an independent rule table

Comparing with one other chart site only tells you the two agree; they could share the same mistake. So Xingge wrote a separate rule table that uses no chart library at all. It turns the Quan Shu's placement verses into code, line by line, and every chart is compared with it.

  • Scope: 23,017 charts, covering every combination star placement depends on: 60 year stem-branch pairs × 12 months × 12 double-hours × two genders (17,280 charts), 10 year stems × 12 months × every day of the month (3,600 charts), and every day of every leap month from 1901 to 2100 (2,137 charts).
  • Fields compared: the Life and Body Palaces, the stem of each palace, the Five Elements Bureau, the fourteen main stars, the six auspicious and six challenging stars, Lu Cun and Tian Ma, the four transformations, the Life and Body Masters, Decade and Minor Luck, the Twelve Life Stages and the other three cycles of twelve spirits, and 38 miscellaneous stars.
  • Result: every field matches.

Every test run checks a sample of about 400 charts and 1,000 luck dates. The full 23,017 are checked by a separate comparison script, and the numbers above are from its latest run.

A second chart program: checked against fortel-ziweidoushu

The same 23,017 charts were also compared with fortel-ziweidoushu 1.3.4, an independent Zi Wei Dou Shu program that follows the Zhongzhou school. Its conventions differ from Xingge's in places, which makes it a good test of whether every difference comes from a convention.

  • Identical: the year's stem and branch, the Five Elements Bureau, the Body Master, the twelve palaces and the Body Palace, the fourteen main stars, the fourteen auspicious and challenging stars, and the start and end of each Decade Luck.
  • Different by convention, as expected: the Life Master on 19,512 charts, because Xingge takes it from the Life Palace branch (the Quan Shu) and the Zhongzhou school from the birth-year branch. Hua Ke in Wu and Geng years in 4,585 places: Xingge follows the Quan Shu with You Bi and Tai Yin, while that program uses Tai Yang and Tian Fu.
  • Any other difference: none.

The two programs treat the late Zi hour differently (Xingge counts it as the next day, that program as the same day), so the comparison feeds it the next day's early Zi hour to compare like with like.

The Quan Shu itself: brightness and the four transformations

  • Brightness: all 232 squares of the brightness table in volume two (the fourteen main stars plus Wen Chang, Wen Qu, Huo Xing and Ling Xing in each of 12 branches, and Qing Yang and Tuo Luo in each of 8) match the original text.
  • The four transformations: all ten stems match the verse in volume two.

Both tables are automated tests. If a code change breaks a single square, the tests fail.

Golden charts: the same before and after a change

Sixty fixed charts, including leap months, early and late Zi hours and days around the new year, have their full output saved as a snapshot. Whenever the chart library is upgraded or the code changes, any change to a star, a brightness or a luck period shows up in the comparison.

The snapshot is only updated once a change is confirmed to be correct, and the chart engine's version number goes up with it. The current version is 0.5.2.

Birth-time correction

  • Daylight saving and clock changes: daylight saving data for 60 IANA time zones from 1920 to 2035, generated from the IANA time zone database.
  • Birthplaces: 86 options in the list. Every named city carries its longitude, for true solar time.
  • Hour boundaries: if a birth time falls within fifteen minutes of the line between two double-hours, Xingge points out that the other one is possible.

These conversions are covered by automated tests as well.

Test totals

The chart core currently has 65 test files, 443 tests and 1,254 checks. The Observatory comparison, the rule-table sample, the Quan Shu tables and the golden charts are all part of them.

Known differences and limits

  • 28 September to 27 October 2057: the lunar date is a day apart from the Hong Kong Observatory's; see the calendar section above.
  • Da Han, 21 January 1979: the solar term is a day apart. This affects Ba Zi and the almanac only, not Zi Wei Dou Shu charts.
  • Choices of convention: the Life Master, Hua Ke in Wu and Geng years, the late Zi hour and where the first Decade Luck starts all vary between schools. Xingge's choices and the reasons for them are on How Xingge casts a chart. A different chart elsewhere doesn't mean anyone miscalculated.
  • The birthplace list is limited: for anywhere not on it, choose "other". The chart then uses the local time you enter, without daylight saving correction.
  • The birth time itself: the code can only work from the time you enter. If that time is wrong, the chart will be too.

How this is maintained

  • Any change to the chart code has to pass the full test suite before it ships.
  • Any change to the golden charts is confirmed correct first, then the snapshot is updated and the engine version goes up.
  • The full Observatory comparison, the 23,017-chart rule-table check and the fortel comparison are rerun whenever the chart code changes or the chart library is upgraded, and this page is updated with the results.

Last verified

Last verified: 2026-10-24, chart engine 0.5.2

Common questions

Is my Xingge chart cast by AI?

No. The chart is computed by code following the Quan Shu, and every star's position has been checked against an independently written rule table and the Quan Shu's own text. AI only puts the readings into words, and it never moves a star.

How accurate is Xingge's chart?

Under the conventions Xingge uses, 23,017 charts covering every placement combination match an independent rule table written from the placement verses in every field, and the lunar calendar matches the Hong Kong Observatory from 1901 to 2100 apart from one known stretch in 2057. When another site's chart differs, it is usually a different convention, not a miscalculation.

Why is my Life Master different on another site?

Xingge follows the Quan Shu and takes the Life Master from the Life Palace branch; the Zhongzhou school takes it from the birth-year branch. Against a Zhongzhou program, the Life Master differed on 19,512 of 23,017 charts, and every one came from this convention.

How often are these numbers updated?

Whenever the chart code changes or the chart library is upgraded. The date of the last check and the engine version are at the end of this page.

How Xingge casts a chart ›

This is the general reading. On your own chart it shifts with the stars' brightness, the San Fang Si Zheng and the year you are in.

Draw my free chartCompare with my chart