34
Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Embed Size (px)

Citation preview

Page 1: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science 5th Edition

Chapter 15

Artificial Intelligence

Page 2: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science, 5th Edition 2

Objectives

In this chapter, you will learn about:

• A division of labor

• Knowledge representation

• Recognition tasks

• Reasoning tasks

• Robotics

Page 3: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Introduction

• Artificial intelligence (AI) – Explores techniques for incorporating aspects of

intelligence into computer systems

• Turing test – Allows a human to interrogate two entities, both

hidden from the interrogator

Invitation to Computer Science, 5th Edition 33

Page 4: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science, 5th Edition 4

Figure 15.1 The Turing Test

Page 5: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

A Division of Labor

• Computational tasks– Adding a column of numbers– Sorting a list of numbers into numerical order– Searching for a given name in a list of names– Managing a payroll– Calculating trajectory adjustments for the space

shuttle

Invitation to Computer Science, 5th Edition 55

Page 6: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science, 5th Edition 6

A Division of Labor (continued)

• Recognition tasks– Recognizing your best friend– Understanding the spoken word– Finding the tennis ball in the grass in your backyard

Page 7: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science, 5th Edition 7

A Division of Labor (continued)

• Reasoning tasks– Planning what to wear today– Deciding on the strategic direction a company should

follow for the next five years– Running the triage center in a hospital emergency

room after an earthquake

Page 8: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science, 5th Edition 8

Figure 15.2 Human and Computer Capabilities

Page 9: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science, 5th Edition 9

Knowledge Representation

• Language schemes– Natural language– Formal language– Pictorial– Graphical

Page 10: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science, 5th Edition 10

Figure 15.3 A Semantic Net Representation

Page 11: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science, 5th Edition 11

Knowledge Representation (continued)

• Characteristics of knowledge representation scheme – Adequacy– Efficiency– Extendability

Page 12: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science, 5th Edition 12

Recognition Tasks

• Neuron– Cell capable of receiving stimuli, in the form of

electrochemical signals, from other neurons through its many dendrites

– Can send stimuli to other neurons through its single axon

• Artificial neural networks– Can be created by simulating individual neurons in

hardware and connecting them in a massively parallel network of simple devices

Page 13: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science, 5th Edition 13

Figure 15.4 A Neuron

Page 14: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science, 5th Edition 14

Figure 15.5 One Neuron with Three Inputs

Page 15: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science, 5th Edition 15

Figure 15.6 Neural Network Model

Page 16: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science, 5th Edition 16

Figure 15.7 A Simple Neural Network - OR Gate

Page 17: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science, 5th Edition 17

Figure 15.8 The Truth Table for XOR

Page 18: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science, 5th Edition 18

Figure 15.9 An Attempt at an XOR Network

Page 19: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science, 5th Edition 19

Recognition Tasks (continued)

• Neural network– Can learn from experience by modifying the weights

on its connections– Can be given an initial set of weights and thresholds

that is simply a first guess– Network is then presented with training data

• Back propagation algorithm– Eventually causes the network to settle into a stable

state where it can correctly respond to all inputs in the training set

Page 20: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science, 5th Edition 20

Reasoning Tasks

• Characteristic of human reasoning – Ability to draw on a large body of facts and past

experience to come to a conclusion

• Artificial intelligence specialists try to get computers to emulate this characteristic

Page 21: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science, 5th Edition 21

Intelligent Searching

• Decision tree for a search algorithm – Illustrates the possible next choices of items to

search if the current item is not the target

• Decision tree for sequential search is linear

• Classical search problem benefits from two simplifications– Search domain is a linear list– We seek a perfect match

Page 22: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science, 5th Edition 22

Figure 15.10 Decision Tree for Sequential Search

Page 23: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science, 5th Edition 23

Figure 15.11 Decision Tree for Binary Search

Page 24: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science, 5th Edition 24

Figure 15.12 A State-Space Graph with Exponential Growth

Page 25: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science, 5th Edition 25

Intelligent Searching (continued)

• Solution path – Takes us from the initial state to a winning

configuration, and the graph nodes along the way represent the intermediate configurations

• Brute force approach for a solution path – Traces all branches of the state-space graph

Page 26: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science, 5th Edition 26

Swarm Intelligence

• Swarm intelligence model – Uses simple agents that:

• Operate independently

• Can sense certain aspects of their environment

• Can change their environment

Page 27: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science, 5th Edition 27

Intelligent Agents

• Intelligent agent – Software technology designed to interact

collaboratively with a user somewhat in the mode of a personal assistant

• Examples– Personalized Web search engine– Web searcher that enables you to “vote” on each

article it sends you– Online catalog sales company that uses an agent to

monitor incoming orders and make suggestions

Page 28: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science, 5th Edition 28

Expert Systems

• Rule-based system – Attempts to mimic the human ability to engage

pertinent facts and string them together in a logical fashion to reach some conclusion

– Must contain these two components• A knowledge base

• An inference engine

• Modus ponens– Gives us a method for making new assertions

Page 29: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science, 5th Edition 29

• Forward chaining – Begins with assertions and tries to match those

assertions to the “if” clauses of rules

• Backward chaining – Begins with a proposed conclusion and tries to

match it with the “then” clauses of rules

Expert Systems (continued)

Page 30: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science, 5th Edition 30

Expert Systems (continued)

• Explanation facility– Allows the user to see the assertions and rules used

in arriving at a conclusion

• Knowledge engineering– Requires interaction with the human expert, much of

it in the domain environment

Page 31: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science, 5th Edition 31

Robotics

• Uses for robots in manufacturing, science, the military, and medicine– Assembling automobile parts– Packaging food and drugs– Placing and soldering wires in circuits– Bomb disposal– Welding– Radiation and chemical spill detection

Page 32: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science, 5th Edition 32

Robotics (continued)

• Two strategies characterize robotics research– Deliberative strategy: says that the robot must

have an internal representation of its environment– Reactive strategy: uses heuristic algorithms to

allow the robot to respond directly to stimuli from its environment

Page 33: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science, 5th Edition 33

Summary

• Artificial intelligence – Explores techniques that incorporate aspects of

intelligence into computer systems

• Categories of tasks– Computational, recognition, and reasoning

• Neural networks – Simulate individual neurons in hardware and connect

them in a massively parallel network

Page 34: Invitation to Computer Science 5 th Edition Chapter 15 Artificial Intelligence

Invitation to Computer Science, 5th Edition 34

Summary (continued)

• Swarm intelligence– Models the behavior of a colony of ants

• Intelligent agent interacts with a user

• Rule-based systems – Attempt to mimic the human ability to engage

pertinent facts and combine them in a logical way to reach some conclusion

• Robots can perform many useful tasks