← Back to archive
Liu Yao & Eight Trigrams

Insights on Six Lines (Liu Yao) Algorithms and Graph Algorithms

六爻

The structure of the Six Lines (Liu Yao) may appear complex at first glance, yet careful analysis reveals an exceptionally clear architecture.

First, every line in a hexagram stands in relation to every other line; however, because of the question of whether static lines possess the authority to generate or overcome, only moving lines actually act upon the remaining lines—though this formulation is somewhat misleading.

More precisely, one should take the Useful Spirit (yong shen) as the endpoint, and then work backward from the yong shen to identify the lines that may generate or overcome it; these lines can only be moving lines. Thus, for every Six Lines reading, one may first construct a dynamic graph of generative and overcoming relations.

If one line generates the self while another overcomes it—that is, the Original Spirit (yuan shen) and the Jealous Spirit (ji shen)—one must then determine which of the two is stronger. Whether a line is prosperous and supported (wang xiang), or in states such as emptiness (kong), extinction (jue), or the tomb (mu), can all exert decisive influence. Ordinarily this is already enough to distinguish auspicious from inauspicious; yet more confusing cases arise. For example, the yuan shen may obtain the month command (yue ling), while the ji shen obtains the month establishment (yue jian). Generally the month command carries greater force, but if the ji shen further receives a return-generation (hui tou sheng), its level of power rises and the two become difficult to weigh. One may then compare the support received by the yuan shen against the generative and overcoming forces acting upon the ji shen. Here one cleverly exploits the characteristic pathways of generation and overcoming.

For instance, if the yuan shen is generated by the month, while the ji shen is generated by the day and also receives return-generation, then the line generating the yuan shen must be the month's authority, and the line generating the ji shen must be the day's authority. If the line generating the yuan shen is free of adverse states, it is usually self-evident that the yuan shen is stronger than the ji shen, and hence that the yong shen is strong. If interference prevents a clear distinction, one may further examine the force overcoming the yuan shen and the force overcoming the ji shen; as a rule this will make the matter plain.

Viewed from the standpoint of the Five Phases (wu xing), the presence of the day and month causes the forces of generation and overcoming to differ markedly.

One key point is emptiness (kong wang). Emptiness necessarily cycles in pairs among the twelve Earthly Branches—xu and hai, shen and you, wu and wei, chen and si, yin and mao, zi and chou. Because the Earthly Branches of the Six Lines distribute six branches per hexagram among the Six Relations, one is certain to encounter an emptiness. Emptiness acts differently upon different lines. For a moving line, meeting emptiness is not treated as emptiness; on the contrary, it signifies that the moving force is even greater. For a static line that meets emptiness, one must further distinguish whether the emptiness occurs in a prosperous state (wang xiang) or a resting-imprisoned state (xiu qiu), whether it is also accompanied by break (po) or clash (chong), what kind of line performs the clash, and whether the result is clash-scatter, clash-annul, or hidden motion (an dong). Each kind of emptiness has a different nature, and these differences cause dynamic changes in the generative and overcoming pathways of the Six Lines.

The probability of any given number of moving lines is uneven, especially when coins are cast. The probability of one moving line is 35.596%; two, 29.663%; three, 13.184%; four, 3.296%; five, 0.439%; six, 0.24%; and no moving lines, 17%. From zero to three moving lines thus accounts for roughly 90% of Six Lines readings. Since only moving lines possess the power to generate and overcome, in ninety percent of cases it suffices to trace only as far as the yong shen, yuan shen, and ji shen in order to determine auspiciousness or inauspiciousness.

Relations among line positions are not limited to the action of moving lines; neighboring lines also act. For example, the second line is flanked by the first or the third line, and they transmit generative and overcoming force directly. Such considerations are all well founded.

The difficulty of applying data-analysis algorithms lies in the following: if too many feature dimensions are considered, the analysis becomes problematic, because when features are numerous it is hard to discern which are important and which are not. Relying on human intuition alone to make such judgments is extremely inefficient. Ready-made statistical tools are likewise ill suited to the Six Lines task, because many features are combinatorial, and feature behavior also varies under different conditions—readily producing the curse of dimensionality. Dimensionality-reduction methods are often not very useful either, since many features may be unimportant in themselves yet still derived from basic features; such features tend to be correlated. Applying statistical methods then yields a result in which every feature appears both important and not so important. This is precisely because the key features have not been grasped. One can only lean on algorithms, repeatedly deleting existing features and recomposing combinations in search of the crucial ones, and even then typically obtains only limited accuracy—which itself conflicts with the actual predictive accuracy observed in practice.

Written by Master Sanfu on July 11, 2025. Please credit the source if you share.

Translation Notice: This English version was translated with AI assistance. Specialized, historical, religious, or culturally sensitive terms may contain nuances, inaccuracies, or debatable wording. In case of ambiguity or discrepancy, the original Chinese text shall prevail.