← Back to updates
Note33 views

Stumbled on an open-source destiny chart dataset online—and the deeper I dug, the more it felt like a program written by the ancients

A while back, while browsing around online, I randomly came across an open-source Zi Wei Dou Shu birth chart dataset.

At first I didn't think much of it and just clicked in for a casual look. But the deeper I went, the more interesting it got: in the eyes of the older generation, Zi Wei Dou Shu is mysticism, the bread-and-butter skill of fortune tellers. But once you strip it down, it's essentially a chart-casting algorithm—given a birth year, month, day, and hour, you determine the palaces, place the stars, and fly the four transformations according to fixed rules. Which star lands in which palace is all deterministic computation.

Put plainly, this is a "program" written by the ancients. In an era before databases, fortune tellers ran this algorithm by hand using mnemonic verses and perpetual calendars; now an open-source community has organized the entire rule set and data, and running it through code produces a chart in seconds.

Then I got an idea: could I stuff this thing into a mini program?

Only when I actually started did I realize there's a 55GB gap between ideal and reality. The complete dataset covers a huge span of years, with a full size of nearly 55 GB—my little server simply can't handle it. Just downloading it would take half a day, let alone online queries. No choice but to cut down the range.

Cut it to what? After thinking it over, I'd just do the most common generations: 1980 to 2010, covering the post-80s, post-90s, post-00s, and post-10s—four generations in all. After several rounds of compressing, sharding, and indexing, it was finally condensed into three shards with over 270,000 charts, returning query results in milliseconds.

Using it is simple: pick a birth date, pick an hour, pick a gender, hit cast chart, and all twelve palaces are laid out for you—Life Palace, Siblings, Spouse, Children, Wealth, Health, Travel, Friends, Career, Property, Fortune, and Parents—with judgments for the three directions and four corners and the four transforming stars.

As for whether it's accurate, I won't judge. The reason I built it is simple: an algorithmic system that has been passed down for hundreds of years is itself well worth putting into a program. Just treat it as entertainment—take a look at what your own chart looks like and have some fun with it.