Artificial Intelligence and Software that Learns and Evolves

107
1 Artificial Intelligence and Software that Learns and Evolves DIG 3563 – Fall 13 Dr. J. Michael Moshell University of Central Florida Adapted from A Special Presentation for Ajou University Autumn 2013 hplusmagazine.com

description

Artificial Intelligence and Software that Learns and Evolves. DIG 3563 – Fall 13 Dr. J. Michael Moshell University of Central Florida Adapted from A Special Presentation for Ajou University Autumn 2013. hplusmagazine.com. The Plan of the Lecture. - PowerPoint PPT Presentation

Transcript of Artificial Intelligence and Software that Learns and Evolves

Page 1: Artificial Intelligence and  Software that Learns and Evolves

1

Artificial Intelligence and Software that Learns and Evolves

DIG 3563 – Fall 13

Dr. J. Michael Moshell

University of Central Florida

Adapted from A Special Presentation

for Ajou University

Autumn 2013

hplusmagazine.com

Page 2: Artificial Intelligence and  Software that Learns and Evolves

-2 -

The Plan of the Lecture

0: What is a problem? What is intelligence?

1. The classical approach: logic and deduction

2. The knowledge-based approach: large databases

3. Cognitive science: models of human reasoning

4. Evolutionary Computing

Page 3: Artificial Intelligence and  Software that Learns and Evolves

-3 -

0: What is a Problem?

"Something that is difficult to deal with." (Dictionary definition)

Page 4: Artificial Intelligence and  Software that Learns and Evolves

-4 -

0: What is a Problem?

"Something that is difficult to deal with." (Dictionary definition)

For a small child, this is a problem:

Anna had $2.00. She spent $0.75 for candy.

How much money does Anna have now?

www.towngreendistrict.com

Page 5: Artificial Intelligence and  Software that Learns and Evolves

-5 -

0: What is a Problem?

"Something that is difficult to deal with." (Dictionary definition)

For a small child, this is a problem:

Anna had $2.00. She spent $0.75 for candy.

How much money does Anna have now?

For the President of the United States, this is a problem:

Can we change the laws so that everyone has a job,

and the economy grows in a safe, steady fashion?

www.nps.gov

Page 6: Artificial Intelligence and  Software that Learns and Evolves

-6 -

Classifying ProblemsProblems

Well-formulated problems other problems

clear goals mixed goals

limited action space infinite action space

clear rules rules are changing

Page 7: Artificial Intelligence and  Software that Learns and Evolves

-7 -

Classifying ProblemsProblems

Well-formulated problems other problems

clear goals mixed goals

limited action space infinite action space

clear rules rules are changing

Easy Tractible Intractible

problems problems problems

kardwell.com en.wikipedia.org artsbeat.blog.nytimes.com

Page 8: Artificial Intelligence and  Software that Learns and Evolves

-8 -

Tractible: definition

Easily handled or worked.

examples:

Wood is a tractible material for making furniture.

OPPOSITE: intractible

Titanium is an intractible material for making furniture.

bizchair.com

worldchair.com

Page 9: Artificial Intelligence and  Software that Learns and Evolves

-9 -

The Traveling Salesman Problem

A man must visit 50 cities. He must visit each city ONE TIME.

Find the shortest path for his travel.

Page 10: Artificial Intelligence and  Software that Learns and Evolves

-10 -

The Traveling Salesman Problem

A man must visit 50 cities. He must visit each city ONE TIME.

Find the shortest path for his travel.

A man must visit n cities. He must visit each city ONE TIME.

Find the shortest path for his travel. How long to compute?

Page 11: Artificial Intelligence and  Software that Learns and Evolves

-11 -

The Traveling Salesman Problem

A man must visit 50 cities. He must visit each city ONE TIME.

Find the shortest path for his travel.

A man must visit n cities. He must visit each city ONE TIME.

Find the shortest path for his travel. How long to compute?

time = k c n (for some constants k and c).

As n gets large, time gets VERY BIG VERY FAST

Page 12: Artificial Intelligence and  Software that Learns and Evolves

-12 -

The Traveling Salesman Problem

for k=1 microsecond

and c=2,

50 cities takes

313,000 hours or

35 years!

Page 13: Artificial Intelligence and  Software that Learns and Evolves

-13 -

Classifying ProblemsProblems

Well-formulated problems other problems

clear goals mixed goals

limited action space infinite action space

clear rules rules are changing

