63
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 11: Artificial Intelligence Computer Science: An Overview Tenth Edition by J. Glenn Brookshear Presentation files modified by Farn Wang

Chapter 11: Artificial Intelligence - 國立臺灣大學cc.ee.ntu.edu.tw/~farn/courses/BCC/NTUEE/slides/ch11.pdf · 2014-02-26 · Artificial intelligence - coining the buzzword John

  • Upload
    others

  • View
    17

  • Download
    0

Embed Size (px)

Citation preview

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Chapter 11:

Artificial Intelligence

Computer Science: An Overview

Tenth Edition

by

J. Glenn Brookshear

Presentation files modified by Farn Wang

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-2

Chapter 11: Artificial Intelligence

• 11.1 Intelligence and Machines

• 11.2 Perception

• 11.3 Reasoning

• 11.4 Additional Areas of Research

• 11.5 Artificial Neural Networks

• 11.6 Robotics

• 11.7 Considering the Consequences

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-3

Intelligent Agents

• Agent: A “device” that responds to stimuli

from its environment

– Sensors

– Actuators

• Much of the research in artificial

intelligence can be viewed in the context of

building agents that behave intelligently

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-4

Artificial intelligence

- coining the buzzword

John McCarthy, Dartmouth College

summer, 1956

• suggested a study of artificial intelligence

be carried out

• to explore the conjecture that every aspect

of learning or any other feature of

intelligence can in principle be so precisely

described that a machine can be made to

simulate it.

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-5

Levels of Intelligent Behavior

• Reflex: actions are predetermined

responses to the input data

– Is “kick on knocking” intelligent ?

– Is swimming intelligent ?

– Is bike riding intelligent ?

• More intelligent behavior requires

knowledge of the environment and

involves such activities as:

– Goal seeking

– Learning

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-6

Intelligence in reflexion

Look at the

center

wheel.

Tell me

what the

other

wheels

are doing ?

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-7

Intelligence in reflexion

Which cycles are rotating ?

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-8

Intelligence in reflexion

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-9

Intelligence in reflexion

What is

the color

of the

empty

dot ?

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-10

Intelligence in reflexion

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-11

Intelligence in reflexion

Which rectangle is

taller ?

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-12

Intelligence in reflexion

Which rectangle is

taller ?

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

What is intelligence ?

• It is needed in solving difficult problems

with no guaranteed solutions.

• It cannot be prescribed as a fixed set of

rules.

• It relies on common senses.

• It must be adaptive with learning

capabilities.

• It works most of the time, but may fail

occasionally.

11-13

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-14

The eight-puzzle

- a game needs multitudes of intelligence

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-15

Our puzzle-solving machine

• Taking photos of

the puzzle.

• Recognize the

configuration of the

puzzle.

• Compute the next

move.

• Move the tiles.

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-16

Approaches to Research in Artificial

Intelligence

• Engineering track

– Performance oriented

• Theoretical track

– Simulation oriented

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-17

Turing Test

• Test setup: Human interrogator

communicates with test subject by

typewriter.

• Test: Can the human interrogator

distinguish whether the test subject is

human or machine?

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-18

Techniques for Understanding Images

• Template matching

• Two steps approach:

– Image processing

• edge enhancement

• region finding

• smoothing

– Image analysis

• motion detection

• face recognization

• ……

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-19

Techniques for Understanding

Images for the puzzle

• Template matching

– 3-D pattern matching is difficult.

– restrictive and difficult to scale!

• Two steps approach:

– Image processing

– Image analysis

• to recognize a tile with different focal lengths and

angles.

• to recognize a number with various fonts and hand

writings.

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-20

Language Processing

• Syntactic Analysis

• Semantic Analysis

– knowledge representation

– knowledge retrieval

• Contextual Analysis

– interpretation of sentences according to

contexts

– common senses

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-21

Language Processing

Syntactic Analysis

Cinderella had a ball.

subject verb object.

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-22

Language Processing

Syntactic Analysis

