WILL ANDROIDS DREAM of sorting numbers? The annals of artificial intelligence are littered with references to chess-playing automatons and Turing tests, but the seemingly elementary task of arranging digits in numerical order has played a seminal role in AI's history as well. Consider the program for number-sorting devised several years ago by supercomputing legend Danny Hillis, a program that undermines all of our conventional assumptions about how software should be produced. Hillis' creation was a recipe for learning, a program for creating another program. In other words, Hillis didn't teach the computer how to sort numbers. He taught the computer to figure out how to sort numbers on its own.
Hillis pulled off this sleight of hand by connecting the formidable powers of natural selection to a massively parallel supercomputer. Instead of designing a number-sorting program himself -- writing out lines of code and debugging -- Hillis instructed the computer to generate thousands of mini-programs, each composed of random combinations of instructions, creating a kind of digital gene pool. Each program was confronted with a disorderly sequence of numbers and each tried its hand at putting them in the correct order. The first batch of programs were, as you might imagine, utterly inept at number-sorting. (In fact, the overwhelming majority of the programs were good for nothing at all.) But some programs were better than others, and because Hillis had established a quantifiable goal for the experiment -- numbers arranged in the correct order -- the computer could select the few programs that were in the ballpark. Those programs became the basis for the next iteration, only Hillis would also mutate their code slightly, and crossbreed it with the other promising programs. And then the whole process would repeat itself: the most successful programs of the new generation would be chosen and then subjected to the same transformations. Mix, mutate, evaluate, repeat.
At the end of thousands of cycles, the computer had evolved a batch of programs that could sort any assemblage of random numbers -- and, indeed, could sort numbers faster than any programs that Hillis himself had written using traditional programming techniques. Hillis' system functioned, in biological terms, more like an environment than an organism: It created a space where intelligent programs could grow, and in some cases exceed the capacities of flesh-and-blood programmers. "One of the interesting things about the sorting programs that evolved in my experiment is that I do not understand how they work," Hillis writes in his recent book, The Pattern In The Stone. "I have carefully examined their instruction sequences, but I do not understand them: I have no simpler explanation of how the programs work than the instruction sequences themselves. It may be that the programs are not understandable."
Proponents of evolutionary software have long made ambitious claims for their field. The most grandiose of those involve scenarios where digital Darwinism leads to a simulated intelligence capable of open-ended learning and complex interaction with the outside world. (Most advocates don't think that such an intelligence will necessarily resemble human smarts, but that's another matter.) In the short-term, though, evolutionary software promises to transform the way that we think about creating code: In the next decade, we may well see a shift from top-down designed programs, to bottom-up evolved versions, like Hillis' number-sorting application -- "less like engineering a machine," Hillis says, "than baking a cake or growing a garden."
That transformation may be revolutionary for the programmers, but if it does its job, it won't necessarily make much of a difference for the end-users. We might notice our spreadsheets recalculating a little faster and our grammar-checker finally working, but we'll be dealing with the end-results of evolutionary software then, not the process itself. (The organisms, in other words, and not the environment that nurtured them.) But there is one domain where we'll be able to experiment directly with evolutionary software, growing our digital gardens of code. In fact, we can get our hands dirty already. And we can do it just by playing a game.
LATER THIS MONTH, the UK software company Computer Artworks will release a PC game called Evolva. The product stands as something of a change for CA, who were last seen marketing a trippy screensaver called Organic Art that allowed you to replace your desktop with a menagerie of alien-looking lifeforms. The software came bundled with a set of prepackaged images, but more adventurous users could also roll their own, "breeding" new creatures with the company's A-Life technology. While the Organic Art series was a success, it quickly became clear to the CA team that interacting with your creatures would be much more entertaining than simply gazing at snapshots of them. Who wants to look at Polaroids of Sea Monkeys when you play with the adorable little critters yourself?
Image from Evolva
And so Computer Artworks turned itself into a video-game company. Evolva is their first fully interactive product to draw upon the original artificial-life software, integrating its mutation and interbreeding routines into a game world that might otherwise be mistaken for a hybrid of Myth and Quake. The plot is standard-issue video-game fare: Earth has been invaded by an alien parasite who threatens world destruction; as a last defense, the humans send out packs of fearless "Genohunters" to save the planet. Users control teams of Genohunters, occupying the point of view of one while issuing commands to the others. A product of biological engineering themselves, Genohunters are capable of analyzing the DNA of any creature they kill, and absorbing useful strands into their own genetic code. Once you've absorbed enough DNA, you can pop over to the Mutation screen and tinker with your genetic makeup -- adding new genes and mutating your existing ones, expanding your characters' skills in the process. It's like suddenly learning how to program in C++, only you have to eat the guy from tech support to see the benefits.
That appetite for DNA gives the A-Life software its entrée into the gameplay. "As the player advances through the game, new genes are collected and added to the available gene pool," Lead programmer Rik Heywood explains. "When the player wants to modify one of their creations, they can go to the mutation screen. Starting from the current set of DNA, two new generations can be created by combining the DNA from the existing Genohunter with the DNA in the collected gene pool and some slight random mutations. The new sets of DNA are used to morph the skin, grow appendages all over the body, and develop new abilities, such as breathing fire or running faster."
THIS IS ALL SCIENCE FICTION, of course, so there's no point in dwelling on the fact that, in real life, grafting a string of GATTACAs to your chromosomes is as likely to induce cardiac arrest as fire-breathing. We're better off suspending disbelief and focusing on how the A-Life technology changes the way the game is played -- and what that says about the future of evolutionary software itself.
The promotional material for Evolva makes a great deal of noise about the game's open-endedness. Some fourteen billion distinct characters can be generated using the mutation screen, which means that unless Computer Artworks strikes a licensing deal with other galaxies, players who venture several levels deep in the game will be playing with genetically unique Genohunters. For the most part, those mutations result in relatively superficial external changes, more like a new paint job than an engine overhaul. And the more sophisticated alterations to the Genohunters' behavior -- fire breathing, laser shooting, long-distance jumping, among others -- are largely discrete skills programmed directly by the CA team. You won't see any Genohunters spontaneously learning how to play the cello or use sonar. The bodies of your Genohunters may end up looking dramatically different from how they started, but those bodies won't let their hosts adopt radically new skills.
These limitations may well make the game more enjoyable. For a sixteen-year-old Quake player who's just trying to "frag" as many parasites on his way to the next level, suddenly learning how to read braille is only going to be a distraction. And if you thought Myst was frustrating, imagine getting stuck on a level because your character hasn't "evolved" claws yet. There's nothing more frustrating than spending two hours trying to solve a puzzle that you don't have the tools to solve. In a purely open-ended system -- where the tools may or may not evolve depending on the whims of natural selection -- that frustration would quickly override any gee-whiz appeal of growing your own characters. That's why Heywood and his team planted DNA for complex skills near puzzles or hurdles that require those skills. "For example, if we wanted to be sure that the player had developed the ability to breathe fire by a particular point in the game," he explained to me in an e-mail correspondence, "we would block the path with some flammable plants and place some creatures with a fire-breathing ability nearby."
Heywood's solution might be the smartest short-term move for the gamers, but it's worth pointing out that it also runs headlong against the principles of Darwinism. Not only are you deliberately selecting certain traits over others, but the DNA for those traits is planted near the appropriate obstacles. It's like some strange twist on Lamarckian evolution: The giraffe's neck grows longer each generation, but only because the genes for longer necks happen to sprout next to the banana trees. The blind watchmaker of Evolva's mutation engine turns out to have some sight after all.
IS THERE A WAY to reconcile the unpredictable creativity of evolution with the directed flow of gaming? The answer, I think, will turn out to be a resounding yes, as more games adopt sophisticated Darwinian tools. Classic games like SimCity -- or this year's The Sims -- have dealt with open-ended structures by eliminating predefined objectives altogether. The commercial success of titles like The Sims suggests that growing new life-forms on the screen can be at least as engaging as shooting things. While The Sims itself doesn't rely on evolutionary software techniques, creator Will Wright is clearly thinking about the future possibilities of the form. "I've been fascinated with adaptive computing for some time now," he says. "One possibility would be to give the game some sense of how much the user is engaged and having fun. If we could measure this in some way, then we could design the game to learn what you like and enjoy. Each copy of the game would learn and evolve to fit each individual player."
But while games that grow in response to each player's interest may be a few years off, Evolva stands today as the most intriguing iteration yet of Darwinian thumb-candy. Nowhere is this more apparent than in the way the game enables new forms of group behavior to evolve over time. Behind the scenes, each creature in the Evolva world is endowed with sensory inputs and emotive states: fear, pain, aggression, and so on. Creatures also possess memories that link those feelings with other characters, places, or actions -- and they are capable of sharing those associations with their comrades. As the web of associations becomes more complex, and more interconnected, new patterns of collective behavior can evolve, creating a lifelike range of potential interactions between creatures in the world.
"Say you encounter a lone creature," Heywood explains. "When you first meet it, it is maybe feeling very aggressive and runs in to attack your team. However, you have it outnumbered and start causing it some serious pain. Eventually fear will become the dominant emotion, causing the creature to run away. It runs around a corner and meets a large group of friends. It communicates with these other creatures, informing them of the last place it saw you. Being in a large group of friends brings its fear back down and the whole group launches a new attack on the player." The group behavior can evolve in unpredictable ways, based on external events and each creature's emotional state, even if the virtual DNA of those creatures remains unchanged.
There is something strangely comforting in this image, particularly for anyone who thinks social patterns influence our behavior as readily as our genes do. You may not be able to use Evolva's mutation engine to grow wings, but your creatures can still learn new ways to flock. Of course, they're not likely to stumble across a shortcut for number-sorting in the process. But isn't that what sequels are for?
Steven Johnson is editor-in-chief of FEED and author of Interface
Culture: How New Technology Transforms The Way We
the genetic revolution and FEED's special DNA issue in the Loop.