Easy Tractible Intractible In 1975:

problems problems problems

kardwell.com en.wikipedia.org artsbeat.blog.nytimes.com

Page 14: Artificial Intelligence and  Software that Learns and Evolves

-14 -

IBM's Deep BlueChess Playing Computer

In 1989, IBM's computer and programming

team defeated Garry Kasparov, world

chess champion.

It did not defeat the exponential time cost of chess.

It simply made k and c small enough, and explored more

futures than the human could.

ibm.com

en.wikipidia.org

Page 15: Artificial Intelligence and  Software that Learns and Evolves

-15 -

Classifying ProblemsProblems

Well-formulated problems other problems

clear goals mixed goals

limited action space infinite action space

clear rules rules are changing

Easy Tractible Intractible In 1990:

problems problems problems

kardwell.com en.wikipedia.org artsbeat.blog.nytimes.com

Page 16: Artificial Intelligence and  Software that Learns and Evolves

-16 -

Decision Trees and Exponential Time-Cost

Many problems are analyzed by building a decision tree

and seeking a path to a winning node. Here, n=9 (nine options)

en.wikipidia.org

trim-a-tree.co.uk

Page 17: Artificial Intelligence and  Software that Learns and Evolves

-17 -

Decision Trees and Exponential Time-Cost

If each decision leads to a growing tree of other decisions,

the time required to explore all the branches time = k c n

and that is too long

for anything but

very small n.

en.wikipidia.org

trim-a-tree.co.uk

Page 18: Artificial Intelligence and  Software that Learns and Evolves

-18 -

Heuristic: A plan tochoose options that are 'most likely to succeed'

Eliminate those branches that your heuristic function tells you

are not likely to succeed. Then expand the promising

ones.

en.wikipidia.org

trim-a-tree.co.uk

Page 19: Artificial Intelligence and  Software that Learns and Evolves

-19 -

Heuristic: A plan tochoose options that are 'most likely to succeed'

A simple heuristic from chess:

Do not exchange pieces

if you lose more pawn-units

than your opponent loses.

trim-a-tree.co.uk

Pawn=1 unit

Knight,Bishop=3 pawns

Rook=5 pawns

Queen=9 pawns

Page 20: Artificial Intelligence and  Software that Learns and Evolves

-20 -

Heuristic: A plan tochoose options that are 'most likely to succeed'

A simple heuristic from chess:

Do not exchange pieces

if you lose more pawn-units

than your opponent loses.

Example:

Do not exchange your queen

for two knights.

trim-a-tree.co.uk

Pawn=1 unit

Knight,Bishop=3 pawns

Rook=5 pawns

Queen=9 pawns

Page 21: Artificial Intelligence and  Software that Learns and Evolves

-21 -

Intelligence = Problem Solving Ability?

Most people agree that an intelligent agent

must be able to solve some problems (not all problems.)

However,

Many people feel that if you have a well-formed problem,

the hard work has already been done.

The BIG challenge is transforming a real-world

problem into a well-formed symbolic problem.

zmescience.com

Page 22: Artificial Intelligence and  Software that Learns and Evolves

-22 -

Natural Language: a great placeto find ill-formed problems

Imagine a computer program that could answer questions:

"Can a cat drive a car?"

Computer and Program

zmescience.com

worldoffemale.com

Page 23: Artificial Intelligence and  Software that Learns and Evolves

-23 -

Natural Language: a great placeto find ill-formed problems

Imagine a computer program that could answer questions:

"Can a cat drive a car?"

Computer and Program

"No. A cat has no hands and cannot drive a

car."

zmescience.com

Page 24: Artificial Intelligence and  Software that Learns and Evolves

-24 -

The Turing Test for Intelligence

Alan Turing was a British mathematician who

played a key role in World War II code-breaking

and helped to develop the digital computer.

He thought about intelligence

and proposed a test.

thocp.net

Page 25: Artificial Intelligence and  Software that Learns and Evolves

-25 -

The Turing Test for Intelligence

Is "mystery system" intelligent?

Ask questions via a Teletype machine.

Mystery

System

thocp.net

Is "mystery system" a human or

a machine? If you cannot accurately

