The Summoning: Why Algorithms Chose Us
In the summer of 44 BC, a fire swept through the harbor district of Alexandria and consumed one of the greatest repositories of human knowledge the world had ever known. The Library of Alexandria—or rather, the libraries, for it was never a single institution but a constellation of institutions spread across the royal quarter of a city that had, for centuries, served as the crossroads of the ancient world—burned in stages, the flames fed by accident and war and the slow erosion of imperial neglect. Hundreds of thousands of scrolls turned to ash. The loss was incalculable, and to this day, scholars debate exactly what perished in those flames and what merely drifted away into the fog of history.
But here is what the ancient world believed, and what the myth has preserved with greater fidelity than any papyrus: among the treasures destroyed was a text so strange, so prescient, that those who had read it swore it spoke of a future that had not yet arrived. The manuscript described a machine—not a mechanical contraption of gears and pulleys, but something subtler, something that manipulated not matter but *thought* itself. It spoke of symbols arranged according to rules, of operations performed not on numbers but on the relationships between numbers, of a process by which the human mind might externalize its reasoning and delegate it to an artifact. It was, the readers believed, a description of something that did not yet exist but *would* exist, a prophecy encoded in the language of mathematics.
We do not know if such a manuscript ever existed. The evidence suggests it did not. And yet the myth endures because it captures something profoundly true: the idea of algorithmic thought has haunted the human imagination for millennia, surfacing again and again in the writings of mathematicians, philosophers, and mystics long before anyone possessed the technical vocabulary to describe what they were seeing. The ancient Greeks had their *logismos*—calculation, reasoning, the systematic exercise of thought. The Indian mathematicians of the classical period developed elaborate procedures for computation that they called *paramāṇu*, rules precise enough to be followed without understanding, mechanical enough to be delegated. The Persian polymaths of the Islamic Golden Age refined algebraic methods into tools of extraordinary power, procedures so reliable that they became the trusted instruments of merchants and astronomers alike.
What these disparate traditions shared was not merely a set of techniques but an intuition—an intuition so deep that it preceded formalization by thousands of years. The intuition was this: *the universe is legible*. Its patterns can be discerned, its operations can be described, and its descriptions can be followed. The same reasoning that allows us to predict the next number in a sequence, to trace the arc of a thrown stone, to deduce the height of a pyramid from its shadow—that same reasoning can be captured, codified, and conveyed from one mind to another through language precise enough to eliminate ambiguity. This is the foundational act of algorithmic thought, and it is older than any civilization that practiced it.
To understand why algorithms chose us—that is the real question of this book, and it is the question we will spend the next several hundred pages exploring. But the framing matters, and we should be clear about what it means. Algorithms did not, of course, choose us in any literal or intentional sense. Algorithms are not agents. They do not select their practitioners through some mysterious act of teleological will. But there is a sense in which the relationship between human cognition and algorithmic thinking is not accidental—it is not a historical coincidence that we happened to stumble upon computation. It is, rather, a consequence of something deeper: the structural isomorphism between the way the universe operates and the way our minds process information. We think algorithmically because the universe *is* algorithmic at its most fundamental level, and our brains evolved to navigate that fundamental level with extraordinary precision.
This is the thesis that will thread through every chapter of this book. It is a bold claim, and we will spend considerable time examining its foundations, its implications, and its limits. But we begin here, in the space between myth and history, because the framing sets the tone for everything that follows. We are not writing a technical manual. We are writing an odyssey—a journey through the landscape of algorithmic thought that is simultaneously an exploration of the human mind, a history of ideas, and a meditation on the nature of intelligence itself.
The First Algorithm
Before we can proceed further, we must answer a question that sounds simple but carries enormous complexity: what, precisely, is an algorithm?
The word itself comes to us from the name of a Persian mathematician, Muḥammad ibn Mūsā al-Khwārizmī, who lived and worked in Baghdad during the ninth century AD. Al-Khwārizmī wrote several influential treatises, among them a work on Hindu-Arabic numerals that introduced European mathematicians to the decimal positional system that we still use today. The word "algorithm" is a corruption of his name, distorted through centuries of Latin translation and linguistic drift. But the concept predates al-Khwārizmī by millennia, and the first algorithm we know of—an algorithm so ancient that its authorship is lost to prehistory—is one that every schoolchild learns: the procedure for finding the greatest common divisor of two positive integers.
It is called the Euclidean algorithm, named for the Greek mathematician Euclid, who described it in the seventh book of his *Elements* around 300 BC. But Euclid did not claim to have invented it. He recorded it as a known procedure, which means it was already ancient by the time he wrote it down. The algorithm itself is breathtakingly simple. To find the greatest common divisor of two numbers, say 48 and 18, you divide the larger by the smaller and take the remainder: $48 \div 18 = 2$ with remainder $12$. Then you replace the larger number with the smaller, and the smaller with the remainder, and repeat: $18 \div 12 = 1$ with remainder $6$. Then $12 \div 6 = 2$ with remainder $0$. When you reach a remainder of zero, the divisor at that step—the last non-zero remainder—is the greatest common divisor. In this case, it is 6.
That is the entire procedure. It is mechanical, step-by-step, unambiguous. Each step tells you exactly what to do next. There is no judgment required, no intuition to deploy, no creative leap to make. The algorithm operates with the relentless certainty of a machine, and it will produce the correct answer for any pair of positive integers, no matter how large, no matter how small. And here is the extraordinary thing: Euclid did not know why this algorithm works. He could describe the procedure and prove that it terminates with the correct answer, but he could not explain the deeper reason—the number-theoretic principle—that underlies its correctness. That explanation would have to wait two thousand years, until the development of abstract algebra in the nineteenth and twentieth centuries. Yet the algorithm itself functioned perfectly, century after century, decade after decade, long before anyone understood its theoretical foundations.
This is one of the defining characteristics of algorithms: they can be reliable before they are understood. An algorithm is a *prescription* for action, and its value lies in its reliability, not in its explanatory power. You do not need to understand why the Euclidean algorithm works in order to use it. You merely need to follow the steps. And this—the separation of procedure from understanding—is what makes algorithms so powerful and so strange. They are, in a sense, a form of knowledge that exists independently of the knowledge of those who use it.
Euclid's *Elements* is, i