Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Digital Universes BARAK NAVEH, www.cs.bgu.ac.il/~barnav Next >< Previous.

Similar presentations


Presentation on theme: "1 Digital Universes BARAK NAVEH, www.cs.bgu.ac.il/~barnav Next >< Previous."— Presentation transcript:

1 1 Digital Universes BARAK NAVEH, www.cs.bgu.ac.il/~barnav Next >< Previous

2 2 Evolution in Other Contexts medium of carbon chemistry §Life on Earth is a product of evolution by natural selection operating in the medium of carbon chemistry. evolution is not limited §However, in theory, evolution is not limited to Earth, nor to carbon chemistry. may occur on other planets may also operate in other media medium of digital computation §Just as it may occur on other planets, it may also operate in other media, such as the medium of digital computation.

3 3 Carbon-Based Organization organizationgenerated by evolution §The organization generated by evolution spans about twelve orders of magnitude of scale. §from the molecular to the ecosystem level.

4 4 Evolution in Organic Medium §Organic life uses energy organizes matter §Organic life uses energy and organizes matter. § Evolution on Earth has organized matter from the molecular level up to the ecosystem level.

5 5 Evolution in Digital Medium develop §Can we use evolution to develop such organization? CPU-time organize memory §Can life use CPU-time to organize memory? synthesize digital life §Can we use evolution to synthesize digital life?

6 6 What is Life ? § No clear definition. § We will regard to an object as alive if it is §Self-replicating open-ended evolution §Capable of open-ended evolution

7 7 Tom Ray’s Tierra Project

8 8 The Creatures machine code programs §Self-replicating machine code programs. §Why machine code? (most natural to the machine) §Machine instructions remind us of amino acids because they are “chemically active”. (actively manipulate bits, bytes, CPU registers) genomethe sequence of its machine instructions §The “genome” of a creature is the sequence of its machine instructions.

9 9 The Environment – Tierra VM §Why Virtual Machine? l Avoid the threat of evolving hostile code such as viruses or worms. machine languages are fragilemutation or recombination almost certain to completely break program l Von Neumann type machine languages are fragile, any mutation or recombination event is almost certain to completely break program. l To make it especially hospitable to synthetic life. parallel computer §Tierra is a (simulated) parallel computer l with a processor for each creature.

10 10 Each CPU §Contains 2 address registers + 2 numeric registers Small Stack + Stack pointer Instruction pointer Flags register to indicate error conditions §Performs fetch-decode-execute-inc(IP) cycle §Has a simple instruction set for Arithmetics, bit manipulation Moving data between registers and RAM Control “instruction pointer” (IP) probabilistic §Computations are probabilistic MutationsMutations occur at some low rate 

11 11 The Tierran Language five bits §32 instructions represented by five bits, operands included. §Numeric operands eliminated l Instruction set need not include all possible integers. l CPU registers and stack are the only operands of instructions. l Bit flipping and shifting is used to synthesize numbers. §Errors that cause instructions to fail make them have no effect.

12 12 Template Addressing jmp §Numeric operands are normally used to specify addresses, such as absolute or relative addresses for jmp instruction. §Numeric operands were eliminated (another method is needed) jmp template §In Tierra, the jmp instruction uses a template instead of an absolute or relative address.

13 13 Template Addressing §Templates are “borrowed” from molecular biology. §Molecules “address” one another by having complementary shapes. §Templates are complementary patterns §Templates are complementary patterns of zeros and ones. nopnop0nop1 §Templates are built from two kinds of nop instructions: nop0 and nop1

14 14 Template Addressing jmpnop0nop0nop1 §The instruction sequence: jmp nop0 nop0 nop1 nop1nop1nop0 §causes execution of the program to jump to the nearest occurrence of the instruction sequence: nop1 nop1 nop0 complementarity §Why use complementarity? jmp l so that the jmp will never jump to itself.

15 15 Instruction Set nop_0 | nop_1no operation (template markers) or1cx ^= 1 shlcx <<= 1 zerocx = 0 if_czif cx==0 execute next instruction sub_ab | sub_accx = ax – bx | ax = ax - cx inc_a | inc_b | inc_cax++ | bx++ | cx++ dec_ccx-- push_axpush ax on stack. (also bx cx dx versions) pop_axpop top of stack into ax. (also bx cx dx versions) jmpmove ip to template jmpbmove ip backward to template callcall a procedure retreturn from a procedure mov_cd | mov_abdx = cx | bx = ax mov_iabmove instruction at address in bx to address in ax adraddress of nearest template to ax adrbsearch backward for template adrfsearch forward for template malallocate memory for daughter cell dividecell division