decide (and it's a machine) then

the machine is intelligent.

Mystery

System

Page 26: Artificial Intelligence and  Software that Learns and Evolves

-26 -

The Turing Test for Intelligence

Has any system passed the Turing Test yet?

Ask Siri ...

Most people quickly conclude that Siri does not yet pass

the Turing Test. But it's getting better all the time...

scoopertino.com

www.apple.com

Page 27: Artificial Intelligence and  Software that Learns and Evolves

-27 -

1. The Classical (Logical) Approachto Artificial Intelligence

hci.stanford.edu/~winogradBasic concepts:

1. LOGIC is powerful enough to solve AI problems.

2. KNOWLEDGE must be represented in a formal system.

3. INFERENCE is the key mechanism to answer questions.

All humans will die.

John is a human

therefore, John will die.

Page 28: Artificial Intelligence and  Software that Learns and Evolves

-28 -

1. The Classical (Logical) Approachto Artificial Intelligence

hci.stanford.edu/~winogradKnowledge representation as a "semantic net"

of related concepts

en.wikipedia.org

Page 29: Artificial Intelligence and  Software that Learns and Evolves

-29 -

1. The Classical (Logical) Approachto Artificial Intelligence

hci.stanford.edu/~winogradExample: Terry Winograd's SHRDLU System

A "Toy world" of colored blocks (simulated by computer)

Questions and commands (in English):

1) Translate into formal propositions

2) Try to prove or disprove them

from the known facts.

3) Change system state if possible. University of Utah

Page 30: Artificial Intelligence and  Software that Learns and Evolves

-30 -

1. The Classical (Logical) Approachto Artificial Intelligence

hci.stanford.edu/~winogradExample: Terry Winograd's SHRDLU System

Person: Pick up a big red block

Computer: OK

Person: Grasp the pyramid

University of Utah

Page 31: Artificial Intelligence and  Software that Learns and Evolves

-31 -

1. The Classical (Logical) Approachto Artificial Intelligence

hci.stanford.edu/~winogradExample: Terry Winograd's SHRDLU System

Person: Pick up a big red block

Computer: OK

Person: Grasp the pyramid

Computer: I don't understand which

pyramid you mean.

(because there are two of them.) University of Utah

Page 32: Artificial Intelligence and  Software that Learns and Evolves

-32 -

1. The Classical (Logical) Approachto Artificial Intelligence

Example: Terry Winograd's SHRDLU System

Watch the SHRDLU movie (3 minutes 20 seconds of it)

University of Utah

Page 33: Artificial Intelligence and  Software that Learns and Evolves

-33 -

1. The Classical (Logical) Approachto Artificial Intelligence

hci.stanford.edu/~winogradExcitement! SHRDLU worked for Blocks World.

followed by

Disappointment: Most domains are MUCH harder.

Page 34: Artificial Intelligence and  Software that Learns and Evolves

-34 -

2. The Knowledge-Based Approach:

Doug Lenat's talk at Google: Brittle Software

(Lenat video: first 14 minutes)

Page 35: Artificial Intelligence and  Software that Learns and Evolves

-35 -

2. The Knowledge-Based Approach:

Key concept: Today we have brittle (easily broken) software

Danger: Power is in the hands of "smart idiots".

Examples of Cyc's successes:

Request: Find a picture of someone smiling

Cyc found picture of a man helping his daughter

take her first step

Request: Find something that could harm an airplane

Cyc located a video about an SA-7 missile

Page 36: Artificial Intelligence and  Software that Learns and Evolves

-36 -

2. The Knowledge-Based Approach:

LARGE databases of facts.

If SHRDLU's world was too small,

let's build a big world of knowledge.

Cyc Project – started in 1984 by Douglas Lenat

Estimated effort (1986): 250,000 rules

and 350 man-years of effott.

Up until now: >1 million rules, and no end in sight.

Page 37: Artificial Intelligence and  Software that Learns and Evolves

-37 -

2. The Knowledge-Based Approach:

LARGE databases of facts.

If SHRDLU's world was too small,

let's build a big world of knowledge.

Cyc Project – started in 1984 by Douglas Lenat

cYcorp distributes the OpenCyc 4.0 database (for free), with

~ 239,000 terms

~ 2,093,000 "triples" (rules) that attempt to represent

human common sense.

Page 38: Artificial Intelligence and  Software that Learns and Evolves

-38 -

2. The Knowledge-Based Approach:

cYcorp also has a private database with many

more assertions and rules, in the CycL language.

Example:

