Darwin's Theory of Evolution
The algorithm that writes itself
I. The Man Before the Theory
Charles Robert Darwin was born on 12 February 1809 in Shrewsbury, England, the fifth of six children in a wealthy and intellectually distinguished family. His grandfather Erasmus Darwin had speculated about the transmutation of species years before Charles was born. His father Robert was a prosperous physician. The family's comfort gave Charles the rare luxury of time—time to observe, time to doubt, and eventually time to think through the most consequential idea in the history of biology.
As a young man, Darwin was unremarkable by the standards of formal education. He abandoned medical studies at Edinburgh, revolted by surgery performed without anesthesia. He moved to Cambridge to read divinity, but spent more time collecting beetles and attending the lectures of the botanist John Stevens Henslow than preparing for the clergy. It was Henslow who, in 1831, recommended his former pupil for a position aboard HMS Beagle as a gentleman naturalist and companion to Captain Robert FitzRoy. Darwin was twenty-two years old.
The Voyage of the Beagle
The Beagle's voyage lasted nearly five years, from December 1831 to October 1836, circumnavigating the globe with extended stops along the coast of South America, the Galápagos Islands, Tahiti, New Zealand, Australia, and southern Africa. It was during this voyage that Darwin accumulated the observations that would, over the next two decades, crystallize into his theory.
In South America, Darwin unearthed the fossils of giant ground sloths and armadillo-like glyptodonts—animals that resembled, but were clearly distinct from, the living species of the same continent. The pattern was suggestive: why should extinct creatures in a given region resemble the living creatures of that same region, unless there was some thread of descent connecting them?
The Galápagos Islands provided the most famous evidence. Darwin collected specimens of finches from several islands, each with differently shaped beaks suited to different food sources—some for cracking hard seeds, some for probing cactus flowers, some for catching insects. He did not immediately grasp the significance of these birds. It was only after his return to England, when the ornithologist John Gould examined the specimens and identified them as distinct but closely related species, that Darwin began to understand the pattern. Each island, with its particular ecology, had produced its own variant from a common ancestor. The finches were not merely interesting. They were a miniature demonstration of divergence under different conditions.
Darwin also studied coral reefs extensively during the voyage, developing a theory of atoll formation that explained how barrier reefs and atolls could arise from the gradual subsidence of volcanic islands over geological time. The reef work is often overlooked, but it reveals something essential about Darwin's mind: he was drawn to processes that operate slowly, incrementally, and cumulatively. He looked at a coral atoll and saw not a static structure but a record of deep time. The same instinct would later inform his understanding of biological change.
II. The Intellectual Context
Darwin did not think in a vacuum. The idea that species might change over time was already in the air when he embarked on the Beagle, though it lacked a convincing mechanism.
Lamarck and Inherited Effort
Jean-Baptiste Lamarck, writing in the early nineteenth century, had proposed that organisms change during their lifetimes in response to their environments and pass those acquired characteristics to their offspring. The blacksmith's sons inherit his strong arms; the giraffe's neck lengthens because generations of giraffes stretched to reach high leaves. Lamarck was right that organisms are shaped by their environments and right that species are not fixed. But his mechanism was wrong. Acquired characteristics are not inherited. A bodybuilder's children are not born muscular. The insight that species change was valuable; the proposed engine of change was not.
Malthus and the Arithmetic of Struggle
In September 1838, Darwin read Thomas Malthus's An Essay on the Principle of Population, and the effect was catalytic. Malthus argued that human populations grow geometrically while food supplies grow only arithmetically, ensuring that population will always press against the limits of subsistence. The result is inevitable competition: not everyone can survive to reproduce. Darwin recognized that this principle applied not only to humans but to every living thing. More organisms are born than can possibly survive. The question then becomes: which ones survive, and why?
Lyell and the Depth of Time
Charles Lyell's Principles of Geology, which Darwin carried aboard the Beagle, argued that the Earth's geological features were produced by the same gradual processes observable today—erosion, sedimentation, volcanic uplift—acting over immense spans of time. This principle, known as uniformitarianism, demolished the need for catastrophic explanations. If the Grand Canyon could be carved by a river given enough millennia, then perhaps the diversity of life could be produced by small, cumulative changes given enough generations. Lyell gave Darwin the conceptual permission to think in deep time, and deep time was exactly what natural selection required.
III. The Core Mechanism
Darwin's theory rests on four observable facts and one inescapable inference.
Fact one: variation. Individuals within any population differ from one another. No two organisms are exactly alike. Some are taller, some faster, some more resistant to disease, some better camouflaged. This variation is pervasive, continuous, and undirected—it does not arise in response to need. It simply exists.
Fact two: inheritance. Offspring tend to resemble their parents. The traits that make one individual different from another are, at least in part, transmitted to the next generation. Tall parents tend to have tall children. Fast parents tend to have fast offspring. The mechanism of inheritance was unknown in Darwin's time—Gregor Mendel's work on pea plants would not be rediscovered until 1900—but the fact of inheritance was obvious to anyone who had ever bred pigeons, dogs, or cattle.
Fact three: overproduction. Every species produces more offspring than can survive to maturity. A single oak tree drops thousands of acorns; a single salmon lays thousands of eggs; a single bacterium can divide every twenty minutes. If every offspring survived and reproduced, any species would quickly overwhelm the planet. They do not. Most die.
Fact four: limited resources. Food, territory, mates, shelter—the resources necessary for survival and reproduction are finite. There is not enough for everyone. This creates competition, whether direct or indirect, among individuals within a population and between species.
The inference: natural selection. Given that individuals vary, that variation is heritable, that more are born than can survive, and that resources are limited, it follows that those individuals whose variations happen to be advantageous in their particular environment will, on average, survive longer and reproduce more successfully than those without such variations. Over time, the advantageous traits will become more common in the population. Over many generations, the population changes. This is natural selection.
Note what the theory does not require. It does not require foresight. It does not require a designer. It does not require any individual organism to "try" to adapt. It does not require understanding of any kind. It requires only that some variants leave more offspring than others, and that the traits responsible for this differential success are heritable. The process is blind, local, and cumulative. Each generation is a filter. What passes through the filter is determined entirely by what works in the current environment, with no reference to the future. And yet, given enough time, this mindless process produces systems of such staggering complexity that they appear, to us, designed. That appearance is the deepest illusion in nature.
IV. Natural Selection Made Rigorous
The phrase "survival of the fittest," coined by Herbert Spencer and later adopted by Darwin, is often misunderstood. Fitness, in the evolutionary sense, does not mean strength, speed, or size. It means differential reproductive success. An organism is fit if it leaves more viable offspring than its competitors. A mouse that avoids predators and raises twelve pups to maturity is fitter than a mouse that fights off every rival but raises only two. Fitness is measured in the next generation, not in the current one.
This reframing is critical. Natural selection is not about individual survival per se. It is about the propagation of heritable traits through a population. An organism that dies immediately after reproducing has, in evolutionary terms, succeeded. An organism that lives for a century but produces no offspring has, in evolutionary terms, failed entirely. The unit of selection is debated—the gene, the individual, the group—but the currency is always reproductive output.
Selection can be stabilizing, directional, or disruptive. Stabilizing selection favors the average: human birth weight clusters around a middle range because babies that are too small or too large face higher mortality. Directional selection shifts the population mean in one direction: if the climate cools, animals with thicker fur leave more offspring, and the population gradually becomes furrier. Disruptive selection favors extremes over the middle: in a habitat with only very large and very small seeds, birds with either very large or very small beaks may outcompete those with medium beaks, eventually splitting the population into two distinct forms.
V. Sexual Selection
Darwin recognized that natural selection alone could not explain every feature of organisms. The peacock's tail is a liability in terms of survival: it is heavy, conspicuous, and energetically expensive to grow. Yet peacocks have enormous, elaborate tails. Why?
Darwin's answer was sexual selection, a mechanism he elaborated at length in The Descent of Man (1871). Sexual selection operates not through differential survival but through differential access to mates. If peahens prefer males with larger, more elaborate tails, then males with such tails will mate more often and leave more offspring, regardless of the survival cost. Over time, the tail becomes more and more extravagant, driven by female choice, until the survival cost balances the reproductive advantage.
Sexual selection takes two forms. Intersexual selection, or mate choice, occurs when members of one sex (typically females) choose mates based on particular traits. Intrasexual selection, or competition between members of the same sex (typically males), favors traits useful in direct contests: antlers, tusks, body size, aggression. Both forms can produce traits that seem maladaptive from a pure survival standpoint but are perfectly explicable as adaptations for reproductive competition.
The logic of sexual selection is subtly distinct from that of natural selection. Natural selection responds to the external environment—climate, predators, pathogens, food supply. Sexual selection responds to the preferences and competitive dynamics within the species itself. It is an engine of runaway elaboration, capable of producing ornaments, songs, dances, and displays that have no ecological function but enormous reproductive significance.
VI. The Evidence
The Fossil Record
Fossils provide a direct, if incomplete, record of life's history. The fossil record shows that life on Earth has changed dramatically over time: the organisms that existed 500 million years ago are radically different from those alive today. It shows that species appear, persist for a time, and then go extinct. It reveals transitional forms—Archaeopteryx, with features of both dinosaurs and birds; Tiktaalik, with features of both fish and tetrapods—that document the gradual transformation of one body plan into another. Darwin acknowledged that the fossil record in his day was fragmentary, but predicted that future discoveries would fill the gaps. That prediction has been spectacularly confirmed.
Biogeography
The geographic distribution of species is precisely what evolution predicts and precisely what special creation does not. Oceanic islands are populated not by the full range of life but by those organisms capable of reaching them: birds, insects, wind-blown seeds. The mammals of Australia—almost entirely marsupials—are radically different from those of nearby Asia, explicable by the long isolation of the Australian continent. The flora and fauna of the Galápagos resemble those of the nearest mainland, South America, not those of ecologically similar islands elsewhere. Biogeography makes sense under evolution. Under any alternative hypothesis, it is an inexplicable set of coincidences.
Homologous Structures
The forelimb of a human, the wing of a bat, the flipper of a whale, and the leg of a horse are built from the same bones, arranged in the same pattern, despite serving radically different functions. This structural similarity—homology—is evidence of common descent. A designer might use completely different blueprints for limbs designed to grasp, fly, swim, and run. Evolution, constrained by the materials it inherits from ancestral forms, modifies the same basic structure over and over, adapting it to new purposes. The result is deep structural unity beneath functional diversity.
Embryology
The embryos of vertebrates are strikingly similar in their early stages. Human embryos, at one point in development, possess pharyngeal arches that in fish develop into gills, a tail that is later reabsorbed, and a coat of fine hair (lanugo) that is shed before birth. These features make no sense as independent designs but make perfect sense as inherited developmental programs from common ancestors, modified over evolutionary time. Embryology was among the evidence that most impressed Darwin, and it remains among the most powerful.
Molecular Evidence
Since the discovery of DNA, molecular biology has provided overwhelming confirmation of evolution. All known life uses the same genetic code. The degree of genetic similarity between species corresponds precisely to their inferred evolutionary relatedness: humans and chimpanzees share roughly 98.7% of their DNA; humans and mice share about 85%; humans and bananas share about 60%. Molecular phylogenetics—the construction of evolutionary trees from genetic sequences—produces trees that are consistent with those derived from anatomy, the fossil record, and biogeography. The convergence of these independent lines of evidence is extraordinarily powerful.
VII. The Tree of Life
One of Darwin's most revolutionary insights was that all living organisms are related through a single, branching tree of descent. In On the Origin of Species, he included only one illustration: a diagram of a branching tree, representing the divergence of species from common ancestors over time. At the base of the tree is the last universal common ancestor (LUCA), a single-celled organism from which every bacterium, plant, fungus, and animal on Earth is descended.
The tree of life is not a metaphor. It is a literal description of the genealogical relationships among all living things. Every species is a twig on this tree. Every node is a speciation event—a point at which one lineage split into two. The tree is not a ladder from simple to complex; it is a bush, branching in all directions, with no intrinsic direction or goal. Humans are not at the top. We are one twig among millions, sharing the tree with bacteria that have been evolving for precisely as long as we have.
Darwin wrote in his notebook, years before publishing the Origin: "I think"—and below those words, he drew a small, tentative tree. That sketch, hesitant and rough, is one of the most important diagrams in the history of science.
VIII. Wallace and the Parallel Discovery
Alfred Russel Wallace, a self-educated naturalist from a modest background, independently arrived at the theory of natural selection while collecting specimens in the Malay Archipelago. In February 1858, suffering from malaria on the island of Ternate, Wallace wrote out his theory in an essay and mailed it to Darwin, whom he respected as a leading naturalist. Darwin was stunned. Wallace's formulation was remarkably similar to his own.
The crisis was resolved by a joint presentation of papers by both Darwin and Wallace at the Linnean Society of London on 1 July 1858. Darwin then rushed to complete On the Origin of Species, published on 24 November 1859. The first edition sold out on the first day.
Wallace's contribution has often been undervalued. He was a rigorous thinker and a more daring field naturalist than Darwin, spending eight years in the tropics under conditions of considerable hardship. His independent discovery of natural selection is one of the great convergences in the history of ideas, and it strengthens rather than weakens the theory: if two people, working from different evidence in different parts of the world, arrive at the same conclusion, that conclusion is more likely to be true.
IX. The Impact
On Biology
The geneticist Theodosius Dobzhansky wrote in 1973 that "nothing in biology makes sense except in the light of evolution." This is not hyperbole. Evolution is the organizing principle of the biological sciences. It explains why organisms are the way they are, why they are related to each other in the ways they are, why they are distributed across the planet as they are, why they develop as they do, and why they are susceptible to the diseases they suffer. Without evolution, biology is a collection of disconnected facts. With evolution, it is a coherent science.
On Philosophy
Darwin's theory demolished the argument from design—the idea that the complexity of living organisms implies an intelligent designer. Before Darwin, the watchmaker analogy seemed compelling: just as a watch implies a watchmaker, so a complex organism implies a creator. Darwin showed that there is an alternative explanation: the blind, cumulative process of natural selection, which produces the appearance of design without any designer. Daniel Dennett called this "the single best idea anyone has ever had." It is not an overstatement. Darwin replaced purpose with process and intention with iteration. He showed that you do not need a mind to produce things that look as though they were made by a mind. The consequences of that insight are still unfolding.
The philosophical consequences are profound. If the complexity and apparent purposefulness of living organisms can arise without a plan, then the argument that complexity requires intelligence is undermined at its foundation. Evolution does not disprove the existence of a deity, but it removes one of the most powerful arguments for one.
On Culture
Evolution was, and remains, culturally incendiary. It places humans squarely within the animal kingdom, as primates descended from ape-like ancestors, sharing common ancestry with every other living thing. This was perceived as an affront to human dignity by many of Darwin's contemporaries, and it continues to provoke resistance in some quarters today. But the evidence is overwhelming and unambiguous. Humans are animals, shaped by the same processes that shaped every other species. Our intelligence, our language, our morality, our art—all are products of evolution, however much they transcend their origins.
X. The Modern Synthesis
Darwin's great weakness was that he did not understand the mechanism of inheritance. He knew that offspring resemble their parents, but he did not know why. His own theory of "pangenesis," in which tiny particles called gemmules were shed by every cell and collected in the reproductive organs, was wrong.
The answer came from Gregor Mendel, an Augustinian friar in Brno, who in the 1860s conducted meticulous experiments with pea plants and discovered the laws of particulate inheritance: traits are transmitted by discrete units (now called genes) that do not blend but are passed intact from parent to offspring. Mendel's work was ignored in his lifetime and rediscovered in 1900 by Hugo de Vries, Carl Correns, and Erich von Tschermak.
For a time, Mendelian genetics and Darwinian evolution seemed incompatible. Mendelians emphasized discontinuous variation—sudden, large mutations—while Darwinians emphasized the gradual accumulation of small differences. The reconciliation came in the 1930s and 1940s through the work of Ronald Fisher, J.B.S. Haldane, Sewall Wright, Theodosius Dobzhansky, Ernst Mayr, and George Gaylord Simpson, among others. Their synthesis demonstrated that Mendelian genetics provides precisely the mechanism of inheritance that Darwinian selection requires. Genes mutate, producing variation. Genes are inherited, ensuring continuity. Natural selection acts on the phenotypic effects of genes, changing their frequencies in populations over time. The modern synthesis unified genetics, systematics, paleontology, and ecology into a single coherent framework.
Since the 1950s, the discovery of DNA's structure by Watson and Crick, the cracking of the genetic code, and the rise of molecular biology have further deepened the synthesis. We now understand evolution at the level of nucleotide sequences, gene regulation, and epigenetics. The fundamental logic, however, remains Darwin's: variation, inheritance, selection, time.
XI. Evolution and Computation
Here is the claim, stated plainly: evolution is not merely analogous to computation. It is computation. The planet is the computer. DNA is the program. The environment is the fitness function. Death is the error signal. And the output, after four billion years of continuous execution, is the biosphere—every organism, every ecosystem, every mind that has ever existed on Earth. No other computational process has ever run for as long, on as much hardware, with as much at stake.
Darwin could not have framed it this way. The concept of computation did not exist in 1859. But the structure he identified—a simple, iterative process of variation and selection producing complex, well-adapted structures without any centralized plan—is precisely the structure of a search algorithm operating over an unimaginably vast solution space. Evolution searches the space of possible organisms the way gradient descent searches the space of possible weight configurations: blindly, locally, and with extraordinary effectiveness given sufficient time and scale.
The Pattern That Recurs
Once you see evolution as computation, you begin to see its signature everywhere. In the 1960s and 1970s, computer scientists formalized this recognition. Genetic algorithms, pioneered by John Holland, represent candidate solutions as strings of bits and evolve them through crossover and mutation. Genetic programming, developed by John Koza, evolves entire programs. These techniques have been applied to circuit design, antenna optimization, drug discovery, and thousands of other domains. The results are often surprising—not because the method is clever, but because the method is patient. It tries everything. It keeps what works.
But the deeper resonance is not with evolutionary algorithms specifically. It is with the broader principle that Rich Sutton identified in The Bitter Lesson: the methods that scale with computation consistently defeat the methods that rely on human knowledge. Evolution is the original proof of this principle. It has no knowledge. It has no theory of what it is building. It has only variation, selection, and time—and it produced the human brain, the most complex object we have encountered in the universe. The lesson is bitter because it offends our desire to believe that understanding matters more than search. Evolution does not understand anything. It simply searches, relentlessly, for four billion years.
Neuroevolution and the Baldwin Effect
The connection between evolution and artificial intelligence runs deeper than analogy. Neuroevolution—the use of evolutionary algorithms to design and train neural networks—has produced results that rival gradient-based methods in some domains. Kenneth Stanley's NEAT algorithm evolves both the weights and the architecture of neural networks, discovering structures no human engineer would have designed. The transformer architecture itself—the engine behind the current wave of AI—did not spring from nowhere. It evolved from a lineage of sequence models, each generation building on the last, each selected for by the only fitness function that matters in research: does it work better than what came before?
The relationship between evolution and learning is one of the deepest questions in both biology and AI. Evolution produces brains capable of learning; learning, in turn, changes the selective pressures on a population, guiding evolution toward organisms that learn faster and better. This is the Baldwin effect, and its computational analog is everywhere in modern AI: the architecture evolves slowly across research generations, while the weights learn rapidly within a single training run. Two optimization processes, nested, each accelerating the other.
Emergent Consensus
Evolution's computational signature appears in places that have nothing to do with biology. Bitcoin achieves consensus without a central authority by making nodes compete to solve cryptographic puzzles, rewarding the winners, and letting the longest chain survive—a selection pressure that produces reliable agreement from unreliable parts. No individual node needs to be trustworthy. The system's intelligence is an emergent property of the selection mechanism, exactly as it is in nature. Satoshi did not invent a new principle. He applied the oldest one.
XII. The Original Algorithm
Evolution by natural selection is, to our knowledge, the most powerful optimization process in the universe. It has produced the eye, the immune system, the human brain, the echolocation of bats, the photosynthesis of plants, the metamorphosis of butterflies, and the social structures of ants. It operates without a blueprint, without foresight, without any representation of the problem it is solving. It requires only three things: a population of replicators, heritable variation among them, and differential reproductive success. Given these conditions and sufficient time, it will find solutions of extraordinary sophistication.
The power of evolution lies in its generality. It works on any substrate that supports replication with variation: DNA, RNA, computer programs, neural network architectures, cultural practices, consensus protocols. It works at any scale: molecular, organismal, ecological, civilizational. It works in any environment, adapting to whatever selective pressures are present. It does not need to understand the problem it is solving. It merely needs to try many things and keep what works. This is the principle. Everything else is implementation detail.
This is, at bottom, the secret: evolution converts death into information. Every organism that fails to reproduce is a data point about what does not work. Every organism that succeeds is a data point about what does. Over millions of generations, this relentless filtering accumulates an enormous quantity of information about how to survive and reproduce in a given environment. That information is encoded in the genome of every living thing. You are, in a very real sense, a message written by four billion years of trial and error.
"There is grandeur in this view of life, with its several powers, having been originally breathed into a few forms or into one; and that, whilst this planet has gone cycling on according to the fixed law of gravity, from so simple a beginning endless forms most beautiful and most wonderful have been, and are being, evolved."
— Charles Darwin, On the Origin of Species, final paragraph
Darwin saw it clearly, long before anyone had the vocabulary to say it this way. From a simple beginning, through a process that is neither intelligent nor directed but merely relentless, comes all the complexity, beauty, and strangeness of life on Earth. The algorithm writes itself. The code is its own programmer. And the process, once started, does not stop. It is running now—in every cell that divides, in every neural network that trains, in every protocol that selects for the longest chain. It was the first algorithm. Every other one is a special case.