12/2/06 1 hofstra university - csc005 chapter 13 artificial intelligence

46
1 Hofstra University - CSC005 12/2/06 Chapter 13 Artificial Intelligence

Upload: gwen-newton

Post on 17-Dec-2015

218 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

1Hofstra University - CSC00512/2/06

Chapter 13

Artificial Intelligence

Page 2: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

2Hofstra University - CSC00512/2/06

Chapter Goals

Distinguish between the types of problems that humans do best and those that computers do best

Explain the Turing test

Define what is meant by knowledge representation and demonstrate how knowledge is represented in a semantic network

Page 3: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

3Hofstra University - CSC00512/2/06

Chapter Goals

Develop a search tree for simple scenarios

Explain the processing of an expert system

Explain the processing of biological and artificial neural networks

List the various aspects of natural language processing

Explain the types of ambiguities in natural language comprehension

Page 4: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

4Hofstra University - CSC00512/2/06

Thinking Machines

A computer can do some things better --and certainly faster--than a human can

Adding a thousand four-digit numbersCounting the distribution of letters in a bookSearching a list of 1,000,000 numbers for duplicatesMatching finger prints

Page 5: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

5Hofstra University - CSC00512/2/06

Thinking Machines

BUT a computer would have difficulty pointing out the cat in this picture, which is easy for a human

Artificial intelligence (AI) The study of computer systems that attempt to model and apply the intelligence of the human mindFigure 13.1 A computer might have trouble

identifying the cat in this picture.

Page 6: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

6Hofstra University - CSC00512/2/06

Thinking Machines

Danny Hillis

Page 7: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

7Hofstra University - CSC00512/2/06

The Turing Test

In 1950 English mathematician Alan Turing wrote a landmark paper that asked the question: Can machines think?

How will we know when we’ve succeeded?

The Turing test is used to empirically determine whether a computer has achieved intelligence

Page 8: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

8Hofstra University - CSC00512/2/06

The Turing Test

Figure 13.2 In a Turing test, the interrogator must determine which respondent is the computer and which is the human

Page 9: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

9Hofstra University - CSC00512/2/06

The Turing Test

Weak equivalence Two systems (human and computer) are equivalent in results (output), but they do not arrive at those results in the same way

Strong equivalence Two systems (human and computer) use the same internal processes to produce results

HAL 9000

Page 10: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

10Hofstra University - CSC00512/2/06

Knowledge

“To realize that our knowledge is ignorance, This is a noble insight. To regard our ignorance as knowledge, This is mental sickness.”

- Lao Tzu, 4th Century BC

Page 11: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

11Hofstra University - CSC00512/2/06

Knowledge Representation

The knowledge needed to represent an object or event depends on the situation

There are many ways to represent knowledge

Natural languageThough natural language is very descriptive, it doesn’t lend itself to efficient processing

Page 12: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

12Hofstra University - CSC00512/2/06

Semantic Networks

Semantic network A knowledge representation technique that focuses on the relationships between objects

A directed graph is used to represent a semantic network or net

Vertices represent concepts; edges represent relations between concepts

Page 13: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

13Hofstra University - CSC00512/2/06

Semantic Networks

Page 14: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

14Hofstra University - CSC00512/2/06

Semantic Networks

The relationships that we represent are completely our choice, based on the information we need to answer the kinds of questions that we will face

The types of relationships represented determine which questions are easily answered, which are more difficult to answer, and which cannot be answered

Page 15: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

15Hofstra University - CSC00512/2/06

Semantic Web

A project to create a universal medium for information exchange by putting documents with computer-processable meaning (semantics) on the World Wide Web.

“I have a dream for the Web [in which computers] become capable of analyzing all the data on the Web – the content, links, and transactions between people and computers. A ‘Semantic Web’, which should make this possible, has yet to emerge, but when it does, the day-to-day mechanisms of trade, bureaucracy and our daily lives will be handled by machines talking to machines. The ‘intelligent agents’ people have touted for ages will finally materialize.”

-Tim Berners-Lee, 1999

Page 16: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

16Hofstra University - CSC00512/2/06

Search Trees

Search tree A structure that represents all possible moves in a game, for both you and your opponent

The paths down a search tree represent a series of decisions made by the players

Page 17: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

17Hofstra University - CSC00512/2/06

