# Ziwei Doushu Palace Matrices - CORRECTED (COUNTERCLOCKWISE) - 2026-02-20

**Status**: CORRECTED with COUNTERCLOCKWISE arrangement (逆時針)
**Critical Fix**: All palaces now arranged in COUNTERCLOCKWISE order (backward through branches), NOT clockwise
**Test Cases**: 5 individuals with complete palace layouts verified

---

## CRITICAL CORRECTION

The 12 palaces are arranged in **COUNTERCLOCKWISE order (逆時針)**, going BACKWARD through the branches:

```
命宮 → 兄弟宮 → 夫妻宮 → 子女宮 → 財帛宮 → 疾厄宮 → 遷移宮 → 交友宮 → 官祿宮 → 田宅宮 → 福德宮 → 父母宮
寅   ←  丑   ←  子   ←  亥   ←  戌   ←  酉   ←  申   ←  未   ←  午   ←  巳   ←  辰   ←  卯
```

---

## BENNETT (甲子年, 農曆12月3日, 亥時)

**Basic Info**:
- Life Palace (命宮): **寅** (丙寅)
- Five Element Bureau (五行局): **6 (爐中火, Fire)**
- Ziwei Palace (紫微宮): **亥**
- Tianfu Palace (天府宮): **巳**

**CORRECTED 12-Palace Arrangement (COUNTERCLOCKWISE)**:

| # | Palace Name | Branch | Stem-Branch | Position |
|---|---|---|---|---|
| 1 | 命宮 | 寅 | **丙寅** | Life |
| 2 | 兄弟宮 | 丑 | **丁丑** | (go backward) |
| 3 | 夫妻宮 | 子 | **丙子** | |
| 4 | 子女宮 | 亥 | **乙亥** | |
| 5 | 財帛宮 | 戌 | **甲戌** | |
| 6 | 疾厄宮 | 酉 | **癸酉** | |
| 7 | 遷移宮 | 申 | **壬申** | |
| 8 | 交友宮 | 未 | **辛未** | |
| 9 | 官祿宮 | 午 | **庚午** | |
| 10 | 田宅宮 | 巳 | **己巳** | |
| 11 | 福德宮 | 辰 | **戊辰** | |
| 12 | 父母宮 | 卯 | **丁卯** | Back to 寅 |

---

## BRIAN (丙子年, 農曆12月17日, 酉時)

**Basic Info**:
- Life Palace (命宮): **辰** (壬辰)
- Five Element Bureau (五行局): **2 (長流水, Water)**
- Ziwei Palace (紫微宮): **酉**
- Tianfu Palace (天府宮): **未**

**CORRECTED 12-Palace Arrangement (COUNTERCLOCKWISE)**:

| # | Palace Name | Branch | Stem-Branch | Position |
|---|---|---|---|---|
| 1 | 命宮 | 辰 | **壬辰** | Life |
| 2 | 兄弟宮 | 卯 | **辛卯** | (go backward) |
| 3 | 夫妻宮 | 寅 | **庚寅** | |
| 4 | 子女宮 | 丑 | **辛丑** | |
| 5 | 財帛宮 | 子 | **庚子** | |
| 6 | 疾厄宮 | 亥 | **己亥** | |
| 7 | 遷移宮 | 戌 | **戊戌** | |
| 8 | 交友宮 | 酉 | **丁酉** | |
| 9 | 官祿宮 | 申 | **丙申** | |
| 10 | 田宅宮 | 未 | **乙未** | |
| 11 | 福德宮 | 午 | **甲午** | |
| 12 | 父母宮 | 巳 | **癸巳** | Back to 辰 |

---

## CHRISTY (己丑年, 農曆12月2日, 午時)

**Basic Info**:
- Life Palace (命宮): **未** (辛未)
- Five Element Bureau (五行局): **5 (路旁土, Earth)**
- Ziwei Palace (紫微宮): **亥**
- Tianfu Palace (天府宮): **巳**

**CORRECTED 12-Palace Arrangement (COUNTERCLOCKWISE)**:

| # | Palace Name | Branch | Stem-Branch | Position |
|---|---|---|---|---|
| 1 | 命宮 | 未 | **辛未** | Life |
| 2 | 兄弟宮 | 午 | **庚午** | (go backward) |
| 3 | 夫妻宮 | 巳 | **己巳** | |
| 4 | 子女宮 | 辰 | **戊辰** | |
| 5 | 財帛宮 | 卯 | **丁卯** | |
| 6 | 疾厄宮 | 寅 | **丙寅** | |
| 7 | 遷移宮 | 丑 | **丁丑** | |
| 8 | 交友宮 | 子 | **丙子** | |
| 9 | 官祿宮 | 亥 | **乙亥** | |
| 10 | 田宅宮 | 戌 | **甲戌** | |
| 11 | 福德宮 | 酉 | **癸酉** | |
| 12 | 父母宮 | 申 | **壬申** | Back to 未 |

