Top Banner
ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 10/11/2011 1 Lipyeow Lim -- University of Hawaii at Manoa
36

ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

Dec 27, 2015

Download

Documents

Hester Hunt
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

1

ICS 101 Fall 2011

Introduction to Artificial Intelligence

Asst. Prof. Lipyeow LimInformation & Computer Science Department

University of Hawaii at Manoa

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

Page 2: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

2

What is Artificial Intelligence ?

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

Page 3: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

3

What is human intelligence ?

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

Page 4: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

4

What are signs (activities, abilities etc) of human

intelligence ?

Exercise 1: Write down four examples in your worksheet

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

Page 5: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

5

Approaches to A.I.

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

Human-oriented Rationalist

Thinking

Acting

Thinking Humanly Thinking Rationally

Acting Humanly Acting Rationally

Page 6: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

6

Definitions of AI (a)• “The exciting new effort to make computer think ... machines

with minds, in the full and literal sense.” (Haugeland, 1985)

• “[The automation of] activities that associate with human thinking, activities such as decision-making, problem solving, learning ...” (Bellman, 1978)

• “The art of creating machines that perform functions that require intelligence when performed by people.” (Kurzweil, 1990)

• “The study of how to make computers do things, at the moment, people are better.” (Rich and Knight, 1991)

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

Page 7: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

7

Definitions of AI (b)• “The study of mental faculties through the use of

computational models.” (Charniak and McDermott, 1985)

• “The study of the computations that make it possible to perceive, reason, and act.” (Winston, 1992)

• “Computational Intelligence is the study of the design of intelligent agents.”(Poole et al., 1998)

• “AI ... is concerned with intelligent behavior in artifacts.” (Nilsson, 1998)

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

Page 8: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

8

Acting Humanly: Turing Test (1950)

• Operational test of intelligence• Anticipated all major arguments against AI in following 50 years• Suggested major components of AI: knowledge, reasoning,

language understanding, learning

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

Human Interrogator

Human

A.I.

?

Page 9: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

9

Thinking Humanly : Cognitive Science

• AI thinks like humans do• How do humans think ?• How can we find out ?

– Introspection– Psychological experiments– Brain imaging

• The goal is to formulate computer programs that mimic how humans think and hence achieve AI!

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

Page 10: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

10

Thinking Rationally• Aristotle: what are correct arguments/thought

processes?– Syllogism:

• Socrates is a man;• All men are mortal• Therefore Socrates is mortal

– Field of logic• AI programs represent knowledge using

formal logic and solves problems using logical inference/reasoning.

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

Page 11: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

11

Acting Rationally

• Acting rationally == doing the right thing• What is the “right thing” ?

– Logical / rational– maximize goal achievement, given the available

information• This approach is the focus of many AI efforts!• AI programs are rational agents : programs

that act so as to achieve the best outcome or best expected outcome

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

Page 12: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

12

AI Today• Robotic Vehicles: Google Self-Drive Car• Speech Recognition: Call routing, Call center• Autonomous planning: Mars Rover• Game Playing: Deep Blue, Watson• Spam Fighting• Logistic Planning: Dynamic Analysis &

Replanning Tool (DART)• Robotics : Roomba• Machine Translation10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

Page 13: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

13

Intelligent Agents

• Perceives its environment through sensors• Acts upon the environment through actuators• Percepts – perceptual input at any given instant• Agent program implements how to map a sequence of

percepts to an action

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

Agent

EnvironmentAgent

Program

Sensors

Actuators Actions

Percepts

Page 14: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

14

Example: Vacuum Robot

• Vacuum Robot (“agent”) needs to keep two rooms A & B clean. It can sense which room it is in and whether the carpet in that room is dirty. It can either go Right, go Left, or Suck.

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

A B

************ ************

Page 15: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

15

Example: Vacuum Robot Agent Program

Percept Sequence Action

[A,Clean] Go Right

[A, Dirty] Suck

[B, Clean] Go Left

[B, Dirty] Suck

[A, Clean], [A, Clean] Go Right

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

Agent

EnvironmentAgent Program

Sensors

Actuators Actions

PerceptsA B

********* *********

Page 16: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

16

Representation & Search• Newell & Simon argue that intelligent activity (human

or machine) is achieved by:

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

– Representing significant aspects of a problem using symbol patterns

– Generating potential solutions by applying operations on the representation

– Selecting a solution by searching among these possibilities

Page 17: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

17

Example: Tic-Tac-Toe• 2 Player Game: Each gets a symbol 0 or X• Each player tries to get 3 of his/her symbol in a

row/column/diagonal in a 3 by 3 grid.

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

Player A

X

0

X

0 X

X

0 X

0 X

0 X

0 X

X

Player B Player A Player B

Player A

Player A Wins !

Page 18: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

18

Example: State Space for Tic-Tac-Toe

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

x x x

x...x x

0 x 0 x x

0

x

0...

x

0

x

0

... ... ......

Page 19: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

19

Exercise • Draw the state space for the vacuum robot

starting from the following initial state for the next two state transitions.

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

A B

************ ************

Page 20: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

