Show HN: Data Modeling Ancient Chinese Logic (Bazi/Ziwei Doushu) with AI

2 hours ago 2

Hi HN! This is my second submission today about *FateGuide*. My project, *suanmingzhun.com*, is an attempt to use *TypeScript* and *AI* not just to calculate, but to model the interpretation logic of complex Chinese Metaphysics systems.

The core engineering challenge here is converting *qualitative wisdom into quantitative data*—a problem I think many engineers dealing with unstructured data can relate to.

1. *Modeling Interpretation Logic:* How do we turn the qualitative rules of *Bazi* (Five Elements interaction) and *Ziwei Doushu* (star combinations across 12 Palaces) into clean, deterministic TSX code? We built a modular system where each traditional rule is represented as a data object, allowing the *AI algorithm* to traverse complex logic trees consistently.

2. *Consistency vs. Nuance:* The system ensures that if one user and another user input the exact same birth data, the "interpretation" logic generated for *Career, Wealth, or Marriage* is identical. This removes human bias while still preserving the multi-dimensional analysis required by these systems.

3. *Why TSX?* TypeScript’s strict typing was crucial for managing the hundreds of interconnected rules (stars, palaces, flying stars, etc.) in *Ziwei Doushu* without runtime errors.

We are actively working on open-sourcing the non-proprietary parts of our Bazi/Ziwei data structure for the community.

(Find the technical deep-dive on our GitHub project here: [suanmingzhun.com].


Comments URL: https://news.ycombinator.com/item?id=45883706

Points: 1

# Comments: 0

Read Entire Article