Chapter1 Artificial Intelligence
Chapter1 Artificial Intelligence
1
Course Objectives
2
Course Contents
Future
NLP Learning
Intro to AI Lisp
3
Syllabus
1. Introduction to AI
2. Problem solving
3. Search techniques
6. Machine learning
7. Applications of AI
4
References
5
An Introduction to AI
7
What is AI?
How do we
create
What is intelligence?
intelligence?
Who cares? L e t ! s
do some cool and
useful stuff! 8
Meaning of the word: ``intelligence''
9
Meaning of the word: ``intelligence''
3: secret information about an enemy (or potential enemy); "we sent out
planes to gather intelligence on their radar coverage"
10
What Behaviors are Intelligent?
Everyday tasks: recognize a friend, recognize who
is calling, translate from one language to another,
interpret a photograph, talk, cook a dinner
12
Formal Definitions
Barr and Feigenbaum
Elaine Rich
15
AI Today
Many more
Data
Predictions
Mining
Astronomy NLP
Biometric Robotics
Identification
Medical
Biology
Systems
16
AI Today
likes(deb, horses).
likes(deb, dogs).
likes(deb, Y) :- horse(Y). ?- likes(deb, horses).
horse(robin). yes
?- likes(deb, robin). ?- likes(deb, X).
yes X=horses
X=dogs 18
LISP
• Proposed by McCarthy, late 1950s; contemporary of COBOL,
FORTRAN
• Functional programming language based on lambda
calculus/recursive function theory
• Intended as a language for symbolic rather than numeric computation
• Interactive interpreter, compiler
• Uses atoms, lists, functions.
(defun hypotenuse (x y)
(sqrt (+ (square x)
(square y))))
> (hypotenuse 4 3)
5
19
History of AI
20
Artificial Intelligence
• Common sense reasoning
• Reasoning under uncertain conditions
• Learning from experience
• Planning and executing complex tasks
• Understanding and communicating in spoken/written language
• Visual comprehension
21
Knowledge Definition
22
Knowledge Storing
23
Knowledge Representation
24
Knowledge
Example: automated language translation (English <----->
Japanese)
Must determine what this means using knowledge of human discourse in English
word-by-word
translation
--------------------->
25
Knowledge
Note: knowledge != data.
Example: determining voltage from current and resistance
26
Knowledge
"Heuristics for making good decisions when no algorithm exists for doing so"
That is, for many of the above problem, we must often make intelligent guesses due
to:
• Lack of complete knowledge about how to solve problem.
• Lack of complete data about current situation.
• Lack of time to completely explore situation.
27
What is Learning?
Learning is one of those everyday terms
which is broadly and vaguely used in the
English language
• Learning is making useful changes in our minds
• Learning is constructing or modifying representations of what
is being experienced
• Learning is the phenomenon of knowledge acquisition in the
absence of explicit programming
Herbert Simon, 1983
29
Consider what might be involved in
building a “intelligent” computer….
• Fast hardware?
• Foolproof software?
• Chess-playing at grandmaster level?
• Speech interaction?
speech synthesis
speech recognition
speech understanding
• Image recognition and understanding ?
• Learning?
• Planning and decision-making?
30
Can we build hardware as complex as the
brain?
• How complicated is our brain?
• a neuron, or nerve cell, is the basic information processing unit
• estimated to be on the order of 10 11 neurons in a human brain
• many more synapses (10 14) connecting these neurons
• cycle time: 10 -3 seconds (1 millisecond)
• Conclusion
• YES: in the near future we can have computers with as many basic processing
elements as our brain, but with
far fewer interconnections (wires or synapses) than the brain
much faster updates than the brain
• but building hardware is very different from making a computer behave like a brain!
31
Must an Intelligent System be Foolproof?
32
Can Computers Talk?
• This is known as “speech synthesis”
• translate text to phonetic
form e.g., “fictitious”-> fik-
tish-es
• use pronunciation rules to map phonemes to actual
sound e.g., “tish” -> sequence of basic audio
sounds
• sounds made by this “lookup” approach sound unnatural
• • sounds are not independent
Difficulties
e.g., “act” and “action”
modern systems (e.g., at AT&T) can handle this pretty well
• a harder problem is emphasis, emotion, etc
humans understand what they are saying
machines don’t: so they sound unnatural
• Conclusion: NO, for complete sentences, but YES for individual words
34
Can Computers Recognize Speech?
• Speech Recognition:
• mapping sounds from a microphone into a list of words.
• Hard problem: noise, more than one person
talking, occlusion, speech variability,..
• Even if we recognize each word, we may not understand its meaning.
35
Recognizing human speech (ctd.)
• Recognizing normal speech is much more difficult
• speech is continuous: where are the boundaries between
words? e.g., “John’s car has a flat tire”
• large vocabularies
can be many thousands of possible words
we can use context to help figure out what someone said
try telling a waiter in a restaurant:
“I would like some dream and sugar in my coffee”
• background noise, other speakers, accents, colds, etc
• on normal speech, modern systems are only about 60% accurate
• Conclusion: NO, normal speech is too complex to accurately recognize, but YES
for restricted problems
• (e.g., recent software for PC use by IBM, Dragon systems, etc)
36
Can Computers Understand speech?
37
Can Computers Learn and Adapt ?
38
Can Computers “see”?
• Recognition v. Understanding (like Speech)
• Recognition and Understanding of Objects in a
scene look around this room
you can effortlessly recognize objects
human brain can map 2d visual image to 3d “map”
• Conclusion: mostly NO: computers can only “see” certain types of objects
under limited circumstances: but YES for certain constrained problems (e.g.,
face recognition)
39
Can Computers plan and make decisions?
• Intelligence
• involves solving problems and making decisions and plans
• e.g., you want to visit your cousin in
Boston you need to decide on dates,
flights
you need to get to the airport, etc
involves a sequence of decisions, plans, and actions
• • the
What worldplanning
makes is not predictable:
hard?
your flight is canceled or there’s a backup on the 405
• there is a potentially huge number of details
do you consider all flights? all dates?
no: commonsense constrains your solutions
• AI systems are only successful in constrained planning problems
41
Intelligent Systems in Your Everyday
Life
• Post Office
• automatic address recognition and sorting of mail
• Banks
• automatic check readers, signature verification systems
• automated loan application classification
• Telephone Companies
• automatic voice recognition for directory inquiries
• automatic fraud detection,
• Computer Companies
• automated diagnosis for help-desk applications
• Recommendation systems
• Product recommendation based on history 42
AI Applications: Consumer Marketing
• Have you ever used any kind of credit/ATM/store card while shopping?
• if so, you have very likely been “input” to an AI algorithm
• All of this information is recorded digitally
• Companies like Nielsen gather this information weekly and search for patterns
• general changes in consumer behavior
• tracking responses to new products
• identifying customer segments: targeted marketing, e.g., they find out that
consumers with sports cars who buy textbooks respond well to offers of new credit
cards.
• Currently a very hot area in marketing
43
AI Applications: Identification Technologies
• ID cards
• e.g., ATM cards
• can be a nuisance and security risk:
cards can be lost, stolen, passwords forgotten, etc
• Biometric Identification
• walk up to a locked
door camera
fingerprint device
microphone
• computer uses your biometric signature for
identification face, eyes, fingerprints, voice pattern
44
AI Applications: Predicting the Stock Market
Value of
the Stock
?
time in days
• The Prediction Problem
• given the past, predict the future
• very difficult problem!
• we can use learning algorithms to learn a predictive model from historical data
prob(increase at day t+1 | values at day t, t-1,t-2....,t-k)
• such models are routinely used by banks and financial traders to manage
portfolios worth millions of dollars
45
AI-Applications: Machine Translation
• Language problems in international business
• e.g., at a meeting of Japanese, Korean, Vietnamese and Swedish investors, no
common language
• or: you are shipping your software manuals to 127 countries
• solution; hire translators to translate
• would be much cheaper if a machine could do this!
• Nonetheless....
• commercial systems can do alot of the work very well (e.g.,restricted vocabularies
in software documentation)
• algorithms which combine dictionaries, grammar models, etc.
• see for example babelfish.altavista.com
46
AI-Applications: Face Detection
47
AI-Applications: Product Recommendation
48
AI-Applications: Image Guided Surgery
49
AI-Applications: Speech Recognition
50
AI-Applications: Exploration of the
Universe
51
Intelligent Agents
52
Agents
Human agent:
eyes, ears, and other organs for sensors;
hands, legs, mouth, and other body parts for
actuators
Robotic agent:
cameras and infrared range finders for sensors; various
motors for actuators
53
Agents and environments
55
Rational agents
56
Rational agents
PEAS:
Performance measure
Environment
Actuators
Sensors
58
PEAS
60
PEAS
Example: Agent = Part-picking robot
61
Agent types
Goal-based agents
Utility-based agents
62
Table Driven Agent.
current state of decision process
Impractical
table lookup
for entire history
63
Simple reflex agents
NO MEMORY
Fails if environment
is partially observable
65
Goal-based agents
Goals provide reason to prefer one action over the other.
We need to predict the future: we need to plan & search
66
Learning agents
How does an agent improve over time?
By monitoring it’s performance and suggesting
better modeling, new action rules, etc.
Evaluates
current
world
state
changes
action
rules
“old agent”=
model world
and decide on
suggests actions
explorations to be taken
67