<<

Introduction to Natural Computation

Lecture 19

Artificial

Alberto Moraglio Part I

Introduction to Artificial Life What is life?

• The physiological definition centres on certain functions performed by organisms, such as breathing, moving, etc. • The metabolic definition centres on the exchange of materials between the organism and its surroundings. • The biochemical approach defines living by their capability to store hereditary information in nucleic acids. • The evolutionary definition focuses on the process of as the central defining characteristic of . Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic of natural living systems” (Langton)

• Why Artificial Life? – is restricted to study a specific instance of life, life on Earth: all life forms we know are carbon- based. – A more universal understanding of life: are the essential ingredients of living organisms independent from the underlying material they are made of? – A-life is the study of life-as-it-could-be.

2005-10-20 4 Non-carbon-based media

• Wetware : synthetic self-reproducing chemical systems, etc. • Hardware : some autonomous : electronic life forms living in a computer’s memory Empirical-Analytical vs. Synthetic

• Traditional Biology : start with a whole organism, deconstruct it into its component parts (for example organs, tissues, cells, genes, molecules, and so on), and then try to derive its fundamental principles. • Artificial Life : reverse engineer life and synthesise real organisms, cookbook style, from their basic ingredients. Artificial Life: Challenges

• How does life arise from the non-living? • What is the cause of the richness of living forms? • How do complex living forms arise? • How do intelligent living forms emerge? • How do sociality and language arise?

• The appearance of macroscopic patterns, properties, or behaviors that are not simply the “sum” of the microscopic properties or behaviors of the components

• A-life embraces emergence: start with a of locally interacting elements according to simple rules that spontaneously give rise to emergent properties

2005-10-20 8 A-Life vs Both seem to approach similar problems, but… Artificial Life Artificial Intelligence Concept : Late 1980s Concept : 1960s

Grounded in Biology, Physics, Pursued primarily in Comp. Sci, Chemistry, Mathematics. Engineering & Psychology.

Studies Intelligence as part of Life Studies Intelligent behavior in itself isolation Bottom-Up approach - study Top-Down approach - focus is on synthesis results A-Life : Current research areas

• Cellular Automata • Neural Networks • Evolutionary • Origin, Self-organization, Repair and Replication • Evolutionary / Adaptive Dynamics • Autonomous , Adaptive and Evolving Robots • Software Agents • Emergent Collective Behaviors, Swarms. • Synthetic/Artificial Chemistry/Biology/Materials • Applications: Finance, Economics, Gaming, MEMS etc • Mathematical, Philosophical, Biological foundations, Social and Ethical implications of A-Life Weak vs. Strong A-Life

• Weak A-life : which claims that of evolving systems may help us understand biological life, is relatively uncontroversial, especially when the simulations relate closely to natural systems. • Strong A -life : which claims that replicating programs inside computers really are alive, is far more controversial. This is partly because the examples of biological life we are all familiar with are orders of magnitude more complex and partly because the claimed similarities with biological evolution tend to be rather abstract. Part II

An Approach to the Synthesis of Life They are both alive!

Tom Ray Tierra Artificial vs. Natural

• Does a car run? Yes, but not like a horse • Does an airplane fly? Yes, but not like a bird • Does a submarine swim? Yes, but not like a fish • Can a computer play chess? Yes, but not like a human • Can software be alive? Yes, but not like a living being!? Working definition of life

• “I would consider a system to be living if it is – Self-replicating and – Capable of open-ended evolution • Synthetic life should self replicate, and evolve structures or processes that were not designed in or preconceived by the creator.” Evolution in a Nutshell

• Ingredients of evolution: – Self-replication (inheritance) – Errors in the copy (variation) – Competition for limited resources (selection) • Outcome of evolution: to the environment • Co-evolution: environment changes continuously as it is made up of evolving (changing) organisms Are evolutionary algorithms alive?

• EAs are not open-ended. They are designed to solve a given problem. • Each has a predefined set of genes and each a predefined set of alleles. • Mutation, recombination, replication and selection are designed and fixed. • The genome does not contain the mechanism for its own replication, it is copied by the control program. • Selection criteria are pre-determined (externally imposed artificial selection), the organisms are not free to invent their fitness function (). Are self-rep cellular automata alive?

http://necsi.edu/postdocs/sayama/sdsr/java/

Chris Langton's ' loops ' is self-replicating. Beginning from a single organism, the loops form a colony. As the loops on the outer fringes reproduce, the inner loops -- blocked by their daughters -- can no longer produce offspring. This self-organizing behaviour emerges spontaneously, from the bottom up -- a key characteristic of artificial life. This is like growth in crystals. It is not alive because of the lack of variation and evolution. Are computer viruses alive?

• Evolution of Computer Viruses: 1. Simple 2. Self-recognition 3. Stealth 4. Armoured 5. Polymorphic

• Viruses replicate inside computers (inheritance), their natural enemies are antivirus programs that eradicate them (natural selection). • In response to the introduction of more sophisticated antivirus programs, virus programmers modify their creations (variation by the action of the programmer, not by random mutation) to overcome them using more sophisticated tricks. Then the antivirus is updated. • This is an evolutionary arm-race that created whole families of viruses adapted to harm your computers in a varieties of ways! Are Core Warriors alive?