Search Trees

Figure 13.4 A search tree for a simplified version of Nim

Page 18: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

18Hofstra University - CSC00512/2/06

Search Trees

Search tree analysis can be applied nicely to other, more complicated games such as chess

Because these trees are so large, only a fraction of the tree can be analyzed in a reasonable time limit, even with modern computing power

Page 19: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

19Hofstra University - CSC00512/2/06

Search Trees

Techniques for searching trees• Depth-first A technique that involves the

analysis of selected paths all the way down the tree

• Breadth-first A technique that involves the analysis of all possible paths but only for a short distance down the tree

Breadth-first tends to yield the best results

(navel-gazing kills!)

Page 20: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

20Hofstra University - CSC00512/2/06

Search Trees

Page 21: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

21Hofstra University - CSC00512/2/06

Expert Systems

Knowledge-based system A software system that embodies and uses a specific set of information from which it extracts and processes particular pieces

Expert system A software system based on the knowledge of human experts in a specialized field

An expert system uses a set of rules to guide its processingThe inference engine is the part of the software that determines how the rules are followed

Page 22: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

22Hofstra University - CSC00512/2/06

Expert Systems

Example: What type of treatment should I put on my lawn?

NONE—apply no treatment at this time

TURF—apply a turf-building treatment

WEED—apply a weed-killing treatment

BUG—apply a bug-killing treatment

FEED—apply a basic fertilizer treatment

WEEDFEED—apply a weed-killing and fertilizer combination treatment

Page 23: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

23Hofstra University - CSC00512/2/06

Expert Systems

Boolean variables

BARE—the lawn has large, bare areas

SPARSE—the lawn is generally thin

WEEDS—the lawn contains many weeds

BUGS—the lawn shows evidence of bugs

Page 24: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

24Hofstra University - CSC00512/2/06

Expert Systems

Some rules

if (CURRENT – LAST < 30) then NONE

if (SEASON = winter) then not BUGS

if (BARE) then TURF

if (SPARSE and not WEEDS) then FEED

if (BUGS and not SPARSE) then BUG

if (WEEDS and not SPARSE) then WEED

if (WEEDS and SPARSE) then WEEDFEED

Page 25: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

25Hofstra University - CSC00512/2/06

Expert Systems

An execution of our inference engineSystem: Does the lawn have large, bare areas?User: NoSystem: Does the lawn show evidence of bugs?User: NoSystem: Is the lawn generally thin?User: YesSystem: Does the lawn contain significant weeds?User: YesSystem: You should apply a weed-killing and fertilizer combination treatment.

Page 26: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

26Hofstra University - CSC00512/2/06

Artificial Neural Network

Attempts to mimic the actions of the neural networks of the human body

Let’s first look at how a biological neural network works

A neuron is a single cell that conducts a chemically-based electronic signalAt any point in time a neuron is in either an excited or inhibited state

Page 27: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

27Hofstra University - CSC00512/2/06

Artificial Neural Network

A series of connected neurons forms a pathwayA series of excited neurons creates a strong pathwayA biological neuron has multiple input tentacles called dendrites and one primary output tentacle called an axonThe gap between an axon and a dendrite is called a synapse

Page 28: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

28Hofstra University - CSC00512/2/06

Artificial Neural Network

Figure 13.6 A biological neuron

Page 29: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

29Hofstra University - CSC00512/2/06

Artificial Neural Network

A neuron accepts multiple input signals and then controls the contribution of each signal based on the “importance” the corresponding synapse gives to it

The pathways along the neural nets are in a constant state of flux

As we learn new things, new strong neural pathways in our brain are formed

Page 30: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

30Hofstra University - CSC00512/2/06

Artificial Neural Networks

Each processing element in an artificial neural net is analogous to a biological neuron

An element accepts a certain number of input values and produces a single output value of either 0 or 1Associated with each input value is a numeric weight

Page 31: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

31Hofstra University - CSC00512/2/06

Artificial Neural Networks

The effective weight of the element is defined to be the sum of the weights multiplied by their respective input values

v1*w1 + v2*w2 + v3*w3

Each element has a numeric threshold value

If the effective weight exceeds the threshold, the unit produces an output value of 1

If it does not exceed the threshold, it produces an output value of 0

Page 32: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

32Hofstra University - CSC00512/2/06

