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

Slides:



Advertisements
Similar presentations
CPU Review and Programming Models CT101 – Computing Systems.
Advertisements

INSTRUCTION SET ARCHITECTURES
There are two types of addressing schemes:
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.
1 Digital Universes BARAK NAVEH, Next >< Previous.
TK 2633 Microprocessor & Interfacing
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.
Room: E-3-31 Phone: Dr Masri Ayob TK 2633 Microprocessor & Interfacing Lecture 1: Introduction to 8085 Assembly Language.
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.
SOFT COMPUTING (Optimization Techniques using GA) Dr. N.Uma Maheswari Professor/CSE PSNA CET.
Simulated Evolution in the Avida Virtual Machine Joshua Walgenbach I400/I590.
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:
Computer Architecture and Organization
Strategies and Rubrics for Teaching Chaos and Complex Systems Theories as Elaborating, Self-Organizing, and Fractionating Evolutionary Systems Fichter,
Chapter 10 Instruction Sets: Characteristics and Functions Felipe Navarro Luis Gomez Collin Brown.
Strategies and Rubrics for Teaching Chaos and Complex Systems Theories as Elaborating, Self-Organizing, and Fractionating Evolutionary Systems Fichter,
Computational Evolution & Digital Organisms A look at a subset of Artificial Life.
What is a program? A sequence of steps
JUMP, LOOP, AND CALL INSTRUCTIONS
F453 Module 8: Low Level Languages 8.2: Features of Low-Level Languages.
Computer Architecture. Instruction Set “The collection of different instructions that the processor can execute it”. Usually represented by assembly codes,
1 Computer System Overview Chapter 1. 2 Operating System Exploits the hardware resources of one or more processors Provides a set of services to system.
Chapter 12 Processor Structure and Function. Central Processing Unit CPU architecture, Register organization, Instruction formats and addressing modes(Intel.
Genetic Algorithm in TDR System
The Little man computer
Instruction sets : Addressing modes and Formats
Instruction set Architecture
Microprocessor Systems Design I
A Closer Look at Instruction Set Architectures
Introduction to 8086 Microprocessor
8086 Microprocessor.
Computer Organization & Assembly Language Chapter 3
Machine Independent Assembler Features
Microprocessor and Assembly Language
Microprocessor and Assembly Language
A Closer Look at Instruction Set Architectures
Machine control instruction
Assembly Language Programming Part 2
Microcomputer Programming
University of Gujrat Department of Computer Science
Assembly Lang. – Intel 8086 Addressing modes – 1
Evolutionary Algorithms
University of Gujrat Department of Computer Science
CSCE Fall 2013 Prof. Jennifer L. Welch.
Artificial Life Systems
Introduction to Intel IA-32 and IA-64 Instruction Set Architectures
Morgan Kaufmann Publishers Computer Organization and Assembly Language
Genetic Algorithms Artificial Life
Chapter 8 Central Processing Unit
Shift & Rotate Instructions)
BIC 10503: COMPUTER ARCHITECTURE
ECEG-3202 Computer Architecture and Organization
Chapter 9 Instruction Sets: Characteristics and Functions
Artificial Life Systems
ECEG-3202 Computer Architecture and Organization
CSCE Fall 2012 Prof. Jennifer L. Welch.
A Gentle introduction Richard P. Simpson
Unit-I 80386DX Architecture
Subroutines and the Stack
Process.
Some Assembly (Part 2) set.html.
Computer Operation 6/22/2019.
Chapter 10 Instruction Sets: Characteristics and Functions
Presentation transcript:

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

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

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

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

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

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

Tom Ray’s Tierra Project

The Creatures 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) The “genome” of a creature is the sequence of its machine instructions.

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

Each CPU Contains Performs fetch-decode-execute-inc(IP) cycle 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) Computations are probabilistic Mutations occur at some low rate 

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

Template Addressing 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) In Tierra, the jmp instruction uses a template instead of an absolute or relative address.

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

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

Instruction Set nop_0 | nop_1 no operation (template markers) or1 cx ^= 1 shl cx <<= 1 zero cx = 0 if_cz if cx==0 execute next instruction sub_ab | sub_ac cx = ax – bx | ax = ax - cx inc_a | inc_b | inc_c ax++ | bx++ | cx++ dec_c cx-- push_ax push ax on stack. (also bx cx dx versions) pop_ax pop top of stack into ax. (also bx cx dx versions) jmp move ip to template jmpb move ip backward to template call call a procedure ret return from a procedure mov_cd | mov_ab dx = cx | bx = ax mov_iab move instruction at address in bx to address in ax adr address of nearest template to ax adrb search backward for template adrf search forward for template mal allocate memory for daughter cell divide cell division

Memory Allocation Memory is circular. 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.

The Soup

Cellularity The cell membrane is defining its limits and preserving its structural integrity. 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

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

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

The Slicer Time sharing approximates parallelism. 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”. The power determines if selection favors large or small creatures power < 1: favors small power = 1: size neutral power < 1: favors large

Mortality - The Reaper At birth, processes enter the bottom of the Reaper queue. 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.

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

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

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

Flaws Flaws were originally conceived of as being analogous to metabolic reactions gone wrong, or producing side products 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

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

Ancestor 0080aaa Self-examination Reproduction Loop Copy Procedure 1111 find 0000 (start) -> bx find 0001 (end) -> ax calculate size -> cx Self-examination 1101 allocate daughter -> ax call 0011 (copy procedure) cell division jump 0010 Reproduction Loop 1100 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 Copy Procedure (coded by human)

Ancestor 0080aaa Self-examination Reproduction Loop Copy Procedure 1111 find 0000 (start) -> bx find 0001 (end) -> ax calculate size -> cx Self-examination 1101 allocate daughter -> ax call 0011 (copy procedure) cell division jump 0010 Reproduction Loop 1100 1100 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 Copy Procedure

Mutant Self-examination Reproduction Loop Copy Procedure 1111 find 0000 (start) -> bx find 0001 (end) -> ax calculate size -> cx Self-examination 1101 allocate daughter -> ax call 0011 (copy procedure) cell division jump 0010 Reproduction Loop 1110 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 Copy Procedure

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

Ancestor 0080aaa Parasite 0045aaa Self-exam Self-exam 1111 find 0000 (start) -> bx find 0001 (end) -> ax calculate size -> cx 1111 find 0000 (start) -> bx find 0001 (end) -> ax calculate size -> cx Reproduction Loop Reproduction Loop 1101 allocate daughter -> ax call 0011 (copy procedure) cell division jump 0010 1101 allocate daughter -> ax call 0011 (copy procedure) cell division jump 0010 1100 1110 Copy Procedure 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

calculate size -> cx allocate daughter -> ax Parasite 0045aaa 0080gai Self-exam 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 1111 find 0000 (start) -> bx find 0001 (end) -> ax calculate size -> cx Reproduction Loop 1101 allocate daughter -> ax call 0011 (copy procedure) cell division jump 0010 1110 Hyper Parasite!

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

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

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)

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

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

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

Demos of Other Artificial-Life Works Karl Sims Demetri Terzopoulos

Evolving Virtual Creatures Karl Sims ’94 Play

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

Thank You Good Luck

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