SlideShare a Scribd company logo
Lecture 1
Course Introduction
Artificial Intelligence
Marco Chiarandini
Department of Mathematics & Computer Science
University of Southern Denmark
Slides by Stuart Russell and Peter Norvig
Course Introduction
Introduction to AI
Intelligent Agents
Outline
1. Course Introduction
2. Introduction to AI
3. Intelligent Agents
2
Course Introduction
Introduction to AI
Intelligent Agents
Outline
1. Course Introduction
2. Introduction to AI
3. Intelligent Agents
3
Course Introduction
Introduction to AI
Intelligent Agents
Course Presentation
Schedule (20 classes):
Tuesday 8:15-9:00
Wednsday 12:15-14:00
Thursday 12:15-14:00
Last lecture: Thursday, 22nd December, 2011
Communication tools
Course Public Web Site (Ws) ⇔ Blackboard (Bb)
Announcements (Bb)
(link from http://www.imada.sdu.dk/~marco/DM828/)
Classes, breaks, after classes, office
Personal email (Bb)
Course content
4
Course Introduction
Introduction to AI
Intelligent Agents
Course Presentation
Course Material:
Text Book:
B1 S. Russell and P. Norvig. Artificial Intelligence: A Modern Approach.
Prentice Hall, 2003
Notes and Slides from the web site
Execises (programming in python + preparation to exam)
Evaluation:
3/4 Passed/Failed Assignments (programming in python + conceptual)
A failed assignement must be resumbitted one week after the evaluation.
Written Exam, 3 hours, no books, external censor
Preparation:
Exercise classes, once per week. Preparation required.
5
Course Introduction
Introduction to AI
Intelligent Agents
Outline
1. Course Introduction
2. Introduction to AI
3. Intelligent Agents
6
Course Introduction
Introduction to AI
Intelligent Agents
Outline
♦ What is AI?
♦ A brief history
♦ The state of the art
7
Course Introduction
Introduction to AI
Intelligent Agents
What is AI?
Systems that think like humans Systems that think rationally
Systems that act like humans Systems that act rationally
8
Course Introduction
Introduction to AI
Intelligent Agents
Acting humanly: The Turing test
Turing (1950) “Computing machinery and intelligence”:
♦ “Can machines think?” −→ “Can machines behave intelligently?”
♦ Operational test for intelligent behavior: the Imitation Game
AI SYSTEM
HUMAN
?
HUMAN
INTERROGATOR
♦ Predicted that by 2000, a machine might have a 30% chance of
fooling a lay person for 5 minutes
♦ Anticipated all major arguments against AI in following 50 years
♦ Suggested major components of AI: knowledge, reasoning, language
understanding, learning
Problem: Turing test is not reproducible, constructive, or
amenable to mathematical analysis
9
Course Introduction
Introduction to AI
Intelligent Agents
ALICE
Human: Hi Alice
ALICE: Hello there.
Human: How are you?
ALICE: My logic and cognitive functions are normal.
Human: mmh.
ALICE: What do you really want to ask me?
Human:. and all the rest?
ALICE: Perhaps there are a few exception.
Human: Which for example?
ALICE: The first one, I think.
Human: feelings?
ALICE: Electronic brains like me have no emotions.
Human: are you sure?
ALICE: I am as sure as I can be.
Human: How can you know what feelings are if you never had them?
ALICE: Knowledge is of two kinds: that which we learn from the senses
and that which is true "a priori".
10
Course Introduction
Introduction to AI
Intelligent Agents
Thinking humanly: Cognitive Science
1960s “cognitive revolution”: information-processing psychology replaced
prevailing orthodoxy of behaviorism (mind is just the behaviour of the body)
Requires scientific theories of internal activities of the brain
– What level of abstraction? “Knowledge” or “circuits”?
– How to validate? Requires
1) Predicting and testing behavior of human subjects (top-down)
2) Direct identification from neurological data (bottom-up)
Both approaches (roughly, Cognitive Science and Cognitive Neuroscience)
are now distinct from AI.
They investigate human cognition by introspection, psychological experiments
and brain imaging.
However they crossfertilize each other (eg. computer vision)
11
Course Introduction
Introduction to AI
Intelligent Agents
Thinking rationally: Laws of Thought
Normative (or prescriptive) rather than descriptive approach
Aristotle: what are correct arguments/thought processes?
Several Greek schools developed various forms of logic:
notation and rules of derivation for thoughts;
Direct line through mathematics and philosophy to modern AI
Logist tradition: try to solve any solvable problem describing it in logical
notation and building on programs that can find solutions
Problems:
1) Not all intelligent behavior is mediated by logical deliberation
what for example if knoweldge is less than 100% certain?
2) programs to solve the large problems arising from the logist tradition do
not exist in practice.
12
Course Introduction
Introduction to AI
Intelligent Agents
Acting rationally
Rational behavior: doing the right thing
The right thing: that which is expected to maximize goal achievement,
given the available information
Doesn’t necessarily involve thinking—e.g., blinking reflex—but
thinking should be in the service of rational action
Aristotle (Nicomachean Ethics):
Every art and every inquiry, and similarly every
action and pursuit, is thought to aim at some good
However, humans do not always act rationally
1) Approach more amenable to scientific development than approaches based
on human behaviour or human thought.
2) Leads to study correct inference and general laws of thought
13
Course Introduction
Introduction to AI
Intelligent Agents
Rational agents
An agent is an entity that perceives and acts
This course is about general principles for designing rational agents and their
components
Abstractly, an agent is a function from percept histories to actions:
f : P∗
→ A
For any given class of environments and tasks, we seek the
agent (or class of agents) with the best performance
Caveat: computational limitations make
perfect rationality unachievable
→ design best program for given machine resources
14
Course Introduction
Introduction to AI
Intelligent Agents
Potted history of AI
1943 McCulloch & Pitts: Boolean circuit model of brain
1950 Turing’s “Computing Machinery and Intelligence”
1952–69 Look, Ma, no hands!
1950s Early AI programs, including Samuel’s checkers program,
Newell & Simon’s Logic Theorist, Gelernter’s Geometry Engine
1956 Dartmouth meeting: “Artificial Intelligence” adopted
1965 Robinson’s complete algorithm for logical reasoning
1966–74 AI discovers computational complexity
Neural network research almost disappears
1969–79 Early development of knowledge-based systems
1980–88 Expert systems industry booms
1988–93 Expert systems industry busts: “AI Winter”
1985–95 Neural networks return to popularity
1988– Resurgence of probability; general increase in technical depth
“Nouvelle AI”: ALife, GAs, soft computing
1995– Agents, agents, everywhere . . .
2003– Human-level AI back on the agenda
16
Course Introduction
Introduction to AI
Intelligent Agents
Success stories
Autonomous planning and scheduling
Game playing
Autonomous control
Diagnosis
Logistics Planning
Robotics
Language understanding and problem solving
17
Course Introduction
Introduction to AI
Intelligent Agents
Outline
1. Course Introduction
2. Introduction to AI
3. Intelligent Agents
21
Course Introduction
Introduction to AI
Intelligent Agents
Outline
Agents and environments
Rationality
PEAS (Performance measure, Environment, Actuators, Sensors)
Environment types
Agent types
22
Course Introduction
Introduction to AI
Intelligent Agents
Agents and environments
?
agent
percepts
sensors
actions
environment
actuators
Agents include humans, robots, softbots, thermostats, etc.
The agent function maps from percept histories to actions:
f : P∗
→ A
The agent program runs on the physical architecture to produce f
23
Course Introduction
Introduction to AI
Intelligent Agents
Vacuum-cleaner world
A B
Percepts: location and contents, e.g., [A, Dirty]
Actions: Left, Right, Suck, NoOp
24
Course Introduction
Introduction to AI
Intelligent Agents
A vacuum-cleaner agent
Percept sequence Action
[A, Clean] Right
[A, Dirty] Suck
[B, Clean] Left
[B, Dirty] Suck
[A, Clean], [A, Clean] Right
[A, Clean], [A, Dirty] Suck
.
.
.
.
.
.
function Reflex-Vacuum-Agent( [location,status]) returns an action
if status = Dirty then return Suck
else if location = A then return Right
else if location = B then return Left
What is the right function?
Can it be implemented in a small agent program?
25
Course Introduction
Introduction to AI
Intelligent Agents
Rationality
Fixed performance measure evaluates the environment sequence
– one point per square cleaned up in time T?
– one point per clean square per time step, minus one per move?
– penalize for > k dirty squares?
A rational agent chooses whichever action maximizes the expected value of
the performance measure given the percept sequence to date
Rational 6= omniscient
– percepts may not supply all relevant information
Rational 6= clairvoyant
– action outcomes may not be as expected
Hence, rational 6= successful
Rational =⇒ exploration, learning, autonomy
26
Course Introduction
Introduction to AI
Intelligent Agents
PEAS
To design a rational agent, we must specify the task environment
Consider, e.g., the task of designing an automated taxi:
Performance measure?? safety, destination, profits, legality, comfort, . . .
Environment?? streets/freeways, traffic, pedestrians, weather, . . .
Actuators?? steering, accelerator, brake, horn, speaker/display, . . .
Sensors?? video, accelerometers, gauges, engine sensors, keyboard, GPS, . . .
27
Course Introduction
Introduction to AI
Intelligent Agents
Internet shopping agent
Performance measure?? price, quality, appropriateness, efficiency
Environment?? current and future WWW sites, vendors, shippers
Actuators?? display to user, follow URL, fill in form
Sensors?? HTML pages (text, graphics, scripts)
28
Course Introduction
Introduction to AI
Intelligent Agents
Environment types
Solitaire Backgammon Internet shopping Taxi
Observable?? Yes Yes No No
Deterministic?? Yes No Partly No
Episodic?? No No No No
Static?? Yes Semi Semi No
Discrete?? Yes Yes Yes No
Single-agent?? Yes No Yes (except auctions) No
The environment type largely determines the agent design
The real world is (of course) partially observable, stochastic, sequential,
dynamic, continuous, multi-agent
29
Course Introduction
Introduction to AI
Intelligent Agents
Agent types
Four basic types in order of increasing generality:
– simple reflex agents
– model-based reflex agents
– goal-based agents
– utility-based agents
All these can be turned into learning agents
30
Course Introduction
Introduction to AI
Intelligent Agents
Simple reflex agents
Agent
Environment
Sensors
What the world
is like now
What action I
should do now
Condition−action rules
Actuators
31
Course Introduction
Introduction to AI
Intelligent Agents
Example
function Reflex-Vacuum-Agent( [location,status]) returns an action
if status = Dirty then return Suck
else if location = A then return Right
else if location = B then return Left
loc_A, loc_B = (0, 0), (1, 0) # The two locations for the Vacuum world
class ReflexVacuumAgent(Agent):
"A reflex agent for the two-state vacuum environment."
def __init__(self):
Agent.__init__(self)
def program((location, status)):
if status == ’Dirty’: return ’Suck’
elif location == loc_A: return ’Right’
elif location == loc_B: return ’Left’
self.program = program
32
Course Introduction
Introduction to AI
Intelligent Agents
Model based reflex agents
Agent
Environment
Sensors
What action I
should do now
State
How the world evolves
What my actions do
Condition−action rules
Actuators
What the world
is like now
33
Course Introduction
Introduction to AI
Intelligent Agents
Example
function Reflex-Vacuum-Agent( [location,status]) returns an action
static: last_A, last_B, numbers, initially ∞
if status = Dirty then . . .
class ModelBasedVacuumAgent(Agent):
"An agent that keeps track of what locations are clean or dirty."
def __init__(self):
Agent.__init__(self)
model = {loc_A: None, loc_B: None}
def program((location, status)):
"Same as ReflexVacuumAgent, except if everything is clean, do
model[location] = status ## Update the model here
if model[loc_A] == model[loc_B] == ’Clean’: return ’NoOp’
elif status == ’Dirty’: return ’Suck’
elif location == loc_A: return ’Right’
elif location == loc_B: return ’Left’
self.program = program
34
Course Introduction
Introduction to AI
Intelligent Agents
Goal-based agents
Agent
Environment
Sensors
What it will be like
if I do action A
What action I
should do now
State
How the world evolves
What my actions do
Goals
Actuators
What the world
is like now
35
Course Introduction
Introduction to AI
Intelligent Agents
Utility-based agents
Agent
Environment
Sensors
What it will be like
if I do action A
How happy I will be
in such a state
What action I
should do now
State
How the world evolves
What my actions do
Utility
Actuators
What the world
is like now
36
Course Introduction
Introduction to AI
Intelligent Agents
Learning agents
Performance standard
Agent
Environment
Sensors
Performance
element
changes
knowledge
learning
goals
Problem
generator
feedback
Learning
element
Critic
Actuators
37
Course Introduction
Introduction to AI
Intelligent Agents
Summary
Agents interact with environments through actuators and sensors
The agent function describes what the agent does in all circumstances
The performance measure evaluates the environment sequence
A perfectly rational agent maximizes expected performance
Agent programs implement (some) agent functions
PEAS descriptions define task environments
Environments are categorized along several dimensions:
observable? deterministic? episodic? static? discrete? single-agent?
Several basic agent architectures exist:
reflex, model-based reflex, goal-based, utility-based
38