16 16 Memory Allocation the “soup” §The Tierran computer operates on a block of RAM of the real computer, referred to as the “soup”. §The soup consisted of 60,000 bytes, which can hold 60,000 Tierran machine- instructions. §Each “creature” occupies some area in the soup. §Memory is circular §Memory is circular.

17 17 The Soup

18 18 Cellularity cell membrane §The cell membrane is defining its limits and preserving its structural integrity. analog to cell membrane §In digital organisms we need an analog to cell membrane in order to prevent them from demolishing one another easily when they come into contact

19 19 Cellularity (cont.) exclusive write privileges §Each Tierran creature has exclusive write privileges within its own memory may examine execute can NOT overwrite §A creature may examine the code of another creature, and even execute it, but it can NOT overwrite it.

20 20 Cellularity and Division write privileges §Creature has write privileges to: mother cell l The memory block it is born with (mother cell). mal daughter cell l The memory block it may allocate using mal instruction (daughter cell), which may be used to grow or to reproduce into. divide §Upon creature divide instruction: mother cell loses write privileges l The mother cell loses write privileges on daughter cell’s. daughter cell is given its own CPU l The daughter cell is given its own CPU and can allocate its own second memory block.

21 21 The Slicer §Time sharing approximates parallelism. in proportion to the size of the creature slicer-power §The number of instructions to be executed in each slice may be set in proportion to the size of the creature being executed, raised to a “slicer-power”. favors large or small §The power determines if selection favors large or small creatures power < 1: favors small power = 1: size neutral power < 1: favors large

22 22 Mortality - The Reaper processes enter the bottom Reaper queue §At birth, processes enter the bottom of the Reaper queue. kills processes at the top §When the memory is full, the Reaper kills processes at the top of the queue. §Memory allocated to the dead process is reclaimed. §The code of a dead process is NOT removed from the soup.

23 23 The Reaper (cont.) error §When a process generates an error, it moves one position up the Reaper queue. §Successful dividemal §Successful execution of divide or mal moves the process one position down. §Overall effect: l Flown creatures rise to queue top and die. l Vigorous creatures have a greater longevity. l The probability of death increases with age.

24 24 Mutations §Two kinds of mutations of machine instructions: single bitis flipped l a single bit of an instruction is flipped l random replacements l random replacements - the affected instruction is replaced by one of the 32 instructions in the set, chosen at random §Mutations occur when: l a process is born l code is copied from place to place l any time at random (cosmic ray)

25 25 Gene Splicing §There are three classes of splicing: l Crossover l Insertion l Deletion §Each class can occur in two ways: l Anywhere l Anywhere in the genome segment boundaries l Only at “segment boundaries”, marked by templates applied to a daughter at the time of birth §Gene splicing is applied to a daughter process at the time of birth

26 26 Flaws §Flaws were originally conceived of as being analogous to metabolic reactions gone wrong, or producing side products errors in the operations of the machine instructions §Flaws are “intentional” errors in the operations of the machine instructions §Most flaws are errors of magnitude + or – 1 Increment/decr may add/sub 2 or 0 instead of 1 Instructions shifting or rotating bits in registers may shift the bits one place too much or too little

27 27 Tierra System §Self replicating individuals §Genetic alterations §Natural selection §Co-evolution Results

28 28 1111 find 0000 (start) -> bx find 0001 (end) -> ax calculate size -> cx Self-examination save registers to stack 1010 move [bx] -> [ax] decrement cx if cx == 0 jump 0100 increment ax & bx jump 0101 1011 restore registers return 1110 1101 allocate daughter -> ax call 0011 (copy procedure) cell division jump 0010 Reproduction Loop Copy Procedure 1100 Ancestor 0080aaa (coded by human)

29 29

30 30 1111 find 0000 (start) -> bx find 0001 (end) -> ax calculate size -> cx save registers to stack 1010 move [bx] -> [ax] decrement cx if cx == 0 jump 0100 increment ax & bx jump 0101 1011 restore registers return 1110 1101 allocate daughter -> ax call 0011 (copy procedure) cell division jump 0010 1100 Self-examination Reproduction Loop Copy Procedure Ancestor 0080aaa 1100

31 31 1111 find 0000 (start) -> bx find 0001 (end) -> ax calculate size -> cx save registers to stack 1010 move [bx] -> [ax] decrement cx if cx == 0 jump 0100 increment ax & bx jump 0101 1011 restore registers return 1110 1101 allocate daughter -> ax call 0011 (copy procedure) cell division jump 0010 1110 Self-examination Reproduction Loop Copy Procedure Mutant

