artificial life - university of birmingham · definition of artificial life • artificial life...

39
Introduction to Natural Computation Lecture 19 Artificial Life Alberto Moraglio Artificial Life

Upload: phunganh

Post on 15-Aug-2019

229 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

Introduction to Natural Computation

Lecture 19

Artificial Life

Alberto Moraglio

Artificial Life

Page 2: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

Part I

Introduction to Artificial LifeIntroduction to Artificial Life

Page 3: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

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.materials between the organism and its surroundings.

• The biochemical approach defines living systems by their capability to store hereditary information in nucleic acids.

• The evolutionary definition focuses on the process of evolution as the central defining characteristic of living systems.

Page 4: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

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?– Biology is restricted to study a specific instance of

2005-10-20 4

• Why Artificial Life?– Biology 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.

Page 5: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

Non-carbon-based media

• Wetware: synthetic self-reproducing chemical systems, etc.

• Hardware: some autonomous robots

• Software: electronic life forms living in a • Software: electronic life forms living in a computer’s memory

Page 6: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

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 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.

Page 7: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

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 complex living forms arise?

• How do intelligent living forms emerge?

• How do sociality and language arise?

Page 8: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

Emergence

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

2005-10-20 8

behaviors of the components

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

Page 9: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

A-Life vs Artificial Intelligence

Artificial Life Artificial IntelligenceConcept : Late 1980s Concept : 1960s

Both seem to approach similar problems, but…

Grounded in Biology, Physics, Chemistry, Mathematics.

Pursued primarily in Comp. Sci, Engineering & Psychology.

Studies Intelligence as part of Life itself

Studies Intelligent behavior in isolation

Bottom-Up approach - study synthesis

Top-Down approach - focus is on results

Page 10: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

A-Life : Current research areas

• Cellular Automata

• Neural Networks

• Evolutionary Algorithms

• Origin, Self-organization, Repair and Replication

• Evolutionary / Adaptive Dynamics

• Autonomous, Adaptive and Evolving Robots• 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

Page 11: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

Weak vs. Strong A-Life

• Weak A-life: which claims that simulations 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 • 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.

Page 12: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

Part II

An Approach to the Synthesis of LifeAn Approach to the Synthesis of Life

Page 13: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

They are both alive!

Tom Ray Tierra

Page 14: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

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 • Can a computer play chess? Yes, but not like a

human

• Can software be alive? Yes, but not like a living

being!?

Page 15: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

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 • Synthetic life should self replicate, and evolve

structures or processes that were not

designed in or preconceived by the creator.”

Page 16: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

Evolution in a Nutshell

• Ingredients of evolution:

– Self-replication (inheritance)

– Errors in the copy (variation)

– Competition for limited resources (selection)– Competition for limited resources (selection)

• Outcome of evolution: adaptation to the environment

• Co-evolution: environment changes continuously as it is made up of evolving (changing) organisms

Page 17: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

Are evolutionary algorithms alive?

• EAs are not open-ended. They are designed to solve a given problem.

• Each genome has a predefined set of genes and each a predefined set of alleles.

• Mutation, recombination, replication and selection are • 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 (natural selection).

Page 18: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

Are self-rep cellular automata alive?

Chris Langton's cellular automaton ' 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.

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

Page 19: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

Are computer viruses alive?

• Evolution of Computer Viruses:1. Simple

2. Self-recognition

3. Stealth

4. Armoured

5. Polymorphic5. 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!

Page 20: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

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.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).

Page 21: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

Redcode

Page 22: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

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 – Variation: the MOV command, which copy instructions from a place to another, is flawed with some probability

• 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

Page 23: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

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.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 nature emerge spontaneously.

Page 24: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

Energy

Territory

Natural lifeNatural life

Memory

CPU time

TierraTierra

Abiotic environment

Amino acids

Genome Program

Assembler instructions

Operating system

Page 25: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

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 • Flaws can occur during execution. The result is

off by ±1 at some low frequency

• Creatures activity scramble the soup

Page 26: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

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.

Page 27: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

Tierra Language

• Special machine language designed to be robust

• Small but computational complete instruction set

(32 instructions)

• No operands: it uses stack (push and pop) and • 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

Page 28: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

nop_0 no op pop_ax pop into axnop_1 pop_bxor1 flip bit of cx pop_cxsh1 shift left cx pop_dxzero zero cx jmp to templateif_cz if zero jmpb backwardsub_ab call call proceduresub_ac ret return

Instruction Set

sub_ac ret returninc_a mov_cdinc_b mov_abdec_c mov_iab mov instrninc_c adr adrs of templpush_ax onto stack adrb search backwdpush_bx adrf search fwdpush_cx mal alloc memorypush_dx divide 'SPLIT'

Page 29: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

self exam

find 0000 [start]→ bx

find 0001 [end] → ax

calculate size → cx

1111

copy procedure

Save registers to stack

1100

1010

move |bx| → |ax|

decrement cx

if cx==0 jump 0100

Ancestor

reproduction loop

Allocate daughter → ax

jump 0010

1101

call 0011 (copy procedure)

cell division return

1110

if cx==0 jump 0100

increment ax & bx

jump 0101

restore registers

1011

Page 30: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

Memory filled up with copies, mutants appeared.

Smaller self-replicating mutants were favoured, because

of the way CPU time was shared.

What happened

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).

Page 31: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

Parasites and hyperParasites and hyper--parasites …parasites …

An ecology of different organism types builds up.

Some immunity to parasites appears in some self-

replicators

Hyper-parasites 'steal the instruction pointers‘ from Hyper-parasites 'steal the instruction pointers‘ from

parasites

Social parasites...

hyper-hyper-parasites...

etc etc...

Page 32: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

ExperimentsHosts, red, are very common. Parasites, yellow,

have appeared but are still rare.

Page 33: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

Hosts, are now rare because parasites have become very common.

Immune hosts, blue, have appeared but are rare.

Page 34: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

Immune hosts are increasing in frequency,

separating the parasites into the top of memory.

Page 35: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

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

Macro-dynamics

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.

Page 36: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

Tierra SummaryTierra Summary

A framework for synthesis of life was presented

Open-ended evolution arises from an initial self-

replicating ancestorreplicating ancestor

Emergence of Natural-like Ecology was observed

This work has been a fruitful source of ideas, has

spawned a whole industry!

Page 37: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

Is Tierra Alive?

IT’S ALIVE!!

Page 38: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

Tierra publications

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

More general on Tierra

http://www.his.atr.co.jp/~ray/tierra

References References –– TierraTierra

http://www.his.atr.co.jp/~ray/tierra

Page 39: Artificial Life - University of Birmingham · Definition of Artificial Life • Artificial Life (A-life) is “the study of man-made systems that exhibit behaviors characteristic

References – Artificial Life