More Related Content

PPT
M1 intro
PPT
Artificial Intelligence
PPT
Artificial intelligence intro
PPT
CH1_AI_Lecture1.ppt
PPT
Introduction
PDF
Introduction to Artificial Intelligence.pdf
PPT
901470_Chap1.ppt.artificial intelligence
PDF
Sesi 1-1 Pengantar AI.pdf
M1 intro
Artificial Intelligence
Artificial intelligence intro
CH1_AI_Lecture1.ppt
Introduction
Introduction to Artificial Intelligence.pdf
901470_Chap1.ppt.artificial intelligence
Sesi 1-1 Pengantar AI.pdf

Similar to Course Introduction Artificial Intelligence by Marco Chiarandini (20)

PPT
Ai chap1 intro
PPT
EELU AI lecture 1- fall 2022-2023 - Chapter 01- Introduction.ppt
PDF
L1-Introduction to Artificial Intelligence.pdf
PPTX
chapter 1 AI.pptx
PPT
CS 561a: Introduction to Artificial Intelligence
PPT
AI_Intro1.ppt
PPT
901470_Chap1.ppt
PPT
901470_C ffs f sdf sdf sdffffd sdf hap1.ppt
PPT
Chap1.ppt
PPT
Artificial Intelligence Basics and their applications
PPT
901470 chap1
PPT
artificial intelligence basis-introduction
PPT
AI BASICS -INTRODUCTION AND APPLICATIONS
PPT
901470_Chap1.ppt
PPT
901470_Chap1 (1).ppt
PPT
Artificial Intelligence for Business.ppt
PPT
eaturesartificial intelligence and understanding of ai fr.ppt
PPT
901470_Chap1.ppt about to Artificial Intellgence
PPT
901470_Chap1.ppt
Ai chap1 intro
EELU AI lecture 1- fall 2022-2023 - Chapter 01- Introduction.ppt
L1-Introduction to Artificial Intelligence.pdf
chapter 1 AI.pptx
CS 561a: Introduction to Artificial Intelligence
AI_Intro1.ppt
901470_Chap1.ppt
901470_C ffs f sdf sdf sdffffd sdf hap1.ppt
Chap1.ppt
Artificial Intelligence Basics and their applications
901470 chap1
artificial intelligence basis-introduction
AI BASICS -INTRODUCTION AND APPLICATIONS
901470_Chap1.ppt
901470_Chap1 (1).ppt
Artificial Intelligence for Business.ppt
eaturesartificial intelligence and understanding of ai fr.ppt
901470_Chap1.ppt about to Artificial Intellgence
901470_Chap1.ppt
Ad

