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

Slides:



Advertisements
Similar presentations
Register In computer architecture, a processor register is a small amount of storage available on the CPU whose contents can be accessed more quickly than.
Advertisements

CPU Review and Programming Models CT101 – Computing Systems.
Chapter 7 Henry Hexmoor Registers and RTL
INSTRUCTION SET ARCHITECTURES
There are two types of addressing schemes:
CEN 226: Computer Organization & Assembly Language :CSC 225 (Lec#3) By Dr. Syed Noman.
The Little man computer
Contents Introduction Tierra system description Mac-tierra Results Discussion.
Computational Evolution & Digital Organisms A look at a subset of Artificial Life.
Introduction to Evolutionary Computation. Questions to consider during this lesson:  - How is digital evolution similar to biological evolution? How.
CSC 501 Lecture 2: Processes. Von Neumann Model Both program and data reside in memory Execution stages in CPU: Fetch instruction Decode instruction Execute.
TK 2633 Microprocessor & Interfacing
1 Chapter 13 Artificial Life: Learning through Emergent Behavior.
TK 2633 Microprocessor & Interfacing Lecture 3: Introduction to 8085 Assembly Language Programming (2) 1 Prepared By: Associate Prof. Dr Masri Ayob.
Room: E-3-31 Phone: Dr Masri Ayob TK 2633 Microprocessor & Interfacing Lecture 1: Introduction to 8085 Assembly Language.
CSCE 121, Sec 200, 507, 508 Fall 2010 Prof. Jennifer L. Welch.
1 Computer System Overview OS-1 Course AA
1 Lab Session-IV CSIT-120 Spring 2001 Lab 3 Revision and Exercises Rev: Precedence Rules Lab Exercise 4-A Machine Language Programming The “Micro” Machine.
Room: E-3-31 Phone: Dr Masri Ayob TK 2633 Microprocessor & Interfacing Lecture 1: Introduction to 8085 Assembly Language.
The Black Art of Evolution. Chrisantha Fernando Collegium Budapest 2005.
Gursharan Singh Tatla Block Diagram of Intel 8086 Gursharan Singh Tatla 19-Apr-17.
Unit-1 PREPARED BY: PROF. HARISH I RATHOD COMPUTER ENGINEERING DEPARTMENT GUJARAT POWER ENGINEERING & RESEARCH INSTITUTE Advance Processor.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.
The 8086 Microprocessor The 8086, announced in 1978, was the first 16-bit microprocessor introduced by Intel Corporation 8086 is 16-bit MPU. Externally.
Artificial Chemistries – A Review Peter Dittrich, Jens Ziegler, and Wolfgang Banzhaf Artificial Life 7: , 2001 Summarized by In-Hee Lee.
Demetris Kennes. Contents Aims Method(The Model) Genetic Component Cellular Component Evolution Test and results Conclusion Questions?
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
CS 484 – Artificial Intelligence1 Announcements Lab 3 due Tuesday, November 6 Homework 6 due Tuesday, November 6 Lab 4 due Thursday, November 8 Current.
Simulated Evolution in the Avida Virtual Machine Joshua Walgenbach I400/I590.
1 Chapter 13 Artificial Life: Learning through Emergent Behavior.
Dr. José M. Reyes Álamo 1.  Review: ◦ Statement Labels ◦ Unconditional Jumps ◦ Conditional Jumps.
Objective At the conclusion of this chapter you will be able to:
Genetic Algorithms Introduction Advanced. Simple Genetic Algorithms: Introduction What is it? In a Nutshell References The Pseudo Code Illustrations Applications.
1 Machine Learning: Lecture 12 Genetic Algorithms (Based on Chapter 9 of Mitchell, T., Machine Learning, 1997)
Chapter 2 Data Manipulation Yonsei University 1 st Semester, 2015 Sanghyun Park.
Computer Architecture and Organization
Strategies and Rubrics for Teaching Chaos and Complex Systems Theories as Elaborating, Self-Organizing, and Fractionating Evolutionary Systems Fichter,
Genetic Algorithms Genetic algorithms provide an approach to learning that is based loosely on simulated evolution. Hypotheses are often described by bit.
Cellular Automata FRES 1010 Eileen Kraemer Fall 2005.
Chapter 10 Instruction Sets: Characteristics and Functions Felipe Navarro Luis Gomez Collin Brown.
Processor Structure and Function Chapter8:. CPU Structure  CPU must:  Fetch instructions –Read instruction from memory  Interpret instructions –Instruction.
Strategies and Rubrics for Teaching Chaos and Complex Systems Theories as Elaborating, Self-Organizing, and Fractionating Evolutionary Systems Fichter,
Computer Organization Instruction Set Architecture (ISA) Instruction Set Architecture (ISA), or simply Architecture, of a computer is the.
Computational Evolution & Digital Organisms A look at a subset of Artificial Life.
What is a program? A sequence of steps
Simple ALU How to perform this C language integer operation in the computer C=A+B; ? The arithmetic/logic unit (ALU) of a processor performs integer arithmetic.
Chapter 7 Bit Manipulation. 7.1 Logical Operations.
Computer and Information Sciences College / Computer Science Department CS 206 D Computer Organization and Assembly Language.
Computer Architecture. Instruction Set “The collection of different instructions that the processor can execute it”. Usually represented by assembly codes,
Chapter 12 Processor Structure and Function. Central Processing Unit CPU architecture, Register organization, Instruction formats and addressing modes(Intel.
The Little man computer
Introduction to 8086 Microprocessor
Computer Organization & Assembly Language Chapter 3
Microprocessor and Assembly Language
Machine control instruction
Assembly Language Programming Part 2
University of Gujrat Department of Computer Science
Evolutionary Algorithms
University of Gujrat Department of Computer Science
Artificial Life Systems
Genetic Algorithms Artificial Life
BARAK NAVEH, Digital Universes < Previous Next > BARAK NAVEH,
Shift & Rotate Instructions)
ECEG-3202 Computer Architecture and Organization
CNET 315 Microprocessor & Assembly Language
Artificial Life Systems
ECEG-3202 Computer Architecture and Organization
Process.
Chapter 10 Instruction Sets: Characteristics and Functions
Presentation transcript:

1 Digital Universes BARAK NAVEH, Next >< Previous

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 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 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 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 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 Tom Ray’s Tierra Project

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 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 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 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 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 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 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 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 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 The Soup

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 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 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 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 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 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 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 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 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 Tierra System §Self replicating individuals §Genetic alterations §Natural selection §Co-evolution Results

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 restore registers return allocate daughter -> ax call 0011 (copy procedure) cell division jump 0010 Reproduction Loop Copy Procedure 1100 Ancestor 0080aaa (coded by human)

29

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 restore registers return allocate daughter -> ax call 0011 (copy procedure) cell division jump Self-examination Reproduction Loop Copy Procedure Ancestor 0080aaa 1100

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 restore registers return allocate daughter -> ax call 0011 (copy procedure) cell division jump Self-examination Reproduction Loop Copy Procedure Mutant

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

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 restore registers return 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

35

36

37

38

gai 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 allocate daughter -> ax call 0011 (copy procedure) cell division jumpb 0000 Reproduction Loop Copy Procedure 1100 Parasite 0045aaa Hyper Parasite!

40

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 allocate daughter -> ax call 001 (copy procedure) cell division jumpb 010 Reproduction Loop Copy Procedure move [bx] -> [ax] decrement cx if cx == 0 jumpb 110 increment ax & bx jumpb Social Hyper-parasite

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 More Info It’s life Jim, but not as we know it (Dr. McCoy, Star Trek)

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 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 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 Demos of Other Artificial-Life Works Karl Sims Demetri Terzopoulos

48 Evolving Virtual Creatures Karl Sims ’94 Play

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

50 Thank You Good Luck

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