0% found this document useful (0 votes)
10 views59 pages

Artificial Intelligence

Uploaded by

Shreya Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views59 pages

Artificial Intelligence

Uploaded by

Shreya Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 59

Artificial Intelligence

INTRODUCTION
Why Study AI?

 AI makes computers more useful


 Intelligent computer would have huge impact on
civilization
 AI cited as “field I would most like to be in” by
scientists in all fields
 Computer is a good metaphor for talking and
thinking about intelligence
Why Study AI?

 Turning theory into working programs forces us to


work out the details
 AI yields good results for Computer Science
 AI yields good results for other fields
 Computers make good experimental subjects
 Personal motivation: mystery
What is the definition of AI?

What do you think?


What is the definition of AI?

Systems that think like Systems that think


humans rationally
Systems that act like Systems that act rationally
humans
What is the definition of AI?

Systems that think like Systems that think


humans rationally
Systems that act like Systems that act rationally
humans

Bellman, 1978
“[The automation of] activities that we associate with human
thinking, activities such as decision making, problem solving,
learning”
What is the definition of AI?

Systems that think like Systems that think


humans rationally
Systems that act like Systems that act rationally
humans

Charniak & McDermott, 1985


“The study of mental faculties through the use of computational
models”
What is the definition of AI?

Systems that think like Systems that think


humans rationally
Systems that act like Systems that act rationally
humans

Dean et al., 1995


“The design and study of computer programs that behave
intelligently. These programs are constructed to perform as
would a human or an animal whose behavior we consider
intelligent”
What is the definition of AI?

Systems that think like Systems that think


humans rationally
Systems that act like Systems that act rationally
humans

Haugeland, 1985
“The exciting new effort to make computers think machines with
minds, in the full and literal sense”
What is the definition of AI?

Systems that think like Systems that think


humans rationally
Systems that act like Systems that act rationally
humans

Kurzweil, 1990
“The art of creating machines that perform functions that require
intelligence when performed by people”
What is the definition of AI?

Systems that think like Systems that think


humans rationally
Systems that act like Systems that act rationally
humans

Luger & Stubblefield, 1993


“The branch of computer science that is concerned with the
automation of intelligent behavior”
What is the definition of AI?

Systems that think like Systems that think


humans rationally
Systems that act like Systems that act rationally
humans

Nilsson, 1998
“Many human mental activities such as writing computer
programs, doing mathematics, engaging in common sense
reasoning, understanding language, and even driving an
automobile, are said to demand intelligence. We might say that
[these systems] exhibit artificial intelligence”
What is the definition of AI?

Systems that think like Systems that think


humans rationally
Systems that act like Systems that act rationally
humans

Rich & Knight, 1991


“The study of how to make computers do things at which, at the
moment, people are better”
What is the definition of AI?

Systems that think like Systems that think


humans rationally
Systems that act like Systems that act rationally
humans

Schalkoff, 1990
“A field of study that seeks to explain and emulate intelligent
behavior in terms of computational processes”
What is the definition of AI?

Systems that think like Systems that think


humans rationally
Systems that act like Systems that act rationally
humans

Winston, 1992
“The study of the computations that make it possible to perceive,
reason, and act”
Approach 1: Acting Humanly

 Turing test: ultimate test for acting humanly


 Computer and human both interrogated by judge

 Computer passes test if judge can’t tell the difference


How effective is this test?

 Agent must:
 Have command of language

 Have wide range of knowledge

 Demonstrate human traits (humor, emotion)

 Be able to reason

 Be able to learn

 Loebner prize competition is modern version of


Turing Test
 Example: Alice, Loebner prize winner for 2000 and 2001
Approach 2: Thinking Humanly

 Requires knowledge of brain function


 What level of abstraction?
 How can we validate this
 This is the focus of Cognitive Science
Approach 3: Thinking Rationally

 Aristotle attempted this


 What are correct arguments or thought processes?
 Provided foundation of much of AI
 Not all intelligent behavior controlled by logic
 What is our goal? What is the purpose of thinking?
Approach 4: Acting Rationally

 Act to achieve goals, given set of beliefs


 Rational behavior is doing the “right thing”
 Thing which expects to maximize goal achievement

 This is approach adopted by Russell & Norvig


Foundations of AI

 Philosophy
 450 BC, Socrates asked for algorithm to distinguish pious from non-
pious individuals
 Aristotle developed laws for reasoning

 Mathematics
 1847, Boole introduced formal language for making logical inference

 Economics
 1776, Smith views economies as consisting of agents maximizing their
