Cheaper than printing it out: buy the paperback book.

Out of Control

The first time Tom Ray released his tiny hand-made creature into his computer, it reproduced rapidly until hundreds of copies occupied the available memory space. Ray's creature was an experimental computer virus of sorts; it wasn't dangerous because the bugs couldn't replicate outside his computer. The idea was to see what would happen if they had to compete against each other in a confined world.

Ray cleverly devised his universe so that out of the thousands of clones from the first ancestral virus, about ten percent replicated with small variations. The initial creature was an "80" -- so named because it had 80 bytes of code. A number of 80s "flipped a bit" at random and became creatures 79 or 81 bytes long. Some of these new mutant viruses soon took over Ray's virtual world. In turn, they mutated into further varieties. Creature 80 was nearly overwhelmed to the point of extinction by the mushrooming ranks of new "organisms." But the 80s never completely died, and long after the new arrivals 79, 51, and 45 emerged and peaked in population, the 80s rebounded.

After a few hours of operation, Tom Ray's electric-powered evolution machine had evolved a soup of nearly a hundred types of computer viruses, all battling it out for survival in his isolated world. On his very first try, after months of writing code, Ray had brewed artificial evolution.

When he was a shy, soft-spoken Harvard undergraduate, Ray had collected ant colonies in Costa Rica for the legendary ant-man, E. O. Wilson. Wilson needed live leafcutting ant colonies for his Cambridge labs. Ray hired on in the lush tropics of Central America to locate and capture healthy colonies in the field, and then ship them to Harvard. He found that he was particularly good at the task. The trick was to dig into the jungle soil with the deftness of a surgeon in order to remove the guts of a colony. What was needed was the intact inner chamber of the queen's nest, along with the queen herself, her nurse ants, and a mini-ant-garden stocked with enough food to support the chamber for shipping. A young newborn colony was perfect. The heart of such a colony might fit into a tea cup. That was the other essential trick: to locate a really small nest hidden under the natural camouflaged debris of the forest floor. From a minuscule core that could be warmed in one's hands, the colony could grow in a few years to fill a large room.

While collecting ants in the rain forest, Ray discovered a obscure species of butterfly that would tag along the advancing lines of army ants. The army ants' ruthless eating habits -- devouring any animal life in their path -- would flush a cloud of flying insects eager to get out of the way. A kind of bird evolved to follow the pillaging army, happily picking off the agitated fleeing insects in the air. The butterfly, in turn, followed the birds who followed the army ants. The butterflies tagged along to feast on the droppings of the ant-birds -- a much needed source of nitrogen for egg laying. The whole motley crew of ants, ant-birds and ant-bird-butterflies, and who knew what else, would roam across the jungle like a band of gypsies in cahoots.

Ray was overwhelmed by such wondrous complexity. Here was an entirely nomadic community! Most attempts to understand ecological relations seemed laughable in light of these weird creations. How in the universe did these three groups of species (one ant, three butterflies, and about a dozen birds) ever wind up in this peculiar codependency? And why?

By the time he had finished his Ph.D., Ray felt that the science of ecology was moribund because it could not offer a satisfying answer to such big questions. Ecology lacked good theories to generalize the wealth of observations piling up from every patch of wilderness. It was stymied by extensive local knowledge: without an overarching theory, ecology was merely a library of fascinating just-so stories. The life cycles of barnacle communities, or the seasonal pattern of buttercup fields, or behavior of bobcat clans were all known, but what principles, if any, guided all three? Ecology needed a science of complexity that addressed the riddles of form, history, development -- all the really interesting questions -- yet was supported by field data.

Along with many other biologists, Ray felt that the best hope for ecology was to shift its focus from ecological time (the thousand-year lifetime of a forest) to evolutionary time (the million-year lifetime of a tree species). Evolution at least had a theory. Yet, the study of evolution too was caught up with the same fixation on specifics. "I was frustrated," Ray told me, "because I didn't want to study the products of evolution -- vines and ants and butterflies. I wanted to study evolution itself."

Tom Ray dreamed of making an electric-powered evolution machine. With a black box that contained evolution he could demonstrate the historical principles of ecology, how a rain forest descends from earlier woods, and how in fact ecologies emerge from the same primordial forces that spawn species. If he could develop an evolution engine, he'd have a test-bed with which to do real ecological experiments. He could take a community and run it over and over again in different combinations, making ponds without algae, woods without termites, grasslands without gophers, or just to cover the bases, jungles with gophers and grasslands with algae. He could start with viruses and see where it all would lead him.

Ray was a bird watcher, insect collector, plantsman -- the farthest thing from a computer nerd -- yet he was sure such a machine could be built. He remembered a moment ten years earlier when he was learning the Japanese game of Go from an MIT hacker who used biological metaphors to explain the rules. As Ray tells it, "He said to me, 'Do you know that it is possible to write a computer program that can self-replicate?' And right at that moment I imagined all the things I'm doing now. I asked him how to do it, and he said, 'Oh, it's trivial,' but I didn't remember what he said, or whether in fact he actually knew. When I remembered that conversation I stopped reading novels and started reading computer manuals."

Ray's solution to the problem of making an electronic evolution machine was to start with simple replicators and give them a cozy habitat and plenty of energy and places to fill. The closest real things to these creatures were bits of self-replicating RNA. But the challenge seemed doable. He would cook up a soup of computer viruses.