(#$isa #$BillClinton #$UnitedStatesPresident)

cycorp.org

Page 39: Artificial Intelligence and  Software that Learns and Evolves

-39 -

Cyc: An example of the complexity

University of Utah

cycorp.org

Page 40: Artificial Intelligence and  Software that Learns and Evolves

-40 -

Cyc: Method for Growing the Database

* Attempt to automatically read encyclopedia articles.

(enCYClopedia!)

* Analyze successes & failures

* Apply human "knowledge engineering" to improve rules

Page 41: Artificial Intelligence and  Software that Learns and Evolves

-41 -

Cyc example: Terrorism Database

* Analyze literature on terrorism

* Predict future events.

Success: predicted anthrax mailings, 6 months before 9/11

Miss: Predicted 1000 dolphins from Al-Qaeda to attack

Hoover Dam

www.usbr.gov

Page 42: Artificial Intelligence and  Software that Learns and Evolves

-42 -

Cyc: Status and Hope for the Future

Cyc will eventually become smart enough to teach itself.

The results thus far:

* Government sponsors basic research and terrorism database

* Some commercial applications are being tried.

Page 43: Artificial Intelligence and  Software that Learns and Evolves

-43 -

Cyc: Status and Hope for the Future

Cyc will eventually become smart enough to teach itself.

The results thus far:

* Government sponsors basic research and terrorism database

* Some commercial applications are being tried.

* Many people in the Artificial Intelligence community doubt

that Cyc will play a key role in successful AI

Why? It's too logical. Humans are inconsistent, emotional,

intuitive – they act on their FEELINGS --

Page 44: Artificial Intelligence and  Software that Learns and Evolves

-44 -

3. Cognitive Science –How Humans Think

wikimedia commons

Page 45: Artificial Intelligence and  Software that Learns and Evolves

-45 -

Philosophy:

Example: Mind-Body Problem

Is the mind part of the body? Or separate?

Metaphors:"The brain is a telephone switchboard""The brain is a computer"

Mind is software (can be changed)Brain is hardware (can be broken) New ideas on good and evil

Page 46: Artificial Intelligence and  Software that Learns and Evolves

-46 -

Philosophy:

Example: Deductive Logic

If A, and AB, then B

A: A Hyundai is a carB: Cars are made by humans

so: Hyundais are made by humans

Page 47: Artificial Intelligence and  Software that Learns and Evolves

-47 -

Philosophy:

Inductive logic:

If the events in class C are probable,and A is in class C, then

A is probable.

90% of humans are right-handed.Jack is a human.

so Jack is probably right-handed.

Page 48: Artificial Intelligence and  Software that Learns and Evolves

-48 -

Philosophy and Intelligence

If a thing is intelligent,

we expect it to use deductive logic

and inductive logic.

Page 49: Artificial Intelligence and  Software that Learns and Evolves

-49 -

Psychology:

wikipedia.org/mimory

Definition: Study of mental functions and behaviors

Example: Memory

Page 50: Artificial Intelligence and  Software that Learns and Evolves

-50 -

Psychology:

Definition: Study of mental functions and behaviors

Some types of long-term memory:Procedural (how to do something)

everyculture.com

Page 51: Artificial Intelligence and  Software that Learns and Evolves

-51 -

Psychology:

Definition: Study of mental functions and behaviors

Some types of long-term memory:Procedural (how to do something)Topographic (where am I, where am I going)

mycharlois.com

Page 52: Artificial Intelligence and  Software that Learns and Evolves

-52 -

Psychology:

Definition: Study of mental functions and behaviors

Some types of long-term memory:Procedural (how to do something)Topographic (where am I, where am I going)Episodic (what happened)

fleetowners.com

Page 53: Artificial Intelligence and  Software that Learns and Evolves

-53 -

Psychology:

Definition: Study of mental functions and behaviors

Some types of long-term memory:Procedural (how to do something)Topographic (where am I, where am I going)Episodic (what happened)Semantic (facts, definitions, abstract knowledge)

en.wikipedia.org

Page 54: Artificial Intelligence and  Software that Learns and Evolves

-54 -

Psychology:

Definition: Study of mental functions and behaviors

Some types of long-term memory:Procedural (how to do something)Topographic (where am I, where am I going)Episodic (what happened)Semantic (facts, definitions, abstract knowledge)Visual (I've seen this before)

bic.org

Page 55: Artificial Intelligence and  Software that Learns and Evolves

-55 -

Psychology:

Definition: Study of mental functions and behaviors

Some types of long-term memory:Procedural (how to do something)Topographic (where am I, where am I going)Episodic (what happened)Semantic (facts, definitions, abstract knowledge)Visual (I've seen this before)Emotional (things I loved or hated) gofamilyperks.com

Page 56: Artificial Intelligence and  Software that Learns and Evolves

-56 -

Psychology:

If a thing is intelligent,

we expect it to need (and have)most of the types of memorythat humans have.

Why? (back to Philosophy!)

Page 57: Artificial Intelligence and  Software that Learns and Evolves

-57 -

Psychology:

If a thing is intelligent,

we expect it to need (and have)most of the types of memorythat humans have.

Why? Inductive logic."Most of the intelligent creatures we have

seen, had these kinds of memory".

Page 58: Artificial Intelligence and  Software that Learns and Evolves

-58 -

Linguistics: ScientificStudy of Language

Key insight: Analogies carry meaning.

Definition: An analogy is a comparison of twosystems. If you understand system A, it can helpyou to understand system B.

Analogy

Simile Metaphor

Page 59: Artificial Intelligence and  Software that Learns and Evolves

-59 -

Linguistics: ScientificStudy of Language

Key insight: Analogies carry meaning.

Definition: An analogy is a comparison of twosystems. If you understand system A, it can helpyou to understand system B.

Analogy: "The motor of a car is likea horse pulling a wagon."

Simile Metaphor

Page 60: Artificial Intelligence and  Software that Learns and Evolves

-60 -

Linguistics: ScientificStudy of Language

Key insight: Analogies carry meaning.

Definition: An analogy is a comparison of twosystems. If you understand system A, it can helpyou to understand system B.

Analogy: "His mother was a tiger!"

Simile Metaphor

Page 61: Artificial Intelligence and  Software that Learns and Evolves

-61 -

Linguistics: ScientificStudy of Language

Key insight: Analogies carry meaning.Science is based on analogies.

Example: Bohr's "Solar system" model of the atom.

ou.orgwikipediaorg

Page 62: Artificial Intelligence and  Software that Learns and Evolves

-62 -

Linguistics:

If a thing is intelligent,

we expect that it will understand and usea natural language (like English orKorean).

and we expect that it will make and useanalogies to extend and communicateits knowledge.

Page 63: Artificial Intelligence and  Software that Learns and Evolves

-63 -

AI and Cognitive Science:Marvin Minsky makes

an analogy

Minsky's theory of mind:

The mind is like a complex software system.

The pieces of this software system will interact

in ways that are different from traditional software.

They will interact like a "society".

Page 64: Artificial Intelligence and  Software that Learns and Evolves

-64 -

AI and Cognitive Science:Marvin Minsky makes

an analogy

Minsky's theory of mind:

• A mind is a large collection of small agents

• They compete for control of the

‘front office’ (consciousness)

The ‘all or none’ theory. You can’t half walk and half sit.

• Many of these agents are working at any time

Page 65: Artificial Intelligence and  Software that Learns and Evolves

-65 -

Interior Grounding, Reflection and Self-Consciousness

* A woman named Joan is crossing the street.A car sounds its horn.

Page 66: Artificial Intelligence and  Software that Learns and Evolves

-66 -

Interior Grounding, reflection and Self-Consciousness

* A story about a woman crossing the street.

•Reaction: Joan reacted quickly to that sound.

•Identification: She recognized it as being a sound.

•Characterization: She classified it as the sound of a car.

•Attention: She noticed certain things rather than others.

•Indecision: She wondered whether to cross or retreat.

Page 67: Artificial Intelligence and  Software that Learns and Evolves

-67 -

Interior Grounding, reflection and Self-Consciousness

* A story about a woman crossing the street.

•Reaction: Joan reacted quickly to that sound.

•Identification: She recognized it as being a sound.

•Characterization: She classified it as the sound of a car.

•Attention: She noticed certain things rather than others.

•Indecision: She wondered whether to cross or retreat.

•Imagining: She envisioned some possible future conditions.

•Selection: She selected a way to choose among options.

•Decision: She chose one of several alternative actions.

•Planning: She constructed a multi-step action-plan.

•Reconsideration: Later she reconsidered this choice.

Page 68: Artificial Intelligence and  Software that Learns and Evolves

-68 -

Marvin Minsky:Interior Grounding, Reflection and Self-Consciousness

* These processes can be classified something like this

.. which is similar to

Freud’s model:

Page 69: Artificial Intelligence and  Software that Learns and Evolves

-69 -

Marvin Minsky:Interior Grounding, reflection and Self-Consciousness

Page 70: Artificial Intelligence and  Software that Learns and Evolves

-70 -

Minsky doesn’t like the ‘bottom-up’ idea

that sensations (alone) could lead to higher thought.

He believes

in a rich set

of built-in

capabilities.

The details

of which

language, what

culture, what

house and street

are learned by each individual.

Page 71: Artificial Intelligence and  Software that Learns and Evolves

-71 -

Minsky's Influence

"Societies of Mind" has not yet led to a working AI system

.. but Minsky's early work led to the study of Neural Nets

(our next topic)

Page 72: Artificial Intelligence and  Software that Learns and Evolves

-72 -

5. Neural Nets, Perception and Learning

Page 73: Artificial Intelligence and  Software that Learns and Evolves

-73 -

4. Artificial Evolution

Nature "learns" by creating new species.

Can we model that process, to solve problems?

bio100.nicerweb.net

Page 74: Artificial Intelligence and  Software that Learns and Evolves

-74 -

Evolutionary Computing:* Reviewing Genetics

• Sexual reproduction has a big payoff. What is it?

( In other words: why are males worth having?)

Observation: bacteria and viruses without SR

have evolved several mechanism for swapping DNA.

It’s almost as if the fundamental underlying

metaphor for life is a flea market.

www.ryctx.org

Page 75: Artificial Intelligence and  Software that Learns and Evolves

-75 -

Evolutionary Computing:* Genetics Reviewed

KNOWN BEFORE DNA was discovered:

• The genome is a (very) long sequence of Genes

• Each gene controls the production of one kind of protein

• Proteins are catalysts for chemical reactions

as well as the ‘structural steel’ of living organisms.

A GENE represents a finite alphabet of choices.

The various versions of a gene are called alleles.

If there are 10 ways to make collagen, there would be

10 alleles for the collagen gene.

Page 76: Artificial Intelligence and  Software that Learns and Evolves

-76 -

Genotype and Phenotype

• Genotype: your collection of genes

Phenotype: your ‘rendering’ – your

actual body, as built.

• Genes, encoded in DNA, are organized into chromosomes

• Individual humans have 23 pairs of chromosomes

• When reproducing,

each parent randomly

contributes one of the

two chromosomes to

the child.

Page 77: Artificial Intelligence and  Software that Learns and Evolves

-77 -

Genotype and Phenotype

Mom Dad

1 X X

2 X X

3 X X

... 23 X X

Page 78: Artificial Intelligence and  Software that Learns and Evolves

-78 -

Genotype and Phenotype

Mom Dad

1 X X

2 X X

3 X X

... 23 X X

Page 79: Artificial Intelligence and  Software that Learns and Evolves

-79 -

Genotype and Phenotype

Mom Dad

1 X X

2 X X

3 X X

... 23 X X

Page 80: Artificial Intelligence and  Software that Learns and Evolves

-80 -

Genotype and Phenotype

Mom Dad

1 X X

2 X X

3 X X

... 23 X X .. it’s a GIRL!

A given pair of parents can

produce 223 ~= 8 million

different genetic combinations.

Page 81: Artificial Intelligence and  Software that Learns and Evolves

-81 -

Why does this system pay such big dividends?

• The gene pool is a toolkit of variations.

• Consider melanin. Assume variations from black to brown

in various versions of the melanin gene.

• Your tribe moves from Africa to Europe.

• Your random genome remix produces kids of various shades.

The ones with lighter skin get more vitamin D and thrive.

They have more kids. The light-skin gene increases in the

gene pool. Feedback loop.

Page 82: Artificial Intelligence and  Software that Learns and Evolves

-82 -

Why does this system pay such big dividends?

• The gene pool is a toolkit of variations.

• Consider melanin. Assume variations from black to brown

in various versions of the melanin gene.

• Your tribe moves from Africa to Europe.

• Your random genome remix produces kids of various shades.

The ones with lighter skin get more vitamin D and thrive.

They have more kids. The light-skin gene increases in the

gene pool. Feedback loop.

NOTE: You didn’t have to INVENT the variation (mutation).

You had it stored away in your toolkit (genome).

Mutation (creation of new alleles or genes) is MUCH slower

than selection among existing alleles.

You need BOTH mechanisms.

Page 83: Artificial Intelligence and  Software that Learns and Evolves

-83 -

Mutation – the big Disaster/Opportunity

• Mutations are rare and usually fatal

• A copying error occurs in a chromosome

- some DNA is duplicated

- some DNA is deleted

- one codon (and its amino acid) replaces another

• Some mutations are beneficial but most are fatal or neutral (now)

• A slightly different kind of hemoglobin might not kill you

but might turn out to be BETTER, against some parasite

that attacks your great great great .... grandchildren

Page 84: Artificial Intelligence and  Software that Learns and Evolves

-84 -

Diversity yields robustness

• The environment produces an infinite suite of challenges.

• A rich gene pool provides instant options to try.

• A narrow gene pool is a ticket to extinction (florida panthers.)

• Hybrid vigor is a concept that every farmer knows.

Cross Hereford and Angus cows; calves grow faster.

Page 85: Artificial Intelligence and  Software that Learns and Evolves

-85 -

Diversity yields robustness

• The environment produces an infinite suite of challenges.

• A rich gene pool provides instant options to try.

• A narrow gene pool is a ticket to extinction (florida panthers.)

• Hybrid vigor is a concept that every farmer knows.

Cross Hereford and Angus cows; calves grow faster.

It’s like NAFTA or the European Union.

Win-win really is possible! Your kids will survive better

if your partner’s tool-set complements rather

than replicates your own.

Page 86: Artificial Intelligence and  Software that Learns and Evolves

-86 -

Unnatural selection

• To build a “learning system” we need three things:

-a genotype (a coded representation)

-a phenotype (a rendering into a ‘real world’ of competition)

-a fitness function (something to measure and kill the losers)

Page 87: Artificial Intelligence and  Software that Learns and Evolves

-87 -

Unnatural selection

• To build a “learning system” we need three things:

-a genotype (a coded representation)

-a phenotype (a rendering into a ‘real world’ of competition)

-a fitness function (something to measure and kill the losers)

Is a self-replicating robot without a genome impossible?

That is not proven. But all examples thus far are trivial.

(Crystal growth)

www.dpchallenge.com

Page 88: Artificial Intelligence and  Software that Learns and Evolves

-88 -

A Genotype for Mini-Robots

• Karl Sims decided to use a graph-theory genome

• It is applied twice: once for body, once for nervous system

• A random pool of 300 genomes is built

-they are pre-selected by removing:

- creatures with more than N body parts

- creatures whose body parts interpenetrate (share space)

- Rules of the universe are established; e. g. gravity, a floor

- Goal (fitness function) is set: e. g. radius crawled in 1 minute.

-Run simulation. Keep best 1/5 of population (60 individuals)

Re-mix genes to replace the 240 who died.

Run the simulation again.

Page 89: Artificial Intelligence and  Software that Learns and Evolves

-89 -

A Genotype for Mini-Robots

• Some of the goals:

- radial distance traveled

- linear distance traveled

- distance swum (or flown) through fluid medium

- speed of approach toward a moving target point

- competition to capture a shared object

Page 90: Artificial Intelligence and  Software that Learns and Evolves

-90 -

A Genotype for Mini-Robots

• Some of the goals:

- radial distance traveled

- linear distance traveled

- distance swum (or flown) through fluid medium

- speed of approach toward a moving target point

- competition to capture a shared object

Competitive events: how do you pair them up?

- n x n takes n2 time, and is too slow (each sim is slow!)

- pairwise often means playing against an idiot.

- n vs. best-of-last-round seemed to work well.

Page 91: Artificial Intelligence and  Software that Learns and Evolves

-91 -

A Genotype for Mini-Robots

• Some of the goals:

- radial distance traveled

- linear distance traveled

- distance swum (or flown) through fluid medium

- speed of approach toward a moving target point

- competition to capture a shared object

Competitive events: how do you pair them up?

- n x n takes n2 time, and is too slow (each sim is slow!)

- pairwise often means playing against an idiot.

- n vs. best-of-last-round seemed to work well.

One-species versus two-species (breeding populations)

Page 92: Artificial Intelligence and  Software that Learns and Evolves

-92 -

NOW watch the movie at

http://www.youtube.com/watch?v=JBgG_VSP7f8

www.dpchallenge.com

Page 93: Artificial Intelligence and  Software that Learns and Evolves

-93 -

A Genotype for Mini-Robots

• So ... how was this done?

NODE and LINK

(The names are just

to help us think.)

Example 1:

From a segment,

link to two other segments.

Repeat any number

of times, recursively.

Example 1:

Page 94: Artificial Intelligence and  Software that Learns and Evolves

-94 -

A Genotype for Mini-Robots

• So ... how was this done?

NODE and LINK

(The names are just

to help us think.)

Example 2:

From a body segment,

link to one other body seg.

and two leg segments.

From a leg segment

link once to another leg segment.

Example 2:

Page 95: Artificial Intelligence and  Software that Learns and Evolves

-95 -

A Genotype for Mini-Robots

• So ... how was this done?

NODE and LINK

(The names are just

to help us think.)

Example 3:

From a body,

link to a head & four limbs.

From a limb, link to another limb.

www.dpchallenge.com

Example 3:

Page 96: Artificial Intelligence and  Software that Learns and Evolves

-96 -

Brains and bodies

• Each sensor is contained in a specific body part

• Sensors measure joint angles, forces, properties of the world

• The brain is a network of neurons – (but not like real ones)

• Neurons’ functions include: sum, product, sum-threshold,

greater than, .... sin, cos, log, integrate, differentiate,

... smooth, memory, oscillate-wave, oscillate-sawtooth

Page 97: Artificial Intelligence and  Software that Learns and Evolves

-97 -

Neurons in Segments

• P0, P1 are photosensors

• C0 and Q0 are contact sensors

• E0 and E1 are effectors (joint angle drivers)

The connections are evolved, not reasoned out.

(There is a graph genome for the neurons, too.)

Page 98: Artificial Intelligence and  Software that Learns and Evolves

-98 -

Neurons in Segments

• P0, P1 are photosensors

• C0 and Q0 are contact sensors

• E0 and E1 are effectors (joint angle drivers)

The connections are evolved, not reasoned out.

(There is a graph genome for the neurons, too.)

Page 99: Artificial Intelligence and  Software that Learns and Evolves

-99 -

Neurons in Segments

• A single shared neuron

group is also provided.

(“where” is it? Unspecified)

This capability allows for

coordinated control.

Page 100: Artificial Intelligence and  Software that Learns and Evolves

-100 -

Neurons in Segments

• A single shared neuron

group is also provided.

(“where” is it? Unspecified)

This capability allows for

coordinated control.

The saw and wav oscillators

are key elements.

Page 101: Artificial Intelligence and  Software that Learns and Evolves

-101 -

What Changes in each Generation?

• NOTE: The system mixes sexual reproduction with mutation

in an un-biological way: mutation occurs in every generation.

MUTATION

1. Internal parameters (weights, oscillation frequencies) are

randomly altered. Small alterations more likely than big ones.

2. A new random node is added to graph. (May not connect; will be

discarded if not.)

3. New random connections are added, existing ones are removed.

4. Unconnected elements are garbage-collected.

Outside (morphology) graphs are altered, then inside (neuro) ones.

Page 102: Artificial Intelligence and  Software that Learns and Evolves

-102 -

What Changes in each Generation?

MATING the GRAPHS

a. Crossover operation.

A subset of parent 2 is inserted to replace a subset of parent 1

Page 103: Artificial Intelligence and  Software that Learns and Evolves

-103 -

What Changes in each Generation?

MATING the GRAPHS

a. Crossover operation.

A subset of parent 2 is inserted to replace a subset of parent 1

Page 104: Artificial Intelligence and  Software that Learns and Evolves

-104 -

What Changes in each Generation?

MATING the GRAPHS

b. Grafting operation.

Two parents are joined together (each loses one node)

Page 105: Artificial Intelligence and  Software that Learns and Evolves

-105 -

Results- Interbreeding populations often converge to uniformity, but

- Successive runs often produce totally different results.

- Swimming produced:

- paddles

- tail wagglers

- specialized scullers

- lots of flippers

- water snakes

Page 106: Artificial Intelligence and  Software that Learns and Evolves

-106 -

Results- Interbreeding populations often converge to uniformity, but

- Successive runs often produce totally different results.

- Walking produced:

- corner-walkers

- rocking blocks

- inchworms

- legs

- hoppers

Light-following worked in

walking and swimming

environments.

Page 107: Artificial Intelligence and  Software that Learns and Evolves

-107 -

What happened next?- not much (at least, nothing so spectacular as Sims’ creatures.)

Why?

- The leap from simple goal-seeking motor activity (“tropisms”) to

interesting perception and cognition is verrrrrry looooong.

- Folks like Brooks and Minsky’s successors are trying

to bridge the gap.

- Fundamental insights are still needed.