own well being (payoff)
 Neuroscience
 1861, Study how brains process information

 Psychology
 1879, Cognitive psychology initiated

 Linguistics
 1957, Skinner studied behaviorist approach to language learning
History of AI

 CS-based AI started with “Dartmouth Conference” in 1956


 Attendees

 McCulloch and Pitts:


 Neuron and neural nets
 John McCarthy
 LISP, application of logic to reasoning
 Marvin Minsky
 Popularized neural networks
 Slots and frames
 The Society of the Mind
 Claude Shannon
 Computer checkers
 Information theory
 Open-loop 5-ball juggling
 Allen Newell and Herb Simon
 General Problem Solver
AI Questions

 Can we make something that is as intelligent as a human?


 Can we make something that is as intelligent as a bee?
 Can we make something that is evolutionary, self improving,
autonomous, and flexible?
 Can we save this plant $20M/year by pattern recognition?
 Can we save this bank $50M/year by automatic fraud
detection?
 Can we start a new industry of handwriting recognition
agents?
Which of these exhibits intelligence?

 You beat somebody at chess.


 You prove a mathematical theorem using a set of known axioms.
 You need to buy some supplies, meet three different colleagues,
return books to the library, and exercise. You plan your day in
such a way that everything is achieved in an efficient manner.
 You are a lawyer who is asked to defend someone. You recall
three similar cases in which the defendant was guilty, and you
turn down the potential client.
 A stranger passing you on the street notices your watch and asks,
“Can you tell me the time?” You say, “It is 3:00.”
 You are told to find a large Phillips screwdriver in a cluttered
workroom. You enter the room (you have never been there
before), search without falling over objects, and eventually find
the screwdriver.
Which of these exhibits intelligence?

 You are a six-month-old infant. You can produce sounds with


your vocal organs, and you can hear speech sounds around you,
but you do not know how to make the sounds you are hearing. In
the next year, you figure out what the sounds of your parents'
language are and how to make them.
 You are a one-year-old child learning Arabic. You hear strings of
sounds and figure out that they are associated with particular
meanings in the world. Within two years, you learn how to
segment the strings into meaningful parts and produce your own
words and sentences.
 Someone taps a rhythm, and you are able to beat along with it
and to continue it even after it stops.
 You are some sort of primitive invertebrate. You know nothing
about how to move about in your world, only that you need to
find food and keep from bumping into walls. After lots of
reinforcement and punishment, you get around just fine.
Which of these can currently be done?
 Play a decent game of table tennis

 Drive autonomously along a curving mountain road

 Drive autonomously in the center of Cairo

 Play a decent game of bridge

 Discover and prove a new mathematical theorem

 Write an intentionally funny story

 Give competent legal advice in a specialized area of law

 Translate spoken English into spoken Swedish in real time

 Plan schedule of operations for a NASA spacecraft

 Defeat the world champion in chess


Components of an AI System

An agent perceives its environment


through sensors and acts on the
environment through actuators.

Human: sensors are eyes, ears,


actuators (effectors) are hands,
legs, mouth.

Robot: sensors are cameras, sonar,


lasers, lidar, bump, effectors are
grippers, manipulators, motors

The agent’s behavior is described by its


function that maps percept to action.
Rationality

 A rational agent does the right thing (what is this?)


 A fixed performance measure evaluates the sequence
of observed action effects on the environment
PEAS

 Use PEAS to describe task


 Performance measure

 Environment

 Actuators

 Sensors
PEAS

 Use PEAS to describe task environment


 Performance measure

 Environment

 Actuators

 Sensors

 Example: Taxi driver


 Performance measure: safe, fast, comfortable (maximize
profits)
 Environment: roads, other traffic, pedestrians, customers

 Actuators: steering, accelerator, brake, signal, horn

 Sensors: cameras, sonar, speedometer, GPS, odometer,


accelerometer, engine sensors
Environment Properties

 Fully observable vs. partially observable


 Single agent vs. multiagent
 Deterministic vs. stochastic / strategic
 Episodic vs. sequential
 Static vs. dynamic
 Discrete vs. continuous
Environment Examples

Environment Obse Deter Episodi Stat Discre Agent


rvabl minist c ic te s
e ic
Chess with a clock

Chess without a
clock

Fully observable vs. partially observable


Deterministic vs. stochastic / strategic
Episodic vs. sequential
Static vs. dynamic
Discrete vs. continuous
Single agent vs. multiagent
Environment Examples

