cs 440 / ece 448 introduction to artificial intelligence spring 2010 instructor: eyal amir grad tas:...

32
CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri

Post on 22-Dec-2015

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil

CS 440 / ECE 448Introduction to Artificial Intelligence

Spring 2010

Instructor: Eyal Amir

Grad TAs: Wen Pu, Yonatan Bisk

Undergrad TAs: Sam Johnson, Nikhil Johri

Page 2: CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil

Artificial Intelligence (AI)

Reasoning

NaturalLanguage

Learning

Vision

Knowledge

DecisionMaking

Robotics

Page 3: CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil

AI Applications

Reasoning

NaturalLanguage

Learning

Vision

Knowledge

DecisionMaking

Robotics

Medicin

Econometrics

SocialScience

Databases

Networks

AutonomousVehicles

ElectronicCommerce

Page 4: CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil

Today

• Artificial Intelligence Applications

• Artificial Intelligence Basics

• What you think you know– Logic– Probabilities– AI– Search

Page 5: CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil

What is Artificial Intelligence?

• Examples:– Game playing? (chess)– Robots? (Roomba)– Learning? (Amazon)– Autonomous space crafts? (NASA)

• What should AI have?

Page 6: CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil

Saw in Yonatan’s Presentation

• Robotics

• Vision

• A little bit of Natural-Language Processing

Page 7: CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil

Game Playing: ChessMay 1997

2006: Anthony Cozzie’s (UIUC) ZAPPA wins World Computer-Chess Championship

Page 8: CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil

Decision Making: Scrabble

Daily Illini Feb 2007:Winning computer program created by graduate student beats world champion Scrabble player

(Graduate Student = Mark Richards)

Page 9: CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil

Collaborative Filtering

Page 10: CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil

Classification

Page 11: CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil

Planning

Page 12: CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil

DARPA Grand Challenge 2003-2007

Page 13: CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil

Econometrics Example: A Recession Model of a country

– What is probability of recession, when a bank(bm) goes into bankruptcy?

– Recession: Recession of a country in [0,1]– Market[X]: Quarterly market (X) index– Loss[X,Y]: Loss of a bank (Y) in a market (X)– Revenue[Y]: Revenue of a bank (Y)

Page 14: CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil

Social Networks• Example: school friendships and their effects

Friend(A,B)

Friend(A,C)

Friend(B,C)

Attr(A)

Attr(B)

Attr(C)

Measuremt(A)

Measuremt(B)

