The Brief History of Artificial Intelligence
Chapter 2: The Middle Ages

Asia

7 min read

Illustrations

1 / 5
Yi Xing's clock

Yi Xing's astronomical clock (725): world's first mechanical escapement clock.

Clocks of Heaven: How Medieval Asia Mechanized Time and Knowledge

A clock is not merely a measuring instrument. It is a promise: that the world obeys rules, that the future can be predicted, that the apparent chaos of phenomena hides an order accessible to the human mind. In the Middle Ages, while Europe still sought to reconcile faith and reason, Asia had already built machines capable of reproducing the movement of the heavens—laying, without knowing it, the foundations of what we would one day call artificial intelligence.

Yesterday — Escapement and Gear

In 725, in the capital of the Tang dynasty, a Buddhist monk named Yi Xing completed what no one had ever achieved: a machine capable of measuring time by itself. Yi Xing was an astronomer, mathematician, calendar reformer—and inventor. With the engineer Liang Lingzan, he built a hydraulic astronomical clock whose heart beat to the rhythm of a mechanism until then unknown: the escapement.

The escapement is the secret of mechanical clocks. It transforms continuous movement—the flow of water, the fall of a weight—into a series of regular pulses. Yi Xing had designed it as a network of "hooks, pins, and interlocking rods, coupling devices and locks controlling each other." Each element depended on the others. None could move alone. The entire system had to work—or not work at all.

This clock did not merely measure hours. It announced them. A bell automatically rang each hour, a drum beat each quarter hour. The machine acted in the world—without human intervention. Five years later, in 730, students taking the imperial examinations had to write an essay on this device. A monk's invention had become a matter of state.

Three and a half centuries later, the polymath Su Song brought this tradition to its peak. His clock tower, built in Kaifeng between 1088 and 1094, rose to twelve meters in height. It housed an armillary sphere, a celestial globe, and one hundred thirty-three mechanical figurines that struck the hours and beat drums in a ballet regulated to the quarter hour. The mechanism used the oldest known chain transmission—the tian ti, "celestial ladder"—to transmit movement from one floor to another.

Su Song documented his work in a treatise containing forty-seven detailed illustrations. He knew that complexity required transmission. He was right to worry. In 1127, Jurchen armies took Kaifeng. The clock was dismantled piece by piece and transported north. But the conquerors never managed to reassemble it. The mechanism was too complex for those who did not possess the plans or the tradition.

Europe would not invent its own escapement mechanism until two centuries later. And the differential gear—the one that allowed Ma Jun's south-pointing chariot to maintain its direction without a magnetic compass—preceded its use in Western automobiles by fifteen centuries. Medieval Asia was not imitating European machines. It was anticipating them.

Today — From the Kaifeng Tower to Movable Type

If medieval Chinese clocks mechanized time, another invention would mechanize knowledge itself: movable type printing.

In 1040, a craftsman named Bi Sheng had an apparently simple idea: instead of carving an entire page onto a wooden block, why not create individual reusable characters? He made them from porcelain, hardened by firing. For each sign, he produced several copies—twenty or more for the most common characters. The signs were arranged by rhyme in wooden cases, ready to be assembled, inked, printed, then disassembled and reused.

The polymath Shen Kuo documented this invention in his Dream Pool Essays, completed in 1088—the same year as Su Song's tower. This book of thirty volumes and six hundred nine articles covered everything a curious mind could observe: astronomy, mathematics, geology, medicine, music. Shen Kuo described for the first time the magnetic compass used for navigation, and discovered that magnetic north did not coincide with geographic north. British historian Joseph Needham called this treatise "a coordinate in the history of Chinese science."

Korea pushed the innovation further still. In 1234, under the Goryeo dynasty, the first books printed with metal type appeared. In 1377, the Jikji—a collection of Buddhist teachings—was printed at Heungdeok Temple using this technique. That was seventy-eight years before Gutenberg's Bible. UNESCO inscribed it on the Memory of the World register in 2001.

Meanwhile, Chinese mathematicians were developing calculation tools of remarkable sophistication. Yang Hui presented in 1261 the arithmetic triangle that the West would attribute to Pascal—five centuries later. He had himself learned it from the works of Jia Xian, who had discovered it around 1100. Zhu Shijie, in his Jade Mirror of the Four Unknowns completed in 1303, expounded a method for solving systems of polynomial equations up to the fourteenth degree—five hundred seventy years before the Englishman Horner rediscovered a similar technique. The four unknowns bore poetic names: Heaven, Earth, Man, Matter.

Further south, in Kerala, India, the mathematician Madhava of Sangamagrama was crossing an even more audacious conceptual frontier. Around 1380, he developed the first infinite series for calculating trigonometric functions—that "passage to infinity" that historians consider the decisive step toward infinitesimal calculus. He calculated the number π to seventeen exact decimal places. Newton and Leibniz would not rediscover these results until two to three centuries later.

And in Samarkand, Sultan Ulugh Beg had an observatory built between 1424 and 1429 whose sextant measured thirty-six meters in radius. His astronomers calculated trigonometric tables to eight decimal places and a star catalog more precise than anything Europe would produce before Tycho Brahe. The measurement of the obliquity of the ecliptic they obtained was more accurate than Copernicus's, a century later.

Beyond — What Clocks Teach Algorithms

These inventions were not isolated curiosities. They circulated. The Silk Road transported much more than merchandise: it carried ideas, techniques, manuscripts. Chinese paper transformed the Islamic world in the eighth century, causing what one historian called an "explosion of literary creativity." The engineer Al-Jazari, in his Book of Knowledge of Ingenious Mechanical Devices completed in 1206, synthesized traditions from China, India, Greece, and Egypt—his elephant clock was a multicultural manifesto, with its Chinese dragons and Indian elephant.

The history of artificial intelligence, as usually told, begins with Turing and the Dartmouth conferences. It forgets the mechanical figurines of Su Song, which indicated the time without human intervention. It forgets the south-pointing chariot, which maintained its direction through mechanical calculation of the difference in wheel rotation—a differential gear fifteen centuries before the automobile. It forgets Madhava's infinite series, which made it possible to calculate functions through successive approximations—exactly like our machine learning algorithms.

These omissions are not merely historical injustices. They are conceptual impoverishments. For medieval Asia had understood something essential: intelligence begins with precision. The clocks of Yi Xing and Su Song did not merely measure time—they proved that the world was measurable. Ulugh Beg's trigonometric tables did not merely predict eclipses—they demonstrated that prediction was possible. Bi Sheng's movable type did not merely print books—it established that knowledge could be decomposed into elementary units, recombined infinitely.

Decompose, measure, recombine: these are the fundamental operations of any algorithm. Medieval Asia had invented them—in bronze, porcelain, and wooden gears.

When the Jurchen dismantled the Kaifeng tower, they thought they were taking a clock. They were taking the beginnings of a revolution—which they never knew how to reassemble.