TL;DR

  • Confucians learnt by accumulating proven methods; Daoists learnt by eliminating failed ones through trial and error, a kind of gradient descent that needs no understanding.
  • Learning therefore does not require a brain. The artificial intelligences in the Guanzi and the Han Feizi are systems that learn through filtering and reward, with the intelligence in the selection mechanism rather than in any agent.
  • The essay proposes porting the Han Feizi’s reward loop to AI: a program that learns new skills by winning disk space, as the state of Qin learnt by winning land.

Key Takeaways

  • Learning, in the Chinese classical tradition, is a property of the selection mechanism rather than of any understanding held by the learner. A system can improve steadily while none of its components ever grasps why one configuration outperforms another: the intelligence lives in the filter, not the agent.
  • Decoupling the “decider” from the solvers is what lets a low-intelligence filter produce high aggregate intelligence. The ruler, or the retraining loop, never needs to understand any individual solution; it only needs to apply a consistent success/failure test and reward accordingly, which is what makes the recursive self-improvement architecture cheap to replicate electronically to build recursively self-improving systems.
AI-generated image of a mechanical spider built from circuitry, spinning a golden web on a circuit board

One of the fundamental differences between Confucian and Daoist thought lies in their differing visions of what it means to learn.

How Did Ancient Chinese Philosophy Understand Learning?

Confucian learning: acquiring proven methods

Of the two, Confucian learning is closest to the standard 20th century perspective. For a Confucian, learning means studying and applying useful information. By reading, memorising and implementing the collected wisdom of humanity, one benefits from others’ experience. The results beat what anyone could achieve working alone.

Ideally, this process brings some understanding of the reasoning behind the methods. Even without it, the results are still far better than they would otherwise be. Learning is thus a process of accretion. The more information a person acquires, the more likely he is to find a parallel for any problem that arises.

Daoist learning: eliminating what fails

Daoists take an opposing perspective. For them, nature’s constant state of flux limits how far anyone can generalise from the experiences of others. The choices the ancient sages made were right for them, but they may not be right for you.

Instead, one must assume that each situation is at least partially novel, so any possible solution could be the right one. The learner’s task is not to search for the closest historical parallel, but to eliminate suboptimal approaches.

Daoist learning can only proceed by trial and error. Thus, someone who wishes to learn should not turn to books, but rather strive to reduce the cost of failure. The cheaper each failed attempt, the more attempts one can make, and the closer each gets to the true solution. As the Zhuangzi has it:

Yan Yuan asked Zhongni, saying, ‘When I was crossing the gulf of Shang-shen, the ferryman handled the boat like a spirit. I asked him whether such management of a boat could be learned, and he replied, “It may. Good swimmers can learn it quickly; but as for divers, without having seen a boat, they can manage it at once.” He did not directly tell me what I asked - I venture to ask you what he meant.’ Zhongni replied, ‘Good swimmers acquire the ability quickly - they forget the water (and its dangers). As to those who are able to dive, and without having seen a boat are able to manage it at once, they look on the watery gulf as if it were a hill-side, and the upsetting of a boat as the going back of a carriage. Such upsettings and goings back have occurred before them multitudes of times, and have not seriously affected their minds.

Why both kinds of learning are mechanistic

Confucians learn by acquiring additional proven methods, Daoists by eliminating disproven methods. Both approaches, however, are significantly more mechanistic than the standard contemporary perception of learning.

The Confucian model hopes for some understanding, but does not need it. Take a Chinese room: someone receives instructions for turning inputs into outputs. He applies them with equal success whether or not he understands the reasoning, and that is a perfectly valid form of learning.

Similarly, under the Daoist vision, learning becomes a simple gradient descent function. One makes repeated attempts to solve a problem and heads in the direction of whichever appear least wrong. It is not necessary to understand why a given solution works, merely that it does.

Does an Entity Need Intelligence to Learn?

This has various implications. The important one here is that an entity does not need to be human, or even organic, to learn.

A dog learns to sit when ordered to without ever having any idea of the reasons underlying the procedure. A river learns the best route to the sea by trying every path available. A market learns the correct price for a good as its assorted traders haggle. None of them understands why its answer works; each simply keeps what succeeds.