More from cniclsh (8)

PDF
Lecture 2 Solving Problems by Searching by Marco Chiarandini
PDF
Lecture 5 Baysian Networks by Marco Chiarandini
PDF
Project Topic Presentation Data and Web Science Group IE686 Large Language Mo...
PDF
Instruction Tuning and Reinforcement Learning from Human Feedback Data and We...
PDF
LLM Agents and Tool Use Data and Web Science Group IE686 Large Language Model...
PDF
Introduction and Organization Data and Web Science Group IE686 Large Language...
PDF
DM2556 Intercultural communication Lecture 3
PDF
Speech and Speaker Recognition - Language Modelling
Lecture 2 Solving Problems by Searching by Marco Chiarandini
Lecture 5 Baysian Networks by Marco Chiarandini
Project Topic Presentation Data and Web Science Group IE686 Large Language Mo...
Instruction Tuning and Reinforcement Learning from Human Feedback Data and We...
LLM Agents and Tool Use Data and Web Science Group IE686 Large Language Model...
Introduction and Organization Data and Web Science Group IE686 Large Language...
DM2556 Intercultural communication Lecture 3
Speech and Speaker Recognition - Language Modelling
Ad

Recently uploaded (20)

PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
System and Network Administraation Chapter 3
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
L1 - Introduction to python Backend.pptx
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Understanding Forklifts - TECH EHS Solution
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Nekopoi APK 2025 free lastest update
PPTX
Odoo POS Development Services by CandidRoot Solutions
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
System and Network Administraation Chapter 3
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
L1 - Introduction to python Backend.pptx
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PTS Company Brochure 2025 (1).pdf.......
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Understanding Forklifts - TECH EHS Solution
How Creative Agencies Leverage Project Management Software.pdf
Design an Analysis of Algorithms II-SECS-1021-03
Which alternative to Crystal Reports is best for small or large businesses.pdf
Nekopoi APK 2025 free lastest update
Odoo POS Development Services by CandidRoot Solutions
VVF-Customer-Presentation2025-Ver1.9.pptx
Upgrade and Innovation Strategies for SAP ERP Customers
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...

