ziwei-doushu: 675,000 Chart Dataset and Open-Source Zi Wei Dou Shu Engine

Renhuai123/ziwei-doushu

·2026.10.23 21:30

An open-source engine implementing the Zi Wei Dou Shu (紫微斗数) divination system in TypeScript. Given a birth date and time along with gender, it calculates the chart structure, including the 12 palaces and the Four Transformations (四化). It supports true solar time correction accounting for China Standard Time and regional longitude differences, handling of Chinese daylight saving time from 1986 to 1991, and lunar-solar calendar conversion.

1 / 3

Beyond a simple calculation tool, it provides a large-scale interpretation dataset. Version v4.0 generated interpretation sentences across 13 dimensions for 674,976 charts based on actual dates from 1950 to 2026. It consists of over 8.77 million interpretation paragraphs and occupies 56.6GB of storage when decompressed. The data is stored in JSON Lines format for easy parsing.

The interpretation criteria are based on Ni Hai Xia's (倪海厦) lectures on 'Heavenly Records' (天纪) and the original text of 'Complete Book of Zi Wei Dou Shu' (紫微斗数全书). Citations with unclear sources have been removed, and conditional interpretations have been refined to be output only when the relevant conditions are met. Generated by a deterministic algorithm rather than AI, it always returns the same result for the same input.

It serves as a useful resource for divination researchers and AI developers. The dataset of 518,000 samples can be used as input-output pairs for LLM fine-tuning, as a RAG retrieval source, or as an A/B testing baseline. The code is released under the MIT license, and the data under the CC BY 4.0 license, allowing for commercial use.

GitHub
GitHub repository

Renhuai123/ziwei-doushu

紫微斗数开源排盘引擎 — 基于倪海厦《天纪》体系,含完整排盘算法、四化系统、格局知识库、古籍原文数据

TypeScript

This introduction was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report errors, attribution issues, or removal requests via Contact.