20

Podcast Supplement

Asst. Prof. Lipyeow LimInformation & Computer Science Department

University of Hawaii at Manoa

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

Page 21: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

21

Approaches to A.I.

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

Human-oriented Rationalist

Thinking

Acting

Thinking Humanly Thinking Rationally

Acting Humanly Acting Rationally

Page 22: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

22

Acting Humanly: Turing Test (1950)

• Operational test of intelligence• Anticipated all major arguments against AI in following 50 years• Suggested major components of AI: knowledge, reasoning,

language understanding, learning

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

Human Interrogator

Human

A.I.

?

Page 23: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

23

Thinking Humanly : Cognitive Science

• AI thinks like humans do• How do humans think ?• How can we find out ?

– Introspection– Psychological experiments– Brain imaging

• The goal is to formulate computer programs that mimic how humans think and hence achieve AI!

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

Page 24: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

24

Thinking Rationally• Aristotle: what are correct arguments/thought

processes?– Syllogism:

• Socrates is a man;• All men are mortal• Therefore Socrates is mortal

– Field of logic• AI programs represent knowledge using

formal logic and solves problems using logical inference/reasoning.

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

Page 25: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

25

Acting Rationally

• Acting rationally == doing the right thing• What is the “right thing” ?

– Logical / rational– maximize goal achievement, given the available

information• This approach is the focus of many AI efforts!

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

AI programs are rational agents : programs that act so as to achieve the best outcome or best expected outcome

Page 26: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

26

Intelligent Agents

• Perceives its environment through sensors• Acts upon the environment through actuators• Percepts – perceptual input at any given instant• Agent program implements how to map a sequence

of percepts to an action to achieve some goal

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

Agent

EnvironmentAgent

Program

Sensors

Actuators Actions

Percepts

Page 27: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

27

Example: Vacuum Robot (“Agent”)

• Goal/outcome: keep two rooms A & B clean. • Percepts: which room it is in and whether the

carpet in that room is dirty. • Actions: go Right, go Left, or Suck.

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

Agent

EnvironmentAgent Program

Sensors

Actuators Actions

PerceptsA B

********* *********

Page 28: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

28

Example: Vacuum Robot Agent Program

Percept Sequence Action

[A,Clean] Go Right

[A, Dirty] Suck

[B, Clean] Go Left

[B, Dirty] Suck

[A, Clean], [A, Clean] Go Right

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

Agent

EnvironmentAgent Program

Sensors

Actuators Actions

PerceptsA B

********* *********

Page 29: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

29

Example: Tic-Tac-Toe Agent

• Goal/outcome: Play by the rules and win• Percepts: the tic-tac-toe board and the

human’s move on the board.• Actions: put a “0” on any of the empty cell on

the board

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

Human Agent

0

X

Page 30: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

30

Example: Car Driving Agent

• Goal/outcome: Navigate and drive to destination safely obeying traffic rules

• Percepts: its own location, speed, direction, and location, speed, direction of nearby objects

• Actions: accelerate, decelerate, hardstop, turn x degrees left, turn x degrees right, maintain speed

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

Agent

EnvironmentAgent Program

Sensors

Actuators Actions

Percepts

Page 31: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

31

Representation & Search• Newell & Simon argue that intelligent activity

(human or machine) is achieved by:– Representing significant aspects of a problem

using symbol patterns– Generating potential solutions by applying

operations on the representation– Selecting a solution by searching among these

possibilities

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

Page 32: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

32

Example: Vacuum Robot

• State representation: – Cleanliness status of each room– Location of robot

• State Transitions (generating possibilities)– Triggered by actions of robot (L, R, S)

• Goal states (selecting solutions)– Any state where both rooms are clean

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

A B

***** *****Right

A B

*****

A B

*****Suck

A B

Suck

Page 33: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

33

Example: Vacuum Robot State Space

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

A B

***** *****

RA B

*****A B

*****

S

A B

SR

A B

**********

L

A B

*****

L

L

R

S

RA B

S

A B

*****

LL

S

R

R

L

L RS

S

L

R

Page 34: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

34

Example: Tic-Tac-Toe• State representation:

– Tic-tac-toe board– Location of X’s and 0’s

• State Transitions (generating possibilities)– Triggered by players putting

X/0 on empty cells• Goal states (selecting

solutions)– Any state where symbols form

a line10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

Player A

X

0

X

0 X

X

0 X

0 X

0 X

0 X

X

Player B Player A

Player B Player A

Player A Wins !

Page 35: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

35

Example: State Space for Tic-Tac-Toe

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa

x x x

x...x x

0 x 0 x x

0

x

0...

x

0

x

0

... ... ......

Page 36: ICS 101 Fall 2011 Introduction to Artificial Intelligence Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa.

36

Summary• Four different approaches to AI

– Acting vs Thinking– Human-oriented vs Rationalist

• Intelligent Agents– Sensors– Actuators– Agent Program

• Representation and Search– Representing the state of the problem– Generating the state space– Searching the state space for goal states

10/11/2011 Lipyeow Lim -- University of Hawaii at Manoa