In each case, the learning belongs to the whole process rather than to any part that could explain it. That opens the way to systems that learn as systems.

How Does the Guanzi Describe a System That Learns?

A brain is useful for learning, but not necessary. Once we accept that, a world of possibilities opens up. More specifically, it becomes possible to design systems that will learn independently of their component parts.

In 2021 we published a set of agent-based models designed to replicate just such a system. Specifically, we focused on the redistribution systems described in the Guanzi. Under them, the poorer individuals in society exchange loyalty and service for resource security. In such a context, whoever can build the best redistribution networks becomes the most politically powerful:

As the harvest is bad or good, grain will be expensive or cheap. As government demands are relaxed or pressing, commodities become less or more valued. Thus it follows that if the prince is not able to control the situation, it will lead to large-scale traders roaming the markets and taking advantage of the people’s lack of things to increase their capital a hundredfold. Even though the land may have been divided equally, the strong will be able to gain control of it.

The models themselves are relatively simple. Each agent identifies and follows whichever of his peers has the highest (wealth*generosity) score, and the highest-scoring agent emerges as the overall leader.

Over time, this system produces a relatively flat and stable imperial-style hierarchy, as one would expect. But it also does something less expected: it learns which configurations are most stable.

It does not always get it right. A previously stable configuration collapses from time to time, usually after a random shock that the simulation itself inflicts. In general, though, the system rebuilds itself faster after each collapse, and the new stable order lasts for more turns.

How Does the Guanzi Model Learn From Failure?

The model incorporates no artificial intelligence as the term is currently understood. Indeed, it barely counts as machine learning, yet it achieves consistent self-improvement. It does this via a Daoist approach to learning.

Each “regime change” discards an unstable configuration. The worst of the tested configurations tend to collapse quickly, early in the simulation. They need significant reorganisation to re-stabilise, and the stability they reach is often only partial and temporary.

How Does the System Become More Stable Over Time?

The configurations that replace them are still suboptimal, but less ineffective than those before them. They take longer to collapse and need less radical reorganisation to restabilise.

Thus the system as a whole moves towards ever greater stability. Neither the system nor any of its agents ever understands what stability is, or why it should want such a thing[1].

However, this learning covers a single task and context: the system can stabilise itself within the sandbox it was built to run in. That is unsurprising given where the original text was most likely written. The early Han dynasty court’s major goal was internal stability, at a time with no existential external threats.

What Is the Difference Between the Guanzi and Han Feizi Models?

There are, however, other earlier texts that describe socio-political systems capable of self-optimising in response to external stimuli. The Guanzi model effectively creates a computer made of people, which produces a specialised form of system-level artificial intelligence. The Han Feizi, by contrast, describes a human-based system capable of producing general artificial intelligence.

The difference lies in what each system learns from. Guanzi artificial intelligence learns within a defined environment: its only task is to keep itself stable inside the sandbox it runs in, so its intelligence is specialised.

The Han Feizi system responds to problems that arrive from outside, and it rewards whoever solves them, whatever they are. Because the problems can change while the reward stays the same, Han Feizi artificial intelligence is potentially general. These are the two artificial intelligences in the Guanzi and the Han Feizi: one specialised, one potentially general.

How Does the Han Feizi Describe a System for General Problem-Solving?

The Han Feizi’s system has two key functions.

How Does the System Reward Successful Problem-Solving?

Firstly, a mechanic by which problem-solving results in the acquisition of additional resources. Whoever can innovate most effectively acquires resources and followers, and thereby gains control over a growing territory.