Stampeding cattle can be dangerous.

subject ? verb

subject ?

object ?

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-23

Language Processing

Semantic Analysis

Mary gave John a birthday card.

John got a birthday card from Mary.

• knowledge representation

– how to represent the true meaning ?

• information retrieval

– key words ?

• information extraction

– frames, templates ?

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-24

A semantic net

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-25

Language Processing

Contextual Analysis

• interpretation of sentences according to

contexts

Cinderella had a ball.

Do you know what time it is ?

• common senses

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-26

Production Systems (Expert systems)

Components

1. Collection of states

– Start (or initial) state

– Goal state (or states)

2. Collection of productions: rules or moves

– Each production may have preconditions

3. Control system: decides which production

to apply next

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-27

Production Systems (Expert systems)

Components

1. Collection of states

2. Collection of productions: rules or moves

3. Control system: decides which production

to apply next

– genetic programming, neural networks,

– ant intelligence, fuzzy logics,

– non-monotonic logics

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-28

Reasoning by Searching

• State Graph: All states and productions

• Search Tree: A record of state transitions

explored while searching for a goal state

– Breadth-first search

– Depth-first search

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-29

A small portion of the eight-puzzle’s

state graph in backward reasoning

for breadth-first search

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-30

A small portion of the eight-puzzle’s

state graph in backward reasoning

for depth-first search

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-31

Deductive reasoning in the context of a

production system

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-32

An unsolved eight-puzzle

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-33

A sample search tree

- breadth-first search

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-34

A sample search tree

- depth-first search

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-35

Productions stacked for later

execution

- as a log

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-36

Heuristic Strategies

• Heuristic: A “rule of thumb” for making

decisions

• Requirements for good heuristics

– Must be easier to compute than a complete

solution

– Must provide a reasonable estimate of

proximity to a goal

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-37

An unsolved eight-puzzle

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-38

An algorithm for a control system

using heuristics

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-39

The beginnings of our heuristic

search

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-40

Figure 11.12 The search tree after

two passes

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-41

The search tree after three passes

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-42

The complete

search tree

formed by our

heuristic

system

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-43

Handling Real-World Knowledge

• Representation and storage

• Accessing relevant information

– Meta-Reasoning

– Closed-World Assumption

• Frame problem

– from animation

– how to move a table with the knowledge that

the glass on the table could fall and break.

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-44

Learning

• Imitation

• Supervised Training

• Reinforcement

• Evolutionary Techniques

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-45

Artificial Neural Networks

• Artificial Neuron

– Each input is multiplied by a weighting factor.

– Output is 1 if sum of weighted inputs exceeds

the threshold value; 0 otherwise.

• Network is programmed by adjusting

weights using feedback from examples.

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Neural networks

11-46

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-47

A neuron in a living biological system

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Neural networks

11-48

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Neural network configurations

11-49

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-50

The activities within a processing

unit

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-51

Representation of a processing unit

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-52

A neural network with two different

programs

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-53

An artificial neural network

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-54

Training an artificial neural network

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-55

Training an artificial neural network (continued)

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-56

Training an artificial neural network (continued)

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-57

Training an artificial neural network (continued)

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-58

The structure of ALVINN - Autonomous Land Vehicle in a Neural Net

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-59

Associative Memory

• Associative memory: The retrieval of

information relevant to the information at

hand

• One direction of research seeks to build

associative memory using neural networks

that when given a partial pattern, transition

themselves to a completed pattern.

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-60

An artificial neural network

implementing an associative

memory

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-61

The steps leading to a stable

configuration

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-62

Robotics

• Truly autonomous robots require progress

in perception and reasoning.

• Major advances being made in mobility

• Plan development versus reactive

responses

• Evolutionary robotics

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 11-63

Issues Raised by Artificial

Intelligence

• When should a computer’s decision be trusted over a human’s?

• If a computer can do a job better than a human, when should a human do the job anyway?

• What would be the social impact if computer “intelligence” surpasses that of many humans?