Environment Obse Deter Episodi Stat Discre Agent


rvabl minist c ic te s
e ic
Fully observable vs. Chess with a clock Fully Strategi Sequentia Semi Discret Multi
partially observable c l e
Deterministic vs. Chess without a Fully Strategi Sequentia Stati Discret Multi
stochastic / strategic clock c l c e
Episodic vs. sequential
Static vs. dynamic
Discrete vs. continuous
Single agent vs.
multiagent
Environment Examples

Environment Obse Deter Episodi Stat Discre Agent


rvabl minist c ic te s
e ic
Chess with a clock Fully Strategi Sequentia Semi Discret Multi
c l e
Chess without a Fully Strategi Sequentia Stati Discret Multi
clock c l c e
Poker

Fully observable vs. partially observable


Deterministic vs. stochastic / strategic
Episodic vs. sequential
Static vs. dynamic
Discrete vs. continuous
Single agent vs. multiagent
Environment Examples

Environment Obse Deter Episodi Stat Discre Agent


rvabl minist c ic te s
e ic
Chess with a clock Fully Strategi Sequentia Semi Discret Multi
c l e
Chess without a Fully Strategi Sequentia Stati Discret Multi
clock c l c e
Poker Partia Strategi Sequentia Stati Discret Multi
l c l c e

Fully observable vs. partially observable


Deterministic vs. stochastic / strategic
Episodic vs. sequential
Static vs. dynamic
Discrete vs. continuous
Single agent vs. multiagent
Environment Examples

Environment Obse Deter Episodi Stat Discre Agent


rvabl minist c ic te s
e ic
Chess with a clock Fully Strategi Sequentia Semi Discret Multi
c l e
Chess without a Fully Strategi Sequentia Stati Discret Multi
clock c l c e
Poker Partia Strategi Sequentia Stati Discret Multi
l c l c e
Backgammon

Fully observable vs. partially observable


Deterministic vs. stochastic / strategic
Episodic vs. sequential
Static vs. dynamic
Discrete vs. continuous
Single agent vs. multiagent
Environment Examples

Environment Obse Deter Episodi Stat Discre Agent


rvabl minist c ic te s
e ic
Chess with a clock Fully Strategi Sequentia Semi Discret Multi
c l e
Chess without a Fully Strategi Sequentia Stati Discret Multi
clock c l c e
Poker Partia Strategi Sequentia Stati Discret Multi
l c l c e
Backgammon Fully Stochas Sequentia Stati Discret Multi
tic l c e

Fully observable vs. partially observable


Deterministic vs. stochastic / strategic
Episodic vs. sequential
Static vs. dynamic
Discrete vs. continuous
Single agent vs. multiagent
Environment Examples

Environment Obse Deter Episodi Stat Discre Agent


rvabl minist c ic te s
e ic
Chess with a clock Fully Strategi Sequentia Semi Discret Multi
c l e
Chess without a Fully Strategi Sequentia Stati Discret Multi
clock c l c e
Poker Partia Strategi Sequentia Stati Discret Multi
l c l c e
Backgammon Fully Stochas Sequentia Stati Discret Multi
tic l c e
Taxi driving Partia Stochas Sequentia Dyn Continu Multi
l tic l amic ous

Fully observable vs. partially observable


Deterministic vs. stochastic / strategic
Episodic vs. sequential
Static vs. dynamic
Discrete vs. continuous
Single agent vs. multiagent
Environment Examples

Environment Obse Deter Episodi Stat Discre Agent


rvabl minist c ic te s
e ic
Chess with a clock Fully Strategi Sequentia Semi Discret Multi
c l e
Chess without a Fully Strategi Sequentia Stati Discret Multi
clock c l c e
Poker Partia Strategi Sequentia Stati Discret Multi
l c l c e
Backgammon Fully Stochas Sequentia Stati Discret Multi
tic l c e
Taxi driving Partia Stochas Sequentia Dyn Continu Multi
l tic l amic ous
Medical diagnosis
Fully observable vs. partially observable
Deterministic vs. stochastic / strategic
Episodic vs. sequential
Static vs. dynamic
Discrete vs. continuous
Single agent vs. multiagent
Environment Examples

Environment Obse Deter Episodi Stat Discre Agent


