Quizzman Insight – BaZi Engine

Calculate BaZi Chart

Four Pillars of Destiny (四柱八字) System Built on Quizzman Calendrical & Astronomical Computation

128/128 Internal BaZi Tests Passed 108/108 Calendar Engine Passed VSOP87 & Julian Day Ephemeris 100 Ten Gods Combinations 26 Verified Shen Sha REST API
Architectural Principle: BaZi Engine is not merely a chart generator; it is a computational metaphysical engine built directly upon Quizzman's independent calendrical and astronomical foundation. The system unifies classical Zi Ping principles with astronomical models, continuous time standardization, and modern data processing to ensure deterministic, auditable calculations.

Quizzman Insight – BaZi Engine computes and analyzes Four Pillars of Destiny (子平八字) charts within the Quizzman research ecosystem. Rather than simplistically mapping civil calendar dates to cyclical characters, BaZi Engine focuses on the rigorous astronomical mechanics governing each pillar, boundary condition rules, and fully transparent algorithmic verifiability.

The engine relies on Quizzman Calendar Engine as its underlying timekeeping infrastructure, maintaining absolute consistency between solar ephemeris calculations and BaZi structural analysis.

1. What is BaZi (Four Pillars of Destiny)?

BaZi (八字), also known as the Four Pillars of Destiny (四柱) or Zi Ping (子平), is a classical East Asian metaphysical system that models life potential through eight Heavenly Stems and Earthly Branches derived from four coordinates of birth time:

Pillar Components Astronomical Derivation & Traditional Role
Year Pillar (年柱) Stem & Branch of birth year Determined strictly by the astronomical solar term Lichun (立春 / Beginning of Spring). Signifies ancestral roots, grandparents, and early childhood background.
Month Pillar (月柱) Stem & Branch of birth month Determined by solar longitude terms (starting from Tiger month at Lichun). Signifies parents, social environment, season of birth, and governing element (Month Order / 月令).
Day Pillar (日柱) Stem & Branch of birth day The Heavenly Stem of the day is the Day Master (日主) — representing the individual self; the Earthly Branch represents the spouse palace.
Hour Pillar (時柱) Stem & Branch of birth hour Calculated via local solar time and day stem (Five Rats formula). Represents children, later life stages, and inner psychological landscape.

From these eight characters, Zi Ping constructs relational models including Yin-Yang balance, Five Elements (Wu Xing), Ten Gods, Hidden Stems (Cang Gan), and Luck Cycles (Da Yun).

Quizzman BaZi Engine automates these computations while providing an open, auditable schema for researchers to inspect structural chart dynamics.

2. Calendrical Foundation: Quizzman Calendar Engine

A critical prerequisite of BaZi computation is the underlying time calculation engine.

Quizzman Calendar is not a basic civil lunar calendar viewer; it is an independent astronomical calendrics engine engineered on celestial mechanics to determine solar terms, sexagenary cycles, and historical civil time shifts across Quizzman applications.

Quizzman Calendar Engine Infrastructure

Core calendrical engine serving BaZi, Zi Wei Dou Shu, I Ching, and Planetary Ephemeris with 108/108 automated verification tests.

Explore Calendar Engine

2.1. Astronomical Modeling