Artificial Neural Netoworks

Page 33: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

33Hofstra University - CSC00512/2/06

Artificial Neural Networks

The process of adjusting the weights and threshold values in a neural net is called training

A neural net can be trained to produce whatever results are required

Page 34: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

34Hofstra University - CSC00512/2/06

Natural Language Processing

There are three basic types of processing going on during human/computer voice interaction

Voice recognition—recognizing human wordsNatural language comprehension—interpreting human communicationVoice synthesis—recreating human speech

Common to all of these problems is the fact that we are using a natural language, which can be any language that humans use to communicate

Page 35: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

35Hofstra University - CSC00512/2/06

Voice Synthesis

There are two basic approaches to the solutionDynamic voice generation Recorded speech

Dynamic voice generation A computer examines the letters that make up a word and produces the sequence of sounds that correspond to those letters in an attempt to vocalize the word

Phonemes The sound units into which human speech has been categorized

Page 36: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

36Hofstra University - CSC00512/2/06

Voice Synthesis

Figure 13.7 Phonemes for American English

Page 37: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

37Hofstra University - CSC00512/2/06

Voice Synthesis

Recorded speech A large collection of words is recorded digitally and individual words are selected to make up a message

Telephone voice mail systems often use this approach: “Press 1 to leave a message for Nell Dale; press 2 to leave a message for John Lewis.”

Page 38: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

38Hofstra University - CSC00512/2/06

Voice Synthesis

Each word or phrase needed must be recorded separately

Furthermore, since words are pronounced differently in different contexts, some words may have to be recorded multiple times

For example, a word at the end of a question rises in pitch compared to its use in the middle of a sentence

Page 39: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

39Hofstra University - CSC00512/2/06

Voice Recognition

The sounds that each person makes when speaking are unique

We each have a unique shape to our mouth, tongue, throat, and nasal cavities that affect the pitch and resonance of our spoken voice

Speech impediments, mumbling, volume, regional accents, and the health of the speaker further complicate this problem

Page 40: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

40Hofstra University - CSC00512/2/06

Voice Recognition

Furthermore, humans speak in a continuous, flowing manner

Words are strung together into sentencesSometimes it’s difficult to distinguish between phrases like “ice cream” and “I scream”Also, homonyms such as “I” and “eye” or “see” and “sea”

Humans can often clarify these situations by the context of the sentence, but that processing requires another level of comprehension

Modern voice-recognition systems still do not do well with continuous, conversational speech

Page 41: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

41Hofstra University - CSC00512/2/06

Natural Language Comprehension

Even if a computer recognizes the words that are spoken, it is another task entirely to understand the meaning of those words

Natural language is inherently ambiguous, meaning that the same syntactic structure could have multiple valid interpretationsA single word can have multiple definitions and can even represent multiple parts of speechThis is referred to as a lexical ambiguity

Time flies like an arrow.

Page 42: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

42Hofstra University - CSC00512/2/06

Natural Language Comprehension

A natural language sentence can also have a syntactic ambiguity because phrases can be put together in various ways

I saw the Grand Canyon flying to New York.

Referential ambiguity can occur with the use of pronouns

The brick fell on the computer but it is not broken.

Page 43: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

43Hofstra University - CSC00512/2/06

Assignment #3

Research these two RFCs: RFC1129 and RFC968. Given a brief - paragraph, not a single sentence – description based on the abstract, introduction, or basic content

Pick google.com and one other site. Using whois and ARIN, get as much information as possible about the IP addressing, the DNS and the site (location, owner, etc.)

Due next Wednesday, December 6 – or you can email it earlier

Page 44: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

44Hofstra University - CSC00512/2/06

Useful Websites

http://www.rfc-editor.org/rfcsearch.htmlSearch RFCshttp://www.cert.orgCenter for Internet securityhttp://www.counterpane.com/alerts.htmlSome recent alerts

Page 45: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

45Hofstra University - CSC00512/2/06

Homework

Read Chapter Thirteen – and review slides

...Next Class We'll Hand Out the Final Exam...

...and cover LAMP and WAMP Technology

Page 46: 12/2/06 1 Hofstra University - CSC005 Chapter 13 Artificial Intelligence

46Hofstra University - CSC00512/2/06

...Have A Nice Night

"Klaatu barad nikto"