rvabl minist c ic te s
e ic
Chess with a clock Fully Strategi Sequentia Semi Discret Multi
c l e
Chess without a Fully Strategi Sequentia Stati Discret Multi
clock c l c e
Poker Partia Strategi Sequentia Stati Discret Multi
l c l c e
Backgammon Fully Stochas Sequentia Stati Discret Multi
tic l c e
Taxi driving Partia Stochas Sequentia Dyn Continu Multi
l tic l amic ous
Medical diagnosis Partia Stochas Episodic Stati Continu Single
l tic c ous
Fully observable vs. partially observable
Deterministic vs. stochastic / strategic
Episodic vs. sequential
Static vs. dynamic
Discrete vs. continuous
Single agent vs. multiagent
Environment Examples

Environment Obse Deter Episodi Stat Discre Agent


rvabl minist c ic te s
e ic
Chess with a clock Fully Strategi Sequentia Semi Discret Multi
c l e
Chess without a Fully Strategi Sequentia Stati Discret Multi
clock c l c e
Poker Partia Strategi Sequentia Stati Discret Multi
l c l c e
Backgammon Fully Stochas Sequentia Stati Discret Multi
tic l c e
Taxi driving Partia Stochas Sequentia Dyn Continu Multi
l tic l amic ous
Medical diagnosis Partia Stochas Episodic Stati Continu Single
l tic c ous
Fully observable vs. partially observable
Deterministic vs. stochasticImage analysis
/ strategic
Episodic vs. sequential
Static vs. dynamic
Discrete vs. continuous
Single agent vs. multiagent
Environment Examples

Environment Obse Deter Episodi Stat Discre Agent


rvabl minist c ic te s
e ic
Chess with a clock Fully Strategi Sequentia Semi Discret Multi
c l e
Chess without a Fully Strategi Sequentia Stati Discret Multi
clock c l c e
Poker Partia Strategi Sequentia Stati Discret Multi
l c l c e
Backgammon Fully Stochas Sequentia Stati Discret Multi
Fully observable vs. tic l c e
partially observable Taxi driving Partia Stochas Sequentia Dyn Continu Multi
l tic l amic ous
Deterministic vs.
Medical diagnosis Partia Stochas Episodic Stati Continu Single
stochastic / strategic l tic c ous
Episodic vs. sequential Image analysis Fully Determi Episodic Semi Discret Single
Static vs. dynamic nistic e

Discrete vs.
continuous
Single agent vs.
Environment Examples

Environment Obse Deter Episodi Stat Discre Agent


rvabl minist c ic te s
e ic
Chess with a clock Fully Strategi Sequentia Semi Discret Multi
c l e
Chess without a Fully Strategi Sequentia Stati Discret Multi
clock c l c e
Poker Partia Strategi Sequentia Stati Discret Multi
l c l c e
Backgammon Fully Stochas Sequentia Stati Discret Multi
Fully observable vs. tic l c e
partially observable Taxi driving Partia Stochas Sequentia Dyn Continu Multi
l tic l amic ous
Deterministic vs.
Medical diagnosis Partia Stochas Episodic Stati Continu Single
stochastic / strategic l tic c ous
Episodic vs. sequential Image analysis Fully Determi Episodic Semi Discret Single
Static vs. dynamic nistic e

Discrete vs. Robot part picking


continuous
Single agent vs.
Environment Examples

Environment Obse Deter Episodi Stat Discre Agent


rvabl minist c ic te s
e ic
Chess with a clock Fully Strategi Sequentia Semi Discret Multi
c l e
Chess without a Fully Strategi Sequentia Stati Discret Multi
clock c l c e
Poker Partia Strategi Sequentia Stati Discret Multi
l c l c e
Backgammon Fully Stochas Sequentia Stati Discret Multi
Fully observable vs. tic l c e
partially observable Taxi driving Partia Stochas Sequentia Dyn Continu Multi
l tic l amic ous
Deterministic vs.
Medical diagnosis Partia Stochas Episodic Stati Continu Single
stochastic / strategic l tic c ous
Episodic vs. sequential Image analysis Fully Determi Episodic Semi Discret Single
Static vs. dynamic nistic e

Discrete vs. Robot part picking Fully Determi Episodic Semi Discret Single
nistic e
continuous
Single agent vs.
Environment Examples

Environment Obse Deter Episodi Stat Discre Agent


rvabl minist c ic te s
e ic
Chess with a clock Fully Strategi Sequentia Semi Discret Multi
c l e
Chess without a Fully Strategi Sequentia Stati Discret Multi
clock c l c e
Poker Partia Strategi Sequentia Stati Discret Multi
l c l c e
Backgammon Fully Stochas Sequentia Stati Discret Multi
Fully observable vs. tic l c e
partially observable Taxi driving Partia Stochas Sequentia Dyn Continu Multi
l tic l amic ous
Deterministic vs.
Medical diagnosis Partia Stochas Episodic Stati Continu Single
stochastic / strategic l tic c ous
Episodic vs. sequential Image analysis Fully Determi Episodic Semi Discret Single
Static vs. dynamic nistic e