About this time in 1989, the news magazines were chock-full of cover stories pronouncing computer viruses worse than the plague and as evil as technology could get. Yet Ray saw in the simple codes of computer viruses the beginnings of a new science: experimental evolution and ecology.

To protect the outside world (and to keep his own computer from crashing), Ray devised a virtual computer to contain his experiments. A virtual computer is a bit of clever software that emulates a pretend computer deep within the operating subconscious of the real computer. By containing his tiny bits of replicating code inside this shadow computer, Ray sealed them from the outside world and gave himself room to mess with vital functions, such as computer memory, without jeopardizing the integrity of his host computer. "After a year of reading computer manuals, I sat down and wrote code. In two months the thing was running. And in the first two minutes of running without a crash, I had evolving creatures."

Ray seeded his world (which he called "Tierra") with a single creature he programmed by hand -- the 80-byte creature -- inserted into a block of RAM in his virtual computer. The 80 creature reproduced by finding an empty RAM block 80 bytes big and then filling it with a copy of itself. Within minutes the RAM was saturated with copies of 80.

But Ray had added two key features that modified this otherwise Xerox-like copying machine into an evolution machine: his program occasionally scrambled the digital bits during copying, and he assigned his creatures a priority tag for an executioner. In short he introduced variation and death.

Computer scientists had told him that if he randomly varied bits of a computer code (which is all his creatures really are), the resulting programs would break and then crash the computer. They felt that the probability of getting a working program by randomly introducing bugs into code was so low as to make his scheme a waste of time. This sentiment seemed in line with what Ray knew about the fragile perfection needed to keep computers going; bugs killed progress. But because his creature programs would run in his shadow computer, whenever a mutation would birth a creature that was seriously broken, his executioner program -- he named it "the Reaper" -- would kill it while the rest of his Tierra world kept running. In essence, Tierra spotted the buggy programs that couldn't reproduce and yanked them out of the virtual computer.

Yet, the Reaper would pass over the very rare mutants that worked, that is, those that happened to form a bona fide alternative program. These legitimate variations could multiply and breed other variants. If you ran Tierra for a billion computer cycles or so, as Ray did, a startling number of randomly generated creatures formed during those billion chances. And just to keep the pot boiling, Ray also assigned creatures an age stamp so that older creatures would die. "The Reaper kills either the oldest creature or the most screwed-up creature," Ray says with a smile.

On Ray's first run of Tierra, random variation, death, and natural selection worked. Within minutes Ray witnessed an ecology of newly created creatures emerge to compete for computer cycles. The competition rewarded creatures of smaller size since they needed less cycles, and in Darwinian ruthlessness, terminated the greedy consumers, the infirm, and the old. Creature 79 (one byte smaller than 80) was lucky. It worked productively and soon outpaced the 80s.

Ray also found something very strange: a viable creature with only 45 very efficient bytes which overran all other creatures. "I was amazed how fast this system would optimize," Ray recalls. "I could graph its pace as the system would generate organisms surviving on shorter and shorter genomes."

On close examination of 45's code, Ray was amazed to discover that it was a parasite. It contained only a part of the code it needed to survive. In order to reproduce, it "borrowed" the reproductive section from the code of an 80 and copied itself. As long as there were enough 80 hosts around, the 45s thrived. But if there were too many 45s in the limited world, there wouldn't be enough 80s to supply copy resources. As the 80s waned, so did the 45s. The pair danced the classic coevolutionary tango, back and forth endlessly, just like populations of foxes and rabbits in the north woods.

"It seems to be a universal property of life that all successful systems attract parasites," Ray reminds me. In nature parasites are so common that hosts soon coevolve immunity to them. Then eventually the parasites coevolve strategies to circumvent that immunity. And eventually the hosts coevolve defenses to repel them again. In reality, these actions are not alternating steps but two constant forces pressing against one another.

Ray learned to run ecological experiments in Tierra using parasites. He loaded his "soup" with 79s which he suspected were immune to the 45 parasite. They were. But as the 79s prospered, a second parasite evolved that could prey on them. This one was 51 bytes long. When Ray sequenced its genes he found that a single genetic event had transformed a 45 into a 51. "Seven instructions of unknown origin," Ray says, "had replaced one instruction somewhere near the middle of the 45," transforming a disabled parasite into a newly potent one. And so it went. A new creature evolved that was immune to 51s, and so on.

Poking around in the soups of long runs, Ray discovered parasites that preyed on other parasites -- hyperparasites: "Hyperparasites are like neighbors who steal power from your lines to the power plant. You sit in the dark while they use your power and you pay the bill." In Tierra, organisms such as the 45s discovered that they didn't need to carry a lot of code around to replicate themselves because their environment was full of code -- of other organisms. Quips Ray, "It's just like us using other animals' amino acids [when we eat them]." On further inspection Ray found hyper-hyperparasites thriving, parasites raised to the third. He found "social cheaters" -- creatures that exploit the code of two cooperating hyperparasites (the "cooperating" hyperparasites were stealing from each other!). Social cheaters require a fairly well developed ecology. They can't be seen yet, but there are probably hyper-hyper-hyperparasites and no end to elaborate freeloading games possible in his world.