The calendar engine integrates precision celestial models:

  • VSOP87 (Variations Séculaires des Orbites Planétaires): Planetary analytical solution computing apparent solar longitude ($\lambda_\odot$) to determine exact moments of solar terms down to minute-level resolution.
  • Julian Day (JD): Continuous astronomical timescale preventing discontinuous date mapping across historical calendar shifts (e.g., the 1582 Gregorian reform).
  • 24 Solar Terms (二十四節氣): Computed by solar ecliptic longitudes in exact $15^\circ$ increments rather than approximations on civil dates.
  • Lunisolar Conversion: Conjunction (New Moon / Syzygy) computations with local geographical timezone projection.
  • Historical Timezones: Database tracking historical daylight saving and statutory standard time transitions (notably Vietnam's GMT+7, GMT+8, GMT+9 eras).

2.2. Critical Role of Solar Terms in BaZi

In authentic Zi Ping methodology, year and month boundaries do not align with civil New Year or lunar calendar month starts:

  • The Year Pillar changes precisely at Lichun (立春) ($\lambda_\odot = 315^\circ$), not at the Lunar New Year (Tết / Spring Festival).
  • The Month Pillar changes at each governing solar term (Lichun for Yin/Tiger, Jingzhe for Mao/Rabbit, etc.).
Boundary Case: A birth on February 3, 2026, preceding Lichun, belongs to the Wood Snake (Yi Si / 乙巳) year in BaZi, even though the civil Gregorian year is 2026 and the Lunar New Year of Bing Wu is imminent.

Accurate solar longitude modeling avoids systematic monthly errors common in basic online calculators that rely on civil calendar approximations.

2.3. Historical Timezones and Midnight Boundaries

Because absolute universal time manifests as different civil dates across regions, historical timezone deviations shift day and hour pillars. Quizzman Calendar facilitates chronological cross-checking for historical dates.

Furthermore, school-specific conventions regarding the midnight boundary — differentiating Early Rat Hour (23:00–24:00) from Late Rat Hour (00:00–01:00) — are clearly separated to maintain transparency when comparing divergent traditions.

3. Engine Capabilities & Analysis Modules

Four Pillars Generation

Complete derivation of the eight characters for Year, Month, Day, and Hour based on unified solar terms and continuous Julian day counts.

Ten Gods (十神) Matrix

Complete relational modeling between Day Master and all heavenly stems: Friend, Rob Wealth, Eating God, Hurting Officer, Direct Wealth, Indirect Wealth, Direct Officer, Seven Killings, Direct Resource, Indirect Resource across 100 matrix pairings.

Hidden Stems (藏干) & Percentage Weights

Detailed analysis of stems hidden inside the 12 Earthly Branches with proportional dominance weights (e.g., Tiger: Jia 60%, Bing 30%, Wu 10%) for energy distribution estimation.

Five Elements Scoring & Useful God (用神)

Aggregates Metal, Wood, Water, Fire, and Earth scores from stems and hidden branches to indicate strength/weakness and baseline balance recommendations.

Luck Pillars (大運) Engine

Determines forward or reverse direction according to Stem polarity and gender, computing entry ages based on exact time distance to adjacent solar terms.

26 Verified Shen Sha (神煞)

Normalized lookup for 26 classical stars including Tian Yi Nobleman, Academic Star (Wen Chang), Travelling Horse (Yi Ma), Peach Blossom, Elegant Seal (Hua Gai), Yang Blade (Yang Ren)...

Stem & Branch Interactions

Automated identification of Heavenly Stem Combinations, Branch Six Harmonies, Three Harmonies, Clashes, Punishments, Harms, and Destruction.

4. Algorithms and Computational Pipeline

General Processing Pipeline:

1
Input: Birth date, time, and timezone coordinate.
2
Time Standardization: Conversion to continuous Julian Day (JD) and standardized UTC+7.
3
Quizzman Calendar Core: VSOP87 calculation of apparent solar longitude ($\lambda_\odot$) for Lichun and monthly solar terms.
4
Pillar Derivation: Apply Lichun year rule, solar term month rule, Julian Day cycle for day, and Five Rats formula for hour.
5
Structural Mapping: Extract Hidden Stems, calculate elemental dominance percentages, and assign Day Master.
6
Metaphysical Analysis: Ten Gods mapping, 10-year Luck Cycle calculation, 26 Shen Sha evaluations, and interaction checks.
7
Output: Structured JSON data delivered to UI components and REST endpoints.

Component Calculation Rules:

Pillar / Component Applied Computational Method
Year Pillar Solar ecliptic longitude $\lambda_\odot = 315^\circ$ (Lichun), completely decoupled from civil Lunar New Year day.
Month Pillar 12 major solar terms (Lichun, Jingzhe, Qingming, Lixia, Mangzhong, Xiaoshu, Liqiu, Bailu, Hanlu, Lidong, Daxue, Xiaohan).
Day Pillar Continuous 60-stem-branch cycle derived from integer Julian Day Number (JDN).
Hour Pillar Combination of 12 double-hour branches and day stem modulation via Five Rats formula.
Ten Gods Five Elements generative/destructive cycles and Yin-Yang polarity relative to Day Master ($10 \times 10 = 100$ combinations).
Hidden Stems Classical primary, secondary, and residual stems with normalized percentage weightings.
Luck Pillars Direction determined by Year Stem polarity and gender; onset age calculated via 3 days = 1 year ratio relative to solar term boundary.

REST API Endpoints:

  • POST /api/tool-module/bazi/calculate — Full BaZi chart generation from birth data
  • GET /api/tool-module/bazi/ten-gods — Ten Gods lookup matrix
  • GET /api/tool-module/bazi/hidden-stems/:chi — Hidden stems and percentage weights for a branch
  • POST /api/tool-module/bazi/luck-pillars — 10-year Luck Pillar timeline derivation
  • POST /api/tool-module/bazi/shen-sha — Shen Sha / Symbolic star evaluator
  • POST /api/tool-module/bazi/compatibility — Synastry and stem/branch interaction analysis

5. Verification and Algorithmic Testing

Quizzman emphasizes algorithmic auditability over opaque assertions. As of the February 2026 automated internal test suite:

Component Internal Test Result Coverage Scope
BaZi Engine 128/128 Tests Passed Automated regression verifying Four Pillars, Lichun transitions, Ten Gods, Hidden Stems, Luck Pillars, and Shen Sha.
Calendar Engine 108/108 Tests Passed UTC+7 astronomical synchronizations, leap months, solar term longitudes, and solstice verifications.
Ten Gods Matrix 100/100 Pairings Covered Exhaustive permutation matrix across all 10 Day Masters and 10 Heavenly Stems.
Hidden Stems 12/12 Branches Covered Primary, secondary, and residual stems verified with proportional weights.
Shen Sha Lookups 26 Normalized Stars Trigger rules tested against Day Stem, Day Branch, Year Stem, and Month Branch conditions.
Technical Meaning of Test Benchmarks:
The metric "128/128 internal tests passed" confirms that the deployed engine fulfills all boundary conditions and test cases defined within our internal regression suite at the time of publication (including complex edge-cases around Lichun, solar term crossings, and midnight hour divisions).

This benchmark does not claim absolute 100% universal accuracy across every historical school, conflicting textual edition, or subjective interpretive tradition.

Quizzman is committed to continuously expanding benchmark datasets, actively pursuing cross-auditing with independent external repositories (such as planned comparisons with the Jade Almanac dataset) to publish technically rigorous comparative results.

6. Classical References & Methodology

BaZi Engine references five core classical treatises of the Zi Ping canon:

📜 渊海子平 (Yuan Hai Zi Ping)

Xu Sheng (Xu Zi Ping) · Song Dynasty

Foundational treatise establishing the Day Stem as Day Master and defining original Ten Gods structures.

📜 三命通会 (San Ming Tong Hui)

Wan Yu Wu · Ming Dynasty

Encyclopedic compendium synthesizing pre-Ming astrological theories, Shen Sha catalogs, and Na Yin tables.

📜 滴天髓 (Di Tian Sui)

Jing Tu / Comm. Liu Ji · Ming Dynasty

Advanced treatise exploring structural energetic dynamics, Wu Xing balance, and dynamic flow within chart configurations.

📜 子平真诠 (Zi Ping Zhen Quan)

Shen Xiao Zhan · Qing Dynasty

Authoritative standard on pattern structures (Ge Ju) and prioritization of Month Order Useful Gods.

📜 穷通宝鉴 (Qiong Tong Bao Jian)

Yu Chun Dai · Qing Dynasty

Specialized study on Climate Adjustment (Tiao Hou), examining seasonal heating and cooling needs across the 12 solar months.

These classical sources provide the conceptual scaffolding for system rules. Across all modules, Quizzman strictly distinguishes between mathematically auditable calendrical calculations and traditional interpretive heuristics.

7. Development Roadmap

Quizzman Insight – BaZi Engine is developed as an open, structured, and methodologically auditable research tool:

  • Quizzman Calendar serves as the shared astronomical and calendrical backbone.
  • BaZi Engine focuses on structured organization, computation, and analysis according to Zi Ping models.

Employing a shared calendrical platform guarantees coherence across BaZi, Zi Wei Dou Shu, and I Ching tools in Quizzman Lab. Our goal is not merely reducing calculation time, but clarifying computational mechanics, stated assumptions, and model boundaries for researchers.

8. Scope of Use & Limitations

The engine is designed for learners, researchers, traditional practitioners, and software engineers integrating Four Pillars data into applications.

Delineation of Boundaries & Ethical Stance:

1. Calendrical Calculation: Solar term moments, lunisolar conversions, timezone compensations, and cyclical cycles represent deterministic mathematical variables that are objectively verifiable against empirical astronomy.

2. Metaphysical Interpretation: Qualitative deductions regarding fortune, personality, or future events belong to cultural symbolic systems and are not empirically verified scientific facts.

Quizzman makes no claim of deterministic prophetic ability. The tool delivers structured data and modeling methods for scholarly inquiry and self-reflection under the principles of critical thinking and self-determination.

Ready to explore your Four Pillars chart?

Compute your BaZi chart with high astronomical precision on Quizzman Calendar UTC+7.