32 32 1111 find 0000 (start) -> bx find 0001 (end) -> ax calculate size -> cx 1101 allocate daughter -> ax call 0011 (copy procedure) cell division jump 0010 1110 Self-examination Reproduction Loop Parasite 0045aaa

33 33 Ancestor 0080aaa Self-exam 1111 find 0000 (start) -> bx find 0001 (end) -> ax calculate size -> cx save registers to stack 1010 move [bx] -> [ax] decrement cx if cx == 0 jump 0100 increment ax & bx jump 0101 1011 restore registers return 1110 1101 allocate daughter -> ax call 0011 (copy procedure) cell division jump 0010 Reproduction Loop Copy Procedure 1100 Self-exam 1111 find 0000 (start) -> bx find 0001 (end) -> ax calculate size -> cx 1101 allocate daughter -> ax call 0011 (copy procedure) cell division jump 0010 Reproduction Loop 1110 Parasite 0045aaa

34 34

35 35

36 36

37 37

38 38

39 39 0080gai Self-exam 1111 find 0000 (start) -> bx find 0001 (end) -> ax calculate size -> cx 1101 allocate daughter -> ax call 0011 (copy procedure) cell division jump 0010 Reproduction Loop 1110 Self-exam 1111 find 0000 (start) -> bx find 0001 (end) -> ax calculate size -> cx 1010 move [bx] -> [ax] decrement cx if cx == 0 jumpb 1100 increment ax & bx jumpb 0101 1110 allocate daughter -> ax call 0011 (copy procedure) cell division jumpb 0000 Reproduction Loop Copy Procedure 1100 Parasite 0045aaa Hyper Parasite!

40 40

41 41 ?? 0061acg Self-examination 110 find 001 (start) -> bx find 000 (end) -> ax calculate size -> cx 1010 move [bx] -> [ax] decrement cx if cx == 0 jumpb 110 increment ax & bx jumpb 0101 111 allocate daughter -> ax call 001 (copy procedure) cell division jumpb 010 Reproduction Loop Copy Procedure 1100 1010 move [bx] -> [ax] decrement cx if cx == 0 jumpb 110 increment ax & bx jumpb 0101 111 Social Hyper-parasite

42 42 Other Results §Immunity §Immunity to parasites §Circumvention of immunity §Circumvention of immunity to parasites §Cheaters §Cheaters (e.g., 0027aab) l Abuse the cooperation of social hyper-parasites §Novel forms of self examination §Optimization l Size decrease l Loop unrolling §Emergence of Ecology

43 43 More Info www.isd.atr.co.jp/~ray/tierra/index.html It’s life Jim, but not as we know it (Dr. McCoy, Star Trek)

44 44 Related Works §Network Tierra §Network Tierra (T. Ray) l Connect many machines together to form a bigger “soup”. Avida §“Avida” (Adami, Brown, 94), similar idea but l On a grid (locality) l I/O and (limited) ability to train organisms to perform functions l Active research Amoeba §“Amoeba” (Pargellis, 96), similar idea l Simpler instruction set l Spontaneous emergence of self-replicators

45 45 Related Works (cont.) Physis §“Physis” (A. Egri-Nagy, ‘03) l Evolves both: VM and programs l Encodes the computer together with the program String Based Tierra §“String Based Tierra” (K. Sigiura, ‘03) strings l Encodes programs into strings reg-expr l Uses reg-expr rules to match-and-substitute (to compute) l Rules are strings as well l Evolve programs and their rules as a single individual

46 46 Open Challenges creature complexity has stopped increasing §Why creature complexity has stopped increasing? §What’s limiting further development? §Over 10 years have passed: x10,000 l Memory space can support x10,000 bigger soup x100 l CPUs can crunch x100 faster l In many cases “more is different” – is it here?

47 47 Demos of Other Artificial-Life Works Karl Sims Demetri Terzopoulos

48 48 Evolving Virtual Creatures Karl Sims ’94 Play

49 49 Evolving a Swimmer Go Fish Jack Cousto Evolving Artificial Fish Demetri Terzopoulos ’94-’99

50 50 Thank You Good Luck

51 51 We will NOT try to do §Computer viruses and worms §Core Wars §Evolutionary simulations with artificial fitness and selection §Pre-biotic conditions from which life may emerge spontaneously


Download ppt "1 Digital Universes BARAK NAVEH, www.cs.bgu.ac.il/~barnav Next >< Previous."

Similar presentations


Ads by Google