Course Introduction Artificial Intelligence by Marco Chiarandini

  • 1. Lecture 1 Course Introduction Artificial Intelligence Marco Chiarandini Department of Mathematics & Computer Science University of Southern Denmark Slides by Stuart Russell and Peter Norvig
  • 2. Course Introduction Introduction to AI Intelligent Agents Outline 1. Course Introduction 2. Introduction to AI 3. Intelligent Agents 2
  • 3. Course Introduction Introduction to AI Intelligent Agents Outline 1. Course Introduction 2. Introduction to AI 3. Intelligent Agents 3
  • 4. Course Introduction Introduction to AI Intelligent Agents Course Presentation Schedule (20 classes): Tuesday 8:15-9:00 Wednsday 12:15-14:00 Thursday 12:15-14:00 Last lecture: Thursday, 22nd December, 2011 Communication tools Course Public Web Site (Ws) ⇔ Blackboard (Bb) Announcements (Bb) (link from http://www.imada.sdu.dk/~marco/DM828/) Classes, breaks, after classes, office Personal email (Bb) Course content 4
  • 5. Course Introduction Introduction to AI Intelligent Agents Course Presentation Course Material: Text Book: B1 S. Russell and P. Norvig. Artificial Intelligence: A Modern Approach. Prentice Hall, 2003 Notes and Slides from the web site Execises (programming in python + preparation to exam) Evaluation: 3/4 Passed/Failed Assignments (programming in python + conceptual) A failed assignement must be resumbitted one week after the evaluation. Written Exam, 3 hours, no books, external censor Preparation: Exercise classes, once per week. Preparation required. 5
  • 6. Course Introduction Introduction to AI Intelligent Agents Outline 1. Course Introduction 2. Introduction to AI 3. Intelligent Agents 6
  • 7. Course Introduction Introduction to AI Intelligent Agents Outline ♦ What is AI? ♦ A brief history ♦ The state of the art 7
  • 8. Course Introduction Introduction to AI Intelligent Agents What is AI? Systems that think like humans Systems that think rationally Systems that act like humans Systems that act rationally 8
  • 9. Course Introduction Introduction to AI Intelligent Agents Acting humanly: The Turing test Turing (1950) “Computing machinery and intelligence”: ♦ “Can machines think?” −→ “Can machines behave intelligently?” ♦ Operational test for intelligent behavior: the Imitation Game AI SYSTEM HUMAN ? HUMAN INTERROGATOR ♦ Predicted that by 2000, a machine might have a 30% chance of fooling a lay person for 5 minutes ♦ Anticipated all major arguments against AI in following 50 years ♦ Suggested major components of AI: knowledge, reasoning, language understanding, learning Problem: Turing test is not reproducible, constructive, or amenable to mathematical analysis 9
  • 10. Course Introduction Introduction to AI Intelligent Agents ALICE Human: Hi Alice ALICE: Hello there. Human: How are you? ALICE: My logic and cognitive functions are normal. Human: mmh. ALICE: What do you really want to ask me? Human:. and all the rest? ALICE: Perhaps there are a few exception. Human: Which for example? ALICE: The first one, I think. Human: feelings? ALICE: Electronic brains like me have no emotions. Human: are you sure? ALICE: I am as sure as I can be. Human: How can you know what feelings are if you never had them? ALICE: Knowledge is of two kinds: that which we learn from the senses and that which is true "a priori". 10
  • 11. Course Introduction Introduction to AI Intelligent Agents Thinking humanly: Cognitive Science 1960s “cognitive revolution”: information-processing psychology replaced prevailing orthodoxy of behaviorism (mind is just the behaviour of the body) Requires scientific theories of internal activities of the brain – What level of abstraction? “Knowledge” or “circuits”? – How to validate? Requires 1) Predicting and testing behavior of human subjects (top-down) 2) Direct identification from neurological data (bottom-up) Both approaches (roughly, Cognitive Science and Cognitive Neuroscience) are now distinct from AI. They investigate human cognition by introspection, psychological experiments and brain imaging. However they crossfertilize each other (eg. computer vision) 11
  • 12. Course Introduction Introduction to AI Intelligent Agents Thinking rationally: Laws of Thought Normative (or prescriptive) rather than descriptive approach Aristotle: what are correct arguments/thought processes? Several Greek schools developed various forms of logic: notation and rules of derivation for thoughts; Direct line through mathematics and philosophy to modern AI Logist tradition: try to solve any solvable problem describing it in logical notation and building on programs that can find solutions Problems: 1) Not all intelligent behavior is mediated by logical deliberation what for example if knoweldge is less than 100% certain? 2) programs to solve the large problems arising from the logist tradition do not exist in practice. 12
  • 13. Course Introduction Introduction to AI Intelligent Agents Acting rationally Rational behavior: doing the right thing The right thing: that which is expected to maximize goal achievement, given the available information Doesn’t necessarily involve thinking—e.g., blinking reflex—but thinking should be in the service of rational action Aristotle (Nicomachean Ethics): Every art and every inquiry, and similarly every action and pursuit, is thought to aim at some good However, humans do not always act rationally 1) Approach more amenable to scientific development than approaches based on human behaviour or human thought. 2) Leads to study correct inference and general laws of thought 13
  • 14. Course Introduction Introduction to AI Intelligent Agents Rational agents An agent is an entity that perceives and acts This course is about general principles for designing rational agents and their components Abstractly, an agent is a function from percept histories to actions: f : P∗ → A For any given class of environments and tasks, we seek the agent (or class of agents) with the best performance Caveat: computational limitations make perfect rationality unachievable → design best program for given machine resources 14
  • 15. Course Introduction Introduction to AI Intelligent Agents Potted history of AI 1943 McCulloch & Pitts: Boolean circuit model of brain 1950 Turing’s “Computing Machinery and Intelligence” 1952–69 Look, Ma, no hands! 1950s Early AI programs, including Samuel’s checkers program, Newell & Simon’s Logic Theorist, Gelernter’s Geometry Engine 1956 Dartmouth meeting: “Artificial Intelligence” adopted 1965 Robinson’s complete algorithm for logical reasoning 1966–74 AI discovers computational complexity Neural network research almost disappears 1969–79 Early development of knowledge-based systems 1980–88 Expert systems industry booms 1988–93 Expert systems industry busts: “AI Winter” 1985–95 Neural networks return to popularity 1988– Resurgence of probability; general increase in technical depth “Nouvelle AI”: ALife, GAs, soft computing 1995– Agents, agents, everywhere . . . 2003– Human-level AI back on the agenda 16
  • 16. Course Introduction Introduction to AI Intelligent Agents Success stories Autonomous planning and scheduling Game playing Autonomous control Diagnosis Logistics Planning Robotics Language understanding and problem solving 17
  • 17. Course Introduction Introduction to AI Intelligent Agents Outline 1. Course Introduction 2. Introduction to AI 3. Intelligent Agents 21
  • 18. Course Introduction Introduction to AI Intelligent Agents Outline Agents and environments Rationality PEAS (Performance measure, Environment, Actuators, Sensors) Environment types Agent types 22
  • 19. Course Introduction Introduction to AI Intelligent Agents Agents and environments ? agent percepts sensors actions environment actuators Agents include humans, robots, softbots, thermostats, etc. The agent function maps from percept histories to actions: f : P∗ → A The agent program runs on the physical architecture to produce f 23
  • 20. Course Introduction Introduction to AI Intelligent Agents Vacuum-cleaner world A B Percepts: location and contents, e.g., [A, Dirty] Actions: Left, Right, Suck, NoOp 24
  • 21. Course Introduction Introduction to AI Intelligent Agents A vacuum-cleaner agent Percept sequence Action [A, Clean] Right [A, Dirty] Suck [B, Clean] Left [B, Dirty] Suck [A, Clean], [A, Clean] Right [A, Clean], [A, Dirty] Suck . . . . . . function Reflex-Vacuum-Agent( [location,status]) returns an action if status = Dirty then return Suck else if location = A then return Right else if location = B then return Left What is the right function? Can it be implemented in a small agent program? 25
  • 22. Course Introduction Introduction to AI Intelligent Agents Rationality Fixed performance measure evaluates the environment sequence – one point per square cleaned up in time T? – one point per clean square per time step, minus one per move? – penalize for > k dirty squares? A rational agent chooses whichever action maximizes the expected value of the performance measure given the percept sequence to date Rational 6= omniscient – percepts may not supply all relevant information Rational 6= clairvoyant – action outcomes may not be as expected Hence, rational 6= successful Rational =⇒ exploration, learning, autonomy 26
  • 23. Course Introduction Introduction to AI Intelligent Agents PEAS To design a rational agent, we must specify the task environment Consider, e.g., the task of designing an automated taxi: Performance measure?? safety, destination, profits, legality, comfort, . . . Environment?? streets/freeways, traffic, pedestrians, weather, . . . Actuators?? steering, accelerator, brake, horn, speaker/display, . . . Sensors?? video, accelerometers, gauges, engine sensors, keyboard, GPS, . . . 27
  • 24. Course Introduction Introduction to AI Intelligent Agents Internet shopping agent Performance measure?? price, quality, appropriateness, efficiency Environment?? current and future WWW sites, vendors, shippers Actuators?? display to user, follow URL, fill in form Sensors?? HTML pages (text, graphics, scripts) 28
  • 25. Course Introduction Introduction to AI Intelligent Agents Environment types Solitaire Backgammon Internet shopping Taxi Observable?? Yes Yes No No Deterministic?? Yes No Partly No Episodic?? No No No No Static?? Yes Semi Semi No Discrete?? Yes Yes Yes No Single-agent?? Yes No Yes (except auctions) No The environment type largely determines the agent design The real world is (of course) partially observable, stochastic, sequential, dynamic, continuous, multi-agent 29
  • 26. Course Introduction Introduction to AI Intelligent Agents Agent types Four basic types in order of increasing generality: – simple reflex agents – model-based reflex agents – goal-based agents – utility-based agents All these can be turned into learning agents 30
  • 27. Course Introduction Introduction to AI Intelligent Agents Simple reflex agents Agent Environment Sensors What the world is like now What action I should do now Condition−action rules Actuators 31
  • 28. Course Introduction Introduction to AI Intelligent Agents Example function Reflex-Vacuum-Agent( [location,status]) returns an action if status = Dirty then return Suck else if location = A then return Right else if location = B then return Left loc_A, loc_B = (0, 0), (1, 0) # The two locations for the Vacuum world class ReflexVacuumAgent(Agent): "A reflex agent for the two-state vacuum environment." def __init__(self): Agent.__init__(self) def program((location, status)): if status == ’Dirty’: return ’Suck’ elif location == loc_A: return ’Right’ elif location == loc_B: return ’Left’ self.program = program 32
  • 29. Course Introduction Introduction to AI Intelligent Agents Model based reflex agents Agent Environment Sensors What action I should do now State How the world evolves What my actions do Condition−action rules Actuators What the world is like now 33
  • 30. Course Introduction Introduction to AI Intelligent Agents Example function Reflex-Vacuum-Agent( [location,status]) returns an action static: last_A, last_B, numbers, initially ∞ if status = Dirty then . . . class ModelBasedVacuumAgent(Agent): "An agent that keeps track of what locations are clean or dirty." def __init__(self): Agent.__init__(self) model = {loc_A: None, loc_B: None} def program((location, status)): "Same as ReflexVacuumAgent, except if everything is clean, do model[location] = status ## Update the model here if model[loc_A] == model[loc_B] == ’Clean’: return ’NoOp’ elif status == ’Dirty’: return ’Suck’ elif location == loc_A: return ’Right’ elif location == loc_B: return ’Left’ self.program = program 34
  • 31. Course Introduction Introduction to AI Intelligent Agents Goal-based agents Agent Environment Sensors What it will be like if I do action A What action I should do now State How the world evolves What my actions do Goals Actuators What the world is like now 35
  • 32. Course Introduction Introduction to AI Intelligent Agents Utility-based agents Agent Environment Sensors What it will be like if I do action A How happy I will be in such a state What action I should do now State How the world evolves What my actions do Utility Actuators What the world is like now 36
  • 33. Course Introduction Introduction to AI Intelligent Agents Learning agents Performance standard Agent Environment Sensors Performance element changes knowledge learning goals Problem generator feedback Learning element Critic Actuators 37
  • 34. Course Introduction Introduction to AI Intelligent Agents Summary Agents interact with environments through actuators and sensors The agent function describes what the agent does in all circumstances The performance measure evaluates the environment sequence A perfectly rational agent maximizes expected performance Agent programs implement (some) agent functions PEAS descriptions define task environments Environments are categorized along several dimensions: observable? deterministic? episodic? static? discrete? single-agent? Several basic agent architectures exist: reflex, model-based reflex, goal-based, utility-based 38