Harnessing Digital Evolution
Total Page:16
File Type:pdf, Size:1020Kb
C O V E R F E A T U R E Harnessing Digital Evolution Philip McKinley, Betty H.C. Cheng, Charles Ofria, David Knoester, Benjamin Beckmann, and Heather Goldsby Michigan State University In digital evolution, self-replicating computer programs—digital organisms—experience mutations and selective pressures, potentially producing computational systems that, like natural organisms, adapt to their environment and protect themselves from threats. Such organisms can help guide the design of computer software. early 150 years ago, Charles Darwin plasticity and in the longer term through Darwinian evo- explained how evolution and natural selec- lution. Indeed, no existing cybersystem rivals the com- tion transformed the earliest life forms into plexity of Earth’s biosphere, yet life on Earth has evolved the rich panoply of life seen today. Scientists to not only deal with this complexity but to thrive on it. estimate this process has been at work on Many researchers have studied how to use the charac- NEarth for at least 3.5 billion years. teristics of natural systems to design better computing But we remain at the dawn of evolution in another systems. One approach mimics the behaviors of social world: the world of computing. There, evolution helps insects and other species. However, while such biomi- humans solve complex problems in engineering and metic methods have shown promise in controlling fleets provides insight into the evolutionary process in nature. of unmanned robotic systems and in other applications, As computing power continues to increase, research- they can only codify behaviors observed in nature today. ers and developers apply evolutionary algorithms to an Purely biomimetic approaches seek to imitate the results ever-widening variety of problems. As the “Evolution of evolution, but they do not account for the process of in a Computer” sidebar shows, evolutionary computa- natural selection that produced those behaviors. tion methods such as genetic algorithms have already For example, we can design the control software on achieved considerable success, rivaling and surpassing a microrobot so that it mimics certain behaviors found human designers in problem domains as wide-ranging in ants. However, while the robot might possess some as flash memory sticks and aircraft wings. physical characteristics reminiscent of an ant, the dif- We are investigating how to harness the power of ferences vastly outnumber the similarities. On the other evolution to help construct better computer software. hand, if we had the ability to evolve the control software, The increasing interaction between computing technol- taking into account the capabilities of the robot and the ogy and the physical world motivates this work. Sys- characteristics of its environment, new behaviors might tems must adapt to their environment, compensate for emerge that more effectively control the robot.3 failures, optimize performance, and protect themselves from attacks—all with minimal human intervention.1,2 DIGITAL PETRI DISH To design robust and resilient computational systems, Digital evolution gives us this power, and we are inves- we can take inspiration from nature. Living organisms tigating how it can aid us in designing robust compu- have an amazing ability to adapt to changing envi- tational systems. Digital evolution is a form of evolu- ronments, both in the short term through phenotypic tionary computation in which self-replicating computer 54 Computer Published by the IEEE Computer Society 0018-9162/08/$25.00 © 2008 IEEE Evolution in a Computer Evolutionary computation,1 a subfield of computer Core War, which Steen Rasmussen extended in 1990 science, applies the basic principles of genetic evolu- into a system he called Core World. Soon after, Thomas tion to problem solving. EC is based on evolutionary Ray designed Tierra, which used a streamlined and biology and extends into many other fields, includ- fault-tolerant genetic language. ing artificial life. In general, an EC system contains In 1993, Charles Ofria, Chris Adami, and C. Titus one or more populations of individuals that compete Brown began developing the Avida digital-evolution for resources in a computational environment. These platform4 at the California Institute of Technology. In individuals produce offspring according to their fit- Avida, each program lives in its own address space, ness, which often depends on the problem domain. unlike Tierra’s shared address space. This enhance- The most well-known evolutionary computation ment increased the power of digital evolution as method is the genetic algorithm.2 In this iterative an experimental tool. Avida has since been used to search technique the individuals in the population conduct pioneering research in the evolution of bio- are encodings of candidate solutions to an optimiza- complexity, with an emphasis on understanding the tion problem. In each generation, the fitness of every evolutionary design process in nature. In addition to individual is calculated, and a subset of individuals is providing a tool for biologists, digital evolution pro- selected, recombined, or mutated, and moved to the vides an open-ended search technique for problems next generation. in science and engineering. Genetic programming3 provides a related method in which the individuals are actual computer pro- References grams. These approaches and other EC methods have 1. K.A. De Jong, Evolutionary Computation: A Unified been used to solve complex problems, in some cases Approach, MIT Press, 2002. producing patentable designs.3 The annual Genetic 2. J.H. Holland, Adaptation in Natural and Artificial Systems: and Evolutionary Computation Conference gives An Introductory Analysis with Applications to Biology, Con- awards for human-competitive results produced trol, and Artificial Intelligence, Univ. Michigan Press, 1975. by genetic and evolutionary computation (www. 3. J.R. Koza et al., Genetic Programming IV: Routine Human- geneticprogramming.org/hc2007/cfe2007.html). Competitive Machine Intelligence, Genetic Programming, While the broad field of evolutionary computation Springer, 2005. has been studied extensively since the 1960s, the 4. C. Ofria and C.O. Wilke, “Avida: A Software Platform for subfield of digital evolution is much younger. Self-rep- Research in Computational Evolutionary Biology,” J. Arti- licating digital organisms can be traced to the game ficial Life, vol. 10, 2004, pp. 191-229. programs evolve within a user-defined computational these interactions, an organism can gain or lose virtual environment.4 These digital organisms receive limited CPU cycles, affecting how fast it executes instructions. resources whose use must be carefully balanced if they The virtual CPU architecture used in most of our stud- are to survive. As organisms replicate, instruction-level ies is simple, containing three general-purpose registers mutations produce variation within the population. {AX, BX, CX}, two general-purpose stacks {GS, LS}, and Over generations, natural selection can produce instruc- four special-purpose heads. These heads serve as point- tion sequences that can realize complex behaviors, some- ers into the organism’s genome and resemble a tradi- times revealing unexpected and strikingly clever strate- tional program counter or stack pointer. The instruction gies for solving problems. set for this virtual CPU is Turing-complete, and there- Our work uses and extends the Avida digital evolu- fore, theoretically, it can realize any computable func- tion platform. Figure 1 depicts an Avida population and tion. Available instructions perform basic computational the structure of an individual organism. Each digital tasks (addition, multiplication, and bit-shifts), control organism consists of a circular list of instructions—its execution flow, enable communication, and allow for genome—and a virtual CPU, which executes the instruc- replication. Although the instruction set resembles a tra- tions. An Avida environment comprises several cells, ditional assembly language, it is designed so that random each of which can contain at most one organism, or mutations (inserting, deleting, or changing instructions) Avidian. When an Avidian replicates, the system places will always yield a syntactically correct program. the offspring in a randomly selected cell, terminating Avidians receive virtual CPU-cycle rewards for per- any previous inhabitant. Organisms can send messages forming user-defined tasks, generally defined in terms of to each other, produce and consume resources, and sense the organisms’ externally visible behaviors—their pheno- and change their environment’s properties. Through type. For example, a task might require the organism to January 2008 55 C O V E R F E A T U R E p sub p sub k shift−r h push q nand e if−less Registers b nop−B C rotate−r AX Stacks m inc s h−alloc CPU t h−divide BX GS a nop−A y get−head CX LS eo a d d if−less Ayre t r i e gvsee−ttm−shfgleoawd Fzg e t − igidf−elta−bidel c nop−C Heads Dii f − g rs tsweanpd−−smtksg vmE o v − hre−eatdsreieavrceh−msg Instruction F get−id f if−grt Flow−control Cell w mov−head z if−label interface u h−copy Read u h−copy u h−copy Write D send−msg u h−copy D send−msg z if−label u h−copy C rotate−r Figure 1. Elements of the Avida digital evolution platform: (top) structure of an individual organism and (bottom) a population of digital organisms in an 8 t 10 grid of cells. Different colors represent organisms with different genomes. perform a particular mathematical or logical operation to future generations. Avidians that are most success- and output the result, or communicate with neighboring ful—those that replicate faster, or perform user-defined organisms in a manner helpful to distributed problem tasks—are more likely to spread throughout and even- solving. Tasks create selective pressures in the popula- tually dominate the population. Indeed, Avida satisfies tion, favoring genomes where mutations have produced the three conditions necessary for evolution to occur5: sequences of instructions that complete tasks. replication, variation (mutation), and differential fitness In our studies, evolved code segments for completing (competition).