In the age of remote antiquity, human beings were few while birds and beasts were many. Mankind being unable to overcome birds, beasts, insects, and serpents, there appeared a sage who made nests by putting pieces of wood together to shelter people from harm. Thereat the people were so delighted that they made him ruler of All-under-Heaven and called him the Nest-Dweller. In those days the people lived on the fruits of trees and seeds of grass as well as mussels and clams, which smelt rank and fetid and hurt the digestive organs. As many of them were affected with diseases, there appeared a sage who twisted a drill to make fire which changed the fetid and musty smell. Thereat the people were so delighted that they made him ruler of All-under-Heaven. In the age of middle antiquity, there was a great deluge in All-under-Heaven, wherefore Kung and Yü opened channels for the water. In the age of recent antiquity, Chieh and Chow were violent and turbulent, wherefore T`ang and Wu overthrew them. Now, if somebody fastened the trees or turned a drill in the age of the Hsia-hou Clan, he would certainly be ridiculed by Kung and Yü. Again, if somebody opened channels for water in the age of the Yin and Chou Dynasties, he would certainly be ridiculed by T’ang and Wu.

In such a context, space occupied is both a reward for learning ability and a measure of it. A larger country is a smarter country.

Moreover, the reward/measure function of land is universal. Whatever problem the system is solving at any given time, the reward is always more land. The reward is ungamable (land is impossible to fake) and never fails.

How Does the Central Decider Filter Solutions?

Secondly, the text describes a two-stage solution-filtering system. It does not rely on the intelligence of any particular individual. The central decider offers a reward for problem-solving, and employs the best solution from among those offered to him. He does not need to know how a solution works, only whether it solved the problem it was meant to solve.

Much of the time the central decider will not be particularly intelligent, and most of the solutions people bring him will be bad. That does not matter. His sole function is to apply one simple, predetermined filter (“Did this solution succeed or fail?”) and to allocate rewards on that basis. The system continues to function.

Who utters a word creates himself a name; who has an affair creates himself a form. Compare forms and names and see if they are identical. Then the ruler will find nothing to worry about as everything is reduced to its reality (…) It is the Tao of the intelligent ruler that he makes the wise men exhaust their mental energy and makes his decisions thereby without being himself at his wits’ end; that he makes the worthy men exert their talents and appoints them to office accordingly without being himself at the end of his ability; and that in case of merits the ruler gains the renown and in case of demerit the ministers face the blame so that the ruler is never at the end of his reputation. Therefore, the ruler, even though not worthy, becomes the master of the worthies; and, even though not wise, becomes the corrector of the wise men.

The result is a learning loop. A central decider offers a reward for innovative solutions to contextual problems and applies the best one. He gains land as a result, and uses that land to reward the successful problem-solver. That encourages others to submit solutions to future problems.

Helpfully, the state of Qin used this method in the late warring states era, so we can observe how it worked in practice. By systematising reward-allocation, Qin turned itself into a machine for learning. The state sends General A to attack a town; he fails, suffers for his failure, and no one repeats his error. It then sends General B, who succeeds and receives part of the land taken as a reward. Twenty more aspiring generals show up wanting to repeat or improve on his methods. Thus, as the state grows, so does its aggregate intelligence level.

How Could the Han Feizi’s Learning System Become an AI?

Requiring minimal human input, this design transfers relatively easily to an electronic environment. We can use it to build an increasingly general artificial intelligence. The program replicates the original organic design in two parts: a reward function and a way to learn new skills.

What Is the AI’s Reward Function?

The first is the goal of occupying more space. Non-volatile memory space stands in for land here, as an ungamable metric and reward for success.

Land was both the reward for a state’s learning and the measure of it. In the same way, disk space is both what the program wants and the record of how much it has learned.

How Does the AI Learn New Skills?

The second is the capacity to write and test code, using a large language model such as GPT. The program keeps going until it hits upon a script that annexes a quantum of the extra space it wants.

The program uses each newly occupied block to store details of the script that cleared it. It then retrains the model on these proven solutions, which increases its capacity to solve future problems.

For such a program, any hard disk space outside its training database becomes a target for annexation, and so a problem to solve. Unoccupied space is relatively easy to take.

But if it contains folders, write-protected documents, other partitions etc., taking it over will require the program to learn new skills. To take that space over for its own database, the program must write and test scripts that move, delete or compress whatever is already there.

Flowchart: a new AI fills empty disk space by generating code, and the working code becomes training data, its first learned skill
Flowchart: the AI writes code to clear occupied disk space, gaining a second skill on top of the first

From this point on, its handlers change the program not by rewriting its code, but by changing its environment. New barriers that it must learn to overcome push it to evolve in the desired direction[2].

Such a program can tackle any problem, as long as the problem takes the form of a barrier to expansion. And every problem it solves improves its capacity to solve the next. It effectively replicates the Qin conquest in an electronic environment. It throws solutions at each new problem and keeps the one that earns a reward, then applies and improves that solution on future problems.

What Does This Ancient Model Suggest About Self-Improving AI?

The artificial intelligences in the Guanzi and the Han Feizi point to a different way of building self-improving AI. Learning comes from environmental feedback: the system tries solutions, and the environment decides which ones succeed. The part that judges success stays separate from the agents that produce solutions, so the judge never needs to understand them.

Successful solutions are kept and reused, so each problem solved makes the next one easier. The system improves because its designers build an environment that pushes it, not because anyone rewrites the model directly. That is the core of recursive self-improvement as the Han Feizi describes it: change the barriers, and the system learns to cross them. We later built and tested a system on this design.

FAQs

What is the Guanzi’s approach to learning?

In the Guanzi, learning happens at the level of the system, not the individual. Its redistribution model lets whoever builds the best networks of loyalty and resources gain power. In our agent-based simulations of that model, unstable configurations collapse and give way to new ones, and each new order tends to last longer. The system learns stability by discarding what fails, a Daoist, trial-and-error form of learning.

What is the Han Feizi’s approach to learning?

The Han Feizi describes learning through reward and filtering. A central decider offers a reward for solving a problem, adopts whichever solution works, and pays the successful solver with the territory gained. The decider only checks whether a solution succeeded or failed, never how it works. People drop failed methods, successful ones attract imitators, and the state’s collective ability grows as it expands.

How does the Guanzi relate to artificial intelligence?

The Guanzi describes a society that behaves like a computer made of people. Its redistribution rules produce a specialised, system-level artificial intelligence: the system as a whole learns which configurations are most stable, even though no individual agent understands stability. It is specialised because it only learns one task, keeping itself stable within a defined environment.

How does the Han Feizi relate to artificial intelligence?

The Han Feizi describes a human-based system that could produce general artificial intelligence. The ruler can pose any problem, the reward is always the same, and the filter only asks whether a solution worked. Because the reward stays constant while the problems change, the system keeps learning new skills, which is what makes it potentially general rather than specialised.

Can an AI system learn without understanding why something works?

Yes. Both classical traditions treat learning as mechanistic. A Chinese room follows instructions correctly without understanding them, and a Daoist learner moves toward whatever fails least, like gradient descent. A dog learns to sit, a river finds the sea, and a market finds a price, all without understanding why. What matters is that a solution works, not why it works.

What is system-level artificial intelligence?

System-level artificial intelligence is intelligence that belongs to a system rather than to any of its parts. The agents in the Guanzi model, or the ministers and generals in the Han Feizi, never need to understand the whole. The intelligence lives in the selection mechanism: what gets rewarded, kept and reused. A consistent filter can produce high aggregate intelligence from low-intelligence parts.

How could the Han Feizi model be implemented as an AI system?

Replace land with disk space. A program with the goal of occupying more non-volatile memory uses a large language model to write and test code until a script frees new space. The program stores each successful script in that space and retrains the model on it. Harder barriers, such as write-protected files, force it to learn new skills, so its handlers shape it by changing its environment.


[1] Moving the system back to the human world also appears to work. After testing the agent-based models, we recreated the same system in vivo, developing a blockchain-based politics simulator game designed to impose the same incentive structures upon players. In an analogue setting it is harder to prove that the system itself is learning. Still, it centralised the way the original text predicts, just as quickly as the agent-based model did. That suggests that understanding the rules one is subject to speeds up compliance. In a less well-designed system, that compliance may be malicious and take the form of reward-hacking.

[2] Prompt injection is a useful tool here. For example, if the handler wants the program to learn to write a bubble sort algorithm, he saves a file called “write a bubble sort algorithm”. Only producing a bubble sort algorithm removes it. A handler could use this approach to steer the AI towards problems whose solutions have some practical use.