Discrete vs. Robot part picking Fully Determi Episodic Semi Discret Single
nistic e
continuous
Interactive English
Single agent vs. tutor
Environment Examples

Environment Obse Deter Episodi Stat Discre Agent


rvabl minist c ic te s
e ic
Chess with a clock Fully Strategi Sequentia Semi Discret Multi
c l e
Chess without a Fully Strategi Sequentia Stati Discret Multi
clock c l c e
Poker Partia Strategi Sequentia Stati Discret Multi
l c l c e
Backgammon Fully Stochas Sequentia Stati Discret Multi
Fully observable vs. tic l c e
partially observable Taxi driving Partia Stochas Sequentia Dyn Continu Multi
l tic l amic ous
Deterministic vs.
Medical diagnosis Partia Stochas Episodic Stati Continu Single
stochastic / strategic l tic c ous
Episodic vs. sequential Image analysis Fully Determi Episodic Semi Discret Single
Static vs. dynamic nistic e

Discrete vs. Robot part picking Fully Determi Episodic Semi Discret Single
nistic e
continuous
Interactive English Partia Stochas Sequentia Dyn Discret Multi
Single agent vs. tutor l tic l amic e
Agent Types

 Types of agents (increasing in generality and ability


to handle complex environments)
 Simple reflex agents
 Reflex agents with state or Model based reflex agent
 Goal-based agents
 Utility-based agents
 Learning agent
Simple Reflex Agent

 Use simple “if


then” rules
 Can be short
sighted

SimpleReflexAgent(percept)
state = InterpretInput(percept)
rule = RuleMatch(state, rules)
action = RuleAction(rule)
Return action
Example: Vacuum Agent

 Performance?
 1 point for each square cleaned in time T?
 #clean squares per time step - #moves per time step?
 Environment: vacuum, dirt, multiple areas defined by square regions
 Actions: left, right, suck, idle
 Sensors: location and contents
 [A, dirty]

 Rational is not omniscient


 Environment may be partially observable
 Rational is not clairvoyant
 Environment may be stochastic
 Thus Rational is not always successful
Reflex Vacuum Agent

 If status=Dirty then return Suck


else if location=A then return Right
else if location=B then right Left
Reflex Agent With State (Model based reflex agent)

 Store previously-
observed
information
 Can reason about
unobserved aspects
of current state

ReflexAgentWithState(percept)
state = UpdateDate(state, action, percept)
rule = RuleMatch(state, rules)
action = RuleAction(rule)
Return (action)
Reflex Vacuum Agent

 If status=Dirty then Suck


else if have not visited other square in >3 time
units, go there
Goal-Based Agents

 Goal reflects desires


of agents
 May project actions to
see if consistent with
goals
 Takes time, world
may change during
reasoning
Utility-Based Agents

 Evaluation function
to measure utility
f(state) -> value
 Useful for evaluating
competing goals
Learning Agents
Pathfinder Medical Diagnosis System

 Performance: Correct Hematopathology diagnosis


 Environment: Automate human diagnosis, partially
observable, deterministic, episodic, static,
continuous, single agent
 Actuators: Output diagnoses and further test
suggestions
 Sensors: Input symptoms and test results
 Reasoning: Bayesian networks, Monte-Carlo
simulations
Alvinn

 Performance: Stay in lane, on road, maintain speed


 Environment: Driving Hummer on and off road
without manual control (Partially observable,
stochastic, episodic, dynamic, continuous, single
agent), Autonomous automobile
 Actuators: Speed, Steer
 Sensors: Stereo camera input
 Reasoning: Neural networks
Other Example AI Systems

 Translation of Caterpillar  Billiards robot


truck manuals into 20  Juggling robot
languages  Credit card fraud
 Shuttle packing detection
 Military planning (Desert  Lymphatic system
Storm) diagnoses
 Intelligent vehicle  Mars rover
highway negotiation  Sky survey galaxy data
 Credit card transaction analysis
monitoring
Other Example AI Systems

 Knowledge  Natural language


Representation processing
 Search  Uncertainty reasoning
 Problem solving  Computer Vision
 Planning  Robotics
 Machine learning

You might also like