# Quizzman Insight – BaZi Engine
## Four Pillars of Destiny (四柱八字) on Quizzman Calendrical & Astronomical Computing

- HTML Whitepaper: https://insight.quizzman.com/tool/about-bazi-en
- Chart Calculator: https://insight.quizzman.com/bazi-chart
- Markdown (this file): https://insight.quizzman.com/tool/about-bazi-en.md
- Calendar Infrastructure: https://calendar.quizzman.com
- Engine Audit: https://insight.quizzman.com/tool/about-bazi-audit
- Quizzman Paper (QPS-ISO 1.0): https://paper.quizzman.com/papers/QP-BAZI-001/en/
- Language: English (`lang=en`)

---

## Architectural Principles & Positioning

> **Core 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**.

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).

---

## 2. Calendrical Foundation: Quizzman Calendar Engine

A critical prerequisite of BaZi computation is the underlying time calculation engine. Quizzman Calendar 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: https://calendar.quizzman.com

### 2.1. Astronomical Modeling
- **VSOP87:** 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.
- **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.

### 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.
- The **Month Pillar** changes at each governing solar term (Lichun for Tiger, Jingzhe for 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.

---

## 3. Engine Capabilities & Analysis Modules

- **Four Pillars Generation:** Complete derivation of the eight characters based on unified solar terms and continuous Julian day counts.
- **Ten Gods (十神) Matrix:** Full relational modeling across all 100 permutations between 10 Day Masters and 10 Heavenly Stems.
- **Hidden Stems (藏干) & Percentage Weights:** Detailed analysis of stems hidden inside the 12 Earthly Branches with proportional dominance weights.
- **Five Elements Scoring & Useful God (用神):** Quantitative aggregation of Metal, Wood, Water, Fire, and Earth scores from stems and hidden branches.
- **Luck Pillars (大運) Engine:** Determines forward or reverse direction according to Stem polarity and gender; onset age calculated via exact time distance to adjacent solar terms.
- **26 Verified Shen Sha (神煞):** Normalized lookup for 26 classical symbolic stars.
- **Stem & Branch Interactions:** Automated identification of Heavenly Stem Combinations, Branch Six Harmonies, Three Harmonies, Clashes, Punishments, and Harms.

---

## 4. Algorithms and Computational Pipeline

### Processing Pipeline:
```
Birth date, time, timezone
          │
          ▼
Standardization (JD / UTC+7)
          │
          ▼
Quizzman Calendar Engine (VSOP87)
          │
          ▼
Solar Terms & Stem-Branch Cycles
          │
          ▼
Four Pillars & Hidden Stems Matrix
          │
          ▼
Metaphysical Analysis (Ten Gods, Luck Pillars, 26 Shen Sha)
          │
          ▼
Structured Output (UI / REST API)
```

### REST API Endpoints:
- `POST /api/tool-module/bazi/calculate` — Full BaZi chart generation
- `GET /api/tool-module/bazi/ten-gods` — Ten Gods lookup matrix
- `GET /api/tool-module/bazi/hidden-stems/:chi` — Hidden stems and percentage weights
- `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

According to the internal test suite evaluated in February 2026:

| Component | Result | 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 |
| **Ten Gods Matrix** | 100/100 Pairings Covered | Permutations across all 10 Day Masters and 10 Heavenly Stems |
| **Hidden Stems** | 12/12 Branches Covered | Primary, secondary, and residual stems verified |
| **Shen Sha Lookups** | 26 Normalized Stars | Trigger rules tested under multiple 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.
>
> **This benchmark does not claim absolute 100% universal accuracy across every historical school 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).

---

## 6. Classical References & Methodology

BaZi Engine references five core classical treatises:
1. **Yuan Hai Zi Ping (淵海子平):** Foundational treatise establishing the Day Stem as Day Master.
2. **San Ming Tong Hui (三命通會):** Encyclopedic compendium synthesizing pre-Ming theories and Shen Sha.
3. **Di Tian Sui (滴天髓):** Advanced treatise on structural energetic dynamics and balance.
4. **Zi Ping Zhen Quan (子平真詮):** Authoritative standard on pattern structures (Ge Ju).
5. **Qiong Tong Bao Jian (窮通寶鑑):** Specialized study on Climate Adjustment (Tiao Hou) across seasons.

---

## 7. Scope of Use & Ethical Limitations

1. **Calendrical Calculation:** Solar term moments, lunisolar conversions, and cyclical counts are deterministic mathematical variables verifiable against empirical astronomy.
2. **Metaphysical Interpretation:** Qualitative deductions regarding fortune or personality 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.

---

## Explore Quizzman Insight – BaZi Engine

- **BaZi Chart Tool:** https://insight.quizzman.com/bazi-chart
- **Quizzman Calendar:** https://calendar.quizzman.com
- **Quizzman Wiki:** https://wiki.quizzman.com
- **Quizzman Insight Hub:** https://insight.quizzman.com

*Quizzman Insight – Traditional Studies on Modern Computational Engineering.*
*© 2026 Quizzman. All rights reserved.*
