← Back to archive
Casual Musings

From Genes to Genetic Algorithms and Six Lines

哲学基因

 Modern scientific history has never mentioned that the status of the concept of genes in the scientific community was like the tricks of charlatans. They would only talk about Mendel's beans until the discovery of DNA, and then start discussing more complex things. As for what lies behind it, they didn't even mention it in passing.

 In fact, when the concept of genes was first proposed, the mainstream authorities in the scientific community did not treat it with caution. Instead, they mocked and ridiculed it, considering it a new charlatan theory. At that time, it seemed completely impossible for such a thing to exist. It wasn't until the later discovery of DNA that they were slapped hard in the face.

 DNA is a molecule, but this molecule has astonishing characteristics. Tiny DNA is like a blueprint at the molecular level. This blueprint guides the development and change of organisms. DNA is merely a double helix structure composed of two nucleotide chains. This discovery greatly expanded human horizons. At the biological level, the difference between a human and an apple is, fundamentally, just a difference in DNA sequencing.

 More importantly, there are 64 combinations of genetic codes. In Chinese culture from several centuries BC (possibly even earlier), specifically in the I Ching culture, it was believed that the 64 hexagrams could simulate everything in the world. Confucius said in the "Xici Zhuan" (Commentary on the Appended Phrases): "In ancient times, when Paoxi ruled the world, he looked up to observe the images in the sky and looked down to observe the patterns on the earth. He observed the patterns of birds and beasts and the suitability of the land. He took examples from his own body and from distant objects. Thus, he created the Eight Trigrams to communicate with the virtue of the divine spirits and to categorize the feelings of all things." He praised it highly, saying: "It encompasses the transformation of heaven and earth without exceeding its limits, and it forms all things in detail without leaving anything out."

 The discovery of genes illustrates a point: even complex things like biology can develop into complex individuals through the continuous self-replication of a very small entity, and through self-control during this self-replication. Given appropriate conditions, a single hair could even be used to clone a person. This ability of self-replication does not require the intervention of deities; it can occur naturally.

 DNA is not perfect during the replication process. It is precisely this imperfection that leads to mutation, and mutation is the root cause of species diversity. Philosophically, this means that making mistakes in reality is not necessarily a bad thing. Human irrational choices are not necessarily bad either; sometimes they might pave the way for new paths.

 Some people find this kind of mutation difficult to understand, thinking it might be a mutation in a good direction or in a bad direction for organisms. So, what consequences would arise from the evolution of one good and one bad?

 All things are always in motion and change. Mutations can go in good directions or bad directions. However, it must be understood that all of this is subject to natural selection of the fittest. After continuous screening, in most cases, what remains are the superior genes. This is why evolution can occur. That is to say, during the reproduction process, organisms constantly produce mutations. These mutations are usually very small, but because the volume of replication is enormous, even a tiny mutation results in huge changes in the final individual.

 This kind of mutation sometimes brings unexpected surprises. In some scenarios, bad mutations are not important, but as long as there are good mutations, they often bring more benefits and solve tricky problems in reality.

 In reality, there is a class of problems known as intractable. Their difficulty arises because the computational load is too large. For example, if a calculation takes the entire lifespan of the universe and still cannot produce a result, it might be unsolvable in this universe.

 So, can such potentially unsolvable problems be solved? The answer is yes.

 Why? Because there is also the issue of luck. Good luck can greatly improve the efficiency of finding a solution, while bad luck means relying solely on effort, which might yield no results. Scientific computation also relies on luck. One method of solving problems is to simulate natural biological heredity, thereby placing the solution-finding process more into the realm of luck. This can significantly shorten the time needed to solve the problem.

 Let's assume a problem: There is a planet, and in a certain location, there is a precious resource. It is known that if this resource does not exist at a certain position, it will not exist at the same longitude, latitude, or at a 45-degree angle of longitude and latitude. How should we search for this precious resource?

 If we estimate that a carpet-style search would take 100 years, but we only have 50 years left and cannot use a carpet-style search, how should we find out where it is?

 The most foolish method is a carpet-style search, digging wherever you go. This is the least efficient method. Moreover, if the initial search route set means the resource can only be found in the last 50 years, then the initial search is a tragedy.

 A better method is to use random search, randomly selecting points on the planet to dig. Due to luck, this search might find the resource faster if luck is good. However, if luck is bad, the worst case is no worse than a carpet-style search. This is a search method that relies on luck.

 Can the random search method be improved to further preserve search routes with better luck and discard those with worse luck? Of course, it can.

 The method is to simulate the genetic algorithm of biology. First, randomly select multiple digging routes. Then, during the digging process, separate out the routes that have not encountered problems, screen out some constituent factors and conditions, and then use these conditions to generate more digging routes. During the generation of these digging routes, randomly produce a certain degree of deviation and variation. By continuously digging and adjusting in this manner, an effect of continuous optimization will be produced, greatly shortening the probability of finding the target.

 There are now many cases of genetic algorithms being used to solve real-world problems. Those interested can look up some materials to read.

 The process of biological evolution is essentially a process of continuous optimization. The characteristics of genetic algorithms determine that organisms will develop in directions more adapted to the environment. This shows that the development of nature has a certain goal, and the impact of the external environment on organisms is merely an attempt to adjust organisms in a certain direction.

 From a purely computational perspective, the motion of all things, the growth and decay of organisms, and the generational improvement through heredity are all parts of this vast calculation in heaven and earth. The motion of all things is actually advancing towards a certain goal. What is this goal? With such vast resources being consumed at all times, and energy constantly exchanging and transforming every second to form this world, what is it ultimately trying to calculate?

 Incidentally, in traditional divination, using the 64 hexagrams to divine the past and future actually shares many commonalities with the genetic algorithm process. However, the Six Lines (Liu Yao) hexagrams actually involve many other models, which will not be discussed in detail here. We will only discuss the manifestation of genetic algorithms in Liu Yao.

 The process of casting a Liu Yao hexagram begins by obtaining a certain hexagram, which corresponds to one of the 64 hexagrams. At the same time, this hexagram will mutate. Mutation refers to the change of the lines (Yao). This change is reflected in the details of the hexagram as a change from Yin to Yang or from Yang to Yin. This mutation forms a new hexagram, which is also one of the 64 hexagrams. This basic process of casting a hexagram is consistent with the process of DNA mutation; it is just that the details of this mutation are manifested differently in different systems. For example, in the Plum Blossom (Meihua) casting system, only one line mutates at a time, and there is always one line that mutates. In traditional Liu Yao hexagrams, there may be no mutation at all, or all six lines may mutate. As for the divination and judgment on the hexagram and the mutated hexagram, it is essentially the process of genetic algorithms continuously optimizing and iterating. However, this iteration is greatly accelerated through certain methods, such as attaching the Heavenly Stems (Na Jia) and the Six Relatives (Liu Qin).

 Precisely because of this, it is said that Liu Yao hexagrams can be used to solve problems. Since Liu Yao does not take relevant information about objective things as parameters before casting, but directly casts the hexagram first, many people think this method is unscientific. This view actually fails to understand the issue of taking random numbers here. Since random numbers are taken, there is no issue of prior or posterior probability. Considering parameters before casting and considering input parameters after casting are actually unrelated.

 Just like the digging problem above, whether it is asking people to randomly select digging points, casually designating a few digging points themselves, writing down numbers and drawing lots to decide digging points, or leading a rabbit to see where it eats grass and choosing the digging point there, it is only different in behavior, but actually there is no difference.

 Whether the ancients knew about DNA is not a problem we need to discuss. However, the coincidences between the algorithms in the system of divination created by the ancients and various genetic algorithms are astonishing. Judging solely by the process of casting and analyzing Liu Yao hexagrams, one will find that all of this embodies four words: "The Way follows Nature" (Dao Fa Zi Ran).

Written by Master Sanfu on August 3, 2013. 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.