---

## CHERRY (庚午年, 農曆11月4日, 酉時)

**Basic Info**:
- Life Palace (命宮): **卯** (己卯)
- Five Element Bureau (五行局): **5 (城頭土, Earth)**
- Ziwei Palace (紫微宮): **丑**
- Tianfu Palace (天府宮): **卯**

**CORRECTED 12-Palace Arrangement (COUNTERCLOCKWISE)**:

| # | Palace Name | Branch | Stem-Branch | Position |
|---|---|---|---|---|
| 1 | 命宮 | 卯 | **己卯** | Life |
| 2 | 兄弟宮 | 寅 | **戊寅** | (go backward) |
| 3 | 夫妻宮 | 丑 | **己丑** | |
| 4 | 子女宮 | 子 | **戊子** | |
| 5 | 財帛宮 | 亥 | **丁亥** | |
| 6 | 疾厄宮 | 戌 | **丙戌** | |
| 7 | 遷移宮 | 酉 | **乙酉** | |
| 8 | 交友宮 | 申 | **甲申** | |
| 9 | 官祿宮 | 未 | **癸未** | |
| 10 | 田宅宮 | 午 | **壬午** | |
| 11 | 福德宮 | 巳 | **辛巳** | |
| 12 | 父母宮 | 辰 | **庚辰** | Back to 卯 |

---

## ELICE (壬戌年, 農曆8月14日, 戌時)

**Basic Info**:
- Life Palace (命宮): **亥** (辛亥)
- Five Element Bureau (五行局): **4 (鈎釧金, Metal)**
- Ziwei Palace (紫微宮): **未**
- Tianfu Palace (天府宮): **酉**

**CORRECTED 12-Palace Arrangement (COUNTERCLOCKWISE)**:

| # | Palace Name | Branch | Stem-Branch | Position |
|---|---|---|---|---|
| 1 | 命宮 | 亥 | **辛亥** | Life |
| 2 | 兄弟宮 | 戌 | **庚戌** | (go backward) |
| 3 | 夫妻宮 | 酉 | **己酉** | |
| 4 | 子女宮 | 申 | **戊申** | |
| 5 | 財帛宮 | 未 | **丁未** | |
| 6 | 疾厄宮 | 午 | **丙午** | |
| 7 | 遷移宮 | 巳 | **乙巳** | |
| 8 | 交友宮 | 辰 | **甲辰** | |
| 9 | 官祿宮 | 卯 | **癸卯** | |
| 10 | 田宅宮 | 寅 | **壬寅** | |
| 11 | 福德宮 | 丑 | **癸丑** | |
| 12 | 父母宮 | 子 | **壬子** | Back to 亥 |

---

## Key Changes from Previous Document

1. **DIRECTION CHANGE**: All palaces now arranged in COUNTERCLOCKWISE (逆時針) order, NOT clockwise
   - ❌ Old: 寅 → 卯 → 辰 (clockwise)
   - ✅ New: 寅 → 丑 → 子 (counterclockwise/backward)

2. **Palace Position Changes**:
   - Bennett: 兄弟宮 moved from **卯** to **丑**
   - Brian: 兄弟宮 stayed at **卯** (correct by accident, but for wrong reason)
   - Christy: 兄弟宮 moved from **申** to **午**
   - Cherry: 兄弟宮 moved from **辰** to **寅**
   - Elice: 兄弟宮 moved from **子** to **戌**

3. **Stem-Branch Pairs**: All recalculated using correct counterclockwise formula

4. **Algorithm Source**: Multiple Chinese astrology sources confirm "逆時針方向排列" (counterclockwise arrangement)

---

## Verification Status

✅ All 5 test cases recalculated with correct COUNTERCLOCKWISE algorithm
✅ All palace sequences verified against counterclockwise principle
✅ All stem-branch pairs recalculated using correct formula
✅ Ready for backend integration with corrected algorithm

**Previous Document**: ZIWEI_PALACE_MATRICES.md (INCORRECT - kept for reference)
**Current Document**: ZIWEI_PALACE_MATRICES_CORRECTED.md (VERIFIED 2026-02-20)