Measuremt(C)

))(),(),(),(),(),(),,(),,(),,(Pr( CmBmAmCaBaAaCBfCAfBAf

))(),(())(),(())(),((

))(),(),,(())(),(),,(())(),(),,((1

654

321

CdCaBdBaAdAa

CaBaCBfCaAaCAfBaAaBAfZ

(.)(.),(.,.), maf61...

shorthand for Friend(., .), Atrr(.), and Measuremt(.)

potential func tions

12

Page 15: CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil

bob;joef joe;

bobf

bob;tomf tom;

bobf

joe;tomf tom;

joef

bob;annf ann;

bobf

joe;annf ann;

joef

tom;annf ann;

tomf

bob;liaf lia;

bobf

joe;liaf lia;

joef

tom;liaf lia;

tomf

ann;liaf lia;

annf bob;

valf val;

bobf

joe;valf val;

joef

tom;valf val;

tomf

ann;valf val;

annf lia;

valf val;

liaf

bbob bannbtombjoe bvalbliahbob

hannhtom

hjoe

hval

hlia

Page 16: CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil

Application: Hardware Verification

AND not

notAND

f1

f2

f3

f4

f5

OR

x1

x2

x3

f5(x1,x2,x3) = a function of the input signal

Question: Can we set this boolean cirtuit to TRUE?

Page 17: CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil

Application: Hardware Verification

AND not

notAND

f1

f2

f3

f4

f5

OR

x1

x2

x3

f5(x1,x2,x3) = f3 f4 = f1 (f2 x3) =

(x1 x2) (x2 x3)

Question: Can we set this boolean cirtuit to TRUE?

SAT(f5) ?

M[x1]=FALSEM[x2]=FALSEM[x3]=FALSE

Page 18: CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil

Finding the “best” path between two points

• Classic computer science problem: many algorithms, applications

• “best” generally means minimizing some sort of cost

s

t

source

sink

each edge has somecost associated with it

10

cost of path generally sum etc. of cost of edges along path

10

10

10

Page 19: CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil

Stochastic setting

• Edges fail probabilistically

• Goal: find most reliable path

s

t

0.95 0.9

0.85

edge reliability

path reliability = 0.95 x 0.9 x 0.85 = 0.73

assumption: independent!!!

Directed Acyclic Graph G

not very realistic...

Page 20: CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil

Stochastic setting

• Consider a richer structure using a graphical model

s

t

e1e2

e3

binary random variables:1 if edge survives, 0 if edge fails

X(discrete) hidden variable

the hidden variable allows us to model correlations and dependencies between edge failures

Page 21: CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil

Stochastic setting

• Specified:– prior probability on X– conditional probabilities for each edge

s

t

e1e2

e3

X

Pr[X=1] = 0.4Pr[X=2] = 0.1Pr[X=3] = 0.2Pr[X=4] = 0.3

Pr[e1 survives | X=1] = 0.9Pr[e1 fails | X=1] = 0.1... etc.

Page 22: CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil

Stochastic setting

• Graphical model defines joint distribution:

Pr[X,e1,e2,e3,...]= Pr[X] Pr[e1|X] Pr[e2|X]...

• Reliability of path is marginal Pr[e1,e2,e3]

• Can compute by summing...

s

t

e1e2

e3

X

Page 23: CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil

Many applications

• Just to name a few:– Network QoS routing [citations]

links fail stochastically

routers fail stochastically

Failures are typically correlated: if two machines run the same version ofunpatched Windows, and one gets infected by a virus...

Page 24: CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil

Many applications

• Just to name a few:– Network QoS routing [citations]– Parsing w/ weighted FSAs

(from Smith + Eisner ACL’05 best paper)

FSA where edges have probabilities assigned to them

Page 25: CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil

Many applications

• Just to name a few:– Network QoS routing– Parsing w/ weighted FSAs– Robot navigation

e.g., DARPA Grand Challenge

Page 26: CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil

Motivation of AI

• Autonomous computers

• Embedded computers

• Programming by telling

• Human-like capabilities – vision, natural language, motion and manipulation

• Applications: learning, media, www, manipulation, verification, robots, cars, help for disabled, dangerous tasks

Page 27: CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil

Long-Term Goals

• Computers that can accept advice• Programs that process rich information

about the everyday world• Programs that can replace experts• Computer programs that can decide on

actions: control, planning, experimentation• Programs that combine knowledge of

different types and sources• Programs that learn

Page 28: CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil

Short-Term Goals

• Knowledge & reasoning – acquire, represent, use, answer questions

• Planning & decision making

• Diagnosis & analysis

• Learning, pattern recognition

• Inferring state of the world from sensors– Vision– Natural-language text

Page 29: CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil

What This Course Covers

• Major techniques in artificial intelligence– Search in large spaces and game search– Logical reasoning– Planning and sequential decision making– Knowledge representation - logic & probability– Probabilistic reasoning– Machine Learning– Robotic control, Stimulus-Response– Machine Vision

Page 30: CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil

What you should know

• Matrix Algebra

• Probability and Statistics

• Logic

• Data structures

• C++, Java, Python, or Matlab

Page 31: CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil

What You Will Know

• Matlab

• Building and reasoning with complex probabilistic and logical knowledge

• Build autonomous agents

• Create vision/sensing routines for simple detection, identification, and tracking

• Create programs that make decisions autonomously or semi-autonomously

Page 32: CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil

Administration

• Office Hours, Late policy, homework deadlines, syllabus, and how to make a home-cooked meal – check the website:

http://www.cs.uiuc.edu/class/cs440