• In Core War players write programs in Redcode, the assembly language of the MARS virtual computer. The aim of the game is to survive while causing all opponents to terminate. There are three basic strategies: 1. programs spawn off new copies in the hope at least one survives. 2. programs search for opponents and attempt to disable them. 3. programs drops instructions at random hoping to hit the opponent.

• There is an annual international tournament, only the strongest programs survive. Every year new stronger programs are created.

• Evolution with Human in the loop : every year new improved versions of programs compete for survival. The variation mechanism is not random mutation but the programmer ingenuity (i.e., directed change). Redcode Core World

• Aim: emergence of self-replicating programs from a “primordial soup” of instructions to study how life could emerge from the non-living. • It uses a virtual computer and the Redcode language – Self-rep programs can be easily written in Redcode – Variation: the MOV command, which copy instructions from a place to another, is flawed with some • Outcomes: – Self-rep programs could emerge BUT they soon die out as they cannot withstand a noisy environment (a single error can be fatal) – Interesting dynamics emerged BUT evolution never started off • Identified problem: brittleness of Redcode language under mutation Tierra

• Aim: emergence of a spontaneous open-ended evolutionary process that gives rise to the richness of life from a simple self-replicating ancestor. • It uses a virtual computer with a language robust to mutations with features inspired by biological mechanisms. • Variation is injected in the system by intentional flaws in the instructions and by random changes in memory. • Memory space and CPU time are scarce resources programs need to replicate themselves. Only those programs that are better at getting these resources survive and reproduce (competition and natural selection). The others die. • Outcome: new adapted programs continually emerge able at getting resources to self-replicate more effectively than previously adapted programs. Evolutionary arm race and co-evolution. Many types of biological behaviours observed in emerge spontaneously. Natural life Tierra

Energy CPU time

Territory Memory

Abiotic environment

Amino acids Assembler instructions

Genome Program Mutation

• Cosmic mutations cause the flipping of random bits in the soup at a low frequency • Copy errors result in replication errors • Flaws can occur during execution. The result is off by ±1 at some low frequency • Creatures activity scramble the soup The Digital Environment: Self-replicating computer programs (colored geometric objects) occupy the memory of the computer (orange background) and executed in parallel (circles). Mutations (lightning) cause random changes in the code. Death (the skull) eliminates old or defective programs. Tierra Language

• Special language designed to be robust • Small but computational complete instruction set (32 instructions) • No operands : it uses stack (push and pop) and registers • Jumps: addressing by templates – To find the right place to jump to, a search is made for the nearest complementary template to that following the jump instruction Instruction Set nop_0 no op pop_ax pop into ax nop_1 pop_bx or1 flip bit of cx pop_cx sh1 shift left cx pop_dx zero zero cx jmp to template if_cz if zero jmpb backward sub_ab call call procedure sub_ac ret return inc_a mov_cd inc_b mov_ab dec_c mov_iab mov instrn inc_c adr adrs of templ push_ax onto stack adrb search backwd push_bx adrf search fwd push_cx mal alloc memory push_dx divide 'SPLIT' Ancestor 1111 1100 self exam copy procedure find 0000 [start] → bx Save registers to stack → find 0001 [end] ax 1010 calculate size → cx move |bx| → |ax| decrement cx if cx==0 jump 0100 increment ax & bx 1101 reproduction loop jump 0101 Allocate daughter → ax 1011 call 0011 (copy procedure) restore registers cell division return jump 0010 1110 What happened

Memory filled up with copies, mutants appeared.

Smaller self-replicating mutants were favoured, because of the way CPU time was shared.

Then parasites appeared -- only 45 instructions long, not capable of self-replication but manage to 'borrow' the replication code of their neighbours

(-- organisms can read or execute others code). Parasites and hyperhyper--parasitesparasites …

An ecology of different organism types builds up.

Some immunity to parasites appears in some self- replicators

Hyper -parasites 'steal the instruction pointers‘ from parasites

Social parasites...

hyper-hyper-parasites...

etc etc... Experiments Hosts, red, are very common. Parasites, yellow, have appeared but are still rare. Hosts, are now rare because parasites have become very common. Immune hosts, blue, have appeared but are rare. Immune hosts are increasing in frequency, separating the parasites into the top of memory. Macro-dynamics

Tierra is a rich experimental domain for watching a diverse ecology grow, possible parallels to situations in the real world.

For each organism, the ' physical world ' consists of ' energy ' (CPU time = sunlight) and ' space ' in memory, which is limited.

But above all, the environment which affects their fitness includes the other organisms around. Creatures invent they own fitness function by adaptation to the biotic environment.

Emergent features: open-ended evolution affecting fitness function, size, shape, distribution, fragmentation, heterogeneity of programs (every aspects of programs is subject to evolution). Emergent ecology and explosion of diversity of behaviors. Tierra Summary

A framework for synthesis of life was presented

Open-ended evolution arises from an initial self- replicating ancestor

Emergence of Natural-like Ecology was observed

This work has been a fruitful source of ideas, has spawned a whole industry! Is Tierra Alive?

IT’S ALIVE!! References – Tierra

Tierra publications http://www.his.atr.co.jp/~ray/pubs/

More general on Tierra http://www.his.atr.co.jp/~ray/tierra References – Artificial Life