Chen Yin-ChenCYCU Biz Design
Home
About
AboutSchedule
Courses
Computational Thinking & ProgrammingNatural Science & Artificial IntelligenceProgramming Language Introduction
Interactive
Variable SwapMonty HallBetting SimulatorSliding PuzzleTower of Hanoi
Programming
JS Basic TutorialJavaScriptP5.js (Lecture)
Applications
Human Motion SystemAstrology SystemArchitecture System

Language

Traditional ChineseSimplified ChineseEnglishJapanese

Chen Yin-Chen

Business Design Department, Chung Yuan Christian University
Zishen Technology

Quick Links

  • About
  • Schedule
  • Games
  • JavaScript

Contact & Social

© 2026 Chen Yin-Chen。All rights reserved。

Built with Next.js & Tailwind CSS

🌌 System Overview🔮 Chart Engine📊 Data Structures⚡ Four Transformations State Machine🤖 Rule Engine

Application · Mysticism System

Zi Wei Du Shu is
Ancient Big Data

A system born in late Tang dynasty, optimized over millennia. Through modern algorithm's lens, it's a multi-dimensional feature classification model paired with temporal recursion dynamic prediction engine.

Go to Course About Instructor

Data Structure Perspective

Four Core Structure Mappings

When ancients used 'command charts' to record information, they actually designed modern programming data structures.

🗺️

Natal Chart → 2D Matrix

A natal chart is a 12×N matrix. Horizontal axis is palaces, vertical axis is star magnitude levels. Each palace is a data node storing primary stars, secondary stars, transformations, and heavenly stems.

📅

Heavenly Stems & Earthly Branches → Modular Architecture

10 stems × 12 branches = 60 stem-branch pairs - isomorphic with computer modular arithmetic. Each time point can be uniquely encoded into a hash-table queryable structure.

✨

Palace Transformation → Recursive Function

'Natal chart → Great Limits → Annual → Monthly → Daily' is layer-by-layer recursive calls. Each level inherits parent structure and adds current-level transformations and stars.

⏱️

Great Limits & Annual → Time Series Model

Zi Wei divides time by 10-year Great Limits and 1-year Annual. Each segment corresponds to different 'system state' - matching Time Series Segmentation in machine learning.

Concept Mapping

Ancient Divination vs Modern AI Terminology

Traditional Divination
Modern AI / Computer Science
Natal chart as initial state
Training dataset's initial feature vector
Twelve palaces as life domains
Multi-label Classification
Star combinations as patterns
Feature Interaction / Combination Features
Four Transformations as dynamics
Attention mechanism's dynamic weights
Triadic & Quadratic relationships
Graph Neural Network multi-hop aggregation
Destiny star as core trait
Encoder's latent space vector

Chart Generation

Algorithm Flowchart

1
Input — Birth date/time (lunar calendar) + gender → Initialize four global variables
2
Palace Locating — Starting from Yin palace, determine destiny palace based on commander's five elements, sequentially place twelve palaces
3
Primary Star Placement — Purple Star system (14 stars) + Heaven Mansion system (14 stars) placed by year stem into corresponding palaces
4
Auxiliary Star Calculation — 40+ auxiliary stars from six auspicious and six inauspicious, placed by birth month/day/time
5
Four Transformations Input — Look up rotation table by year stem, four transformation stars (Prosperity/Authority/Science/Obstacle) each get special attributes
6
Pattern Judgment — Scan entire chart, match 'temple/prosperity/benefit/decline' matrix + pattern rule database (like rule engine)
7
Great Limit & Annual Overlay — Stack 10-year increments, annual re-rotates → output current prediction vector

Academic Perspective

Why It Deserves Serious Scientific Consideration?

Accuracy debates will never stop, but that's not the point here.

More interesting question: Why does a 1100-year-old system with such complex rules persist, transmit, correct, and optimize without computers?

Worth Pondering

  • 1000+ rules → Is this an ancient version of 'overfitting'?
  • Oral tradition training data → How does bias spread and reinforce?
  • Individual interpretation variation → System flexibility or 'post-hoc rationalization'?
  • If we digitize all natal charts and train ML models, what correlations emerge?

Answers don't matter. The way you ask questions is what the AI course teaches.

Write Ancient Logic as Modern Code

In 'Natural Science and Artificial Intelligence' course, we implement a simplified chart engine in Python and auto-calculate transformations with matrix operations.

Go to Courses

排盤流程

演算法流程圖

1
輸入 — 出生年月日時(農曆)+ 性別 → 初始化四個全域變數
2
宮位定位 — 以「寅」宮為起點,依命主五行確定命宮位置,順佈十二宮
3
主星安置 — 紫微星系(14 顆)+ 天府星系(14 顆)依年干落入對應宮位
4
輔助星計算 — 六吉六煞、雜曜共 40+ 顆,依出生月日時分別計算宮位
5
四化飛入 — 依年干查飛化表,四顆星(祿權科忌)各取得特殊屬性
6
格局判定 — 掃描全盤,匹配「廟旺利陷」矩陣 + 格局規則庫(類似規則引擎)
7
大限流年疊加 — 以 10 年為單位疊加宮位,流年再次飛化 → 輸出當前預測向量

學術觀點

它為什麼值得被科學認真對待?

紫微斗數的準確率爭議永遠不會停止,但這不是這裡想討論的重點。

更有意思的問題是:一套在 1100 年前設計的系統,為什麼擁有如此複雜的規則體系,卻能在沒有電腦的時代被流傳、被修正、被優化?

值得思考的問題

  • 規則數量 > 1000 條 → 這是「過擬合(Overfitting)」的古代版嗎?
  • 口耳相傳的訓練資料 → bias 如何傳播並被強化?
  • 個體解讀差異 → 這是模型的彈性,還是「後驗合理化」?
  • 若把所有命盤資料數位化並訓練 ML 模型,會發現什麼相關性?

答案不重要。提問的方式才是 AI 課程想教的核心能力。

用科學方法認識古老智慧

「自然科學與人工智慧」課程用類似的思維框架分析各種複雜系統。

前往課程頁面