Professional Documents
Culture Documents
CSE643
(Monsoon 2021)
Lecture #3
Tip: Take your own notes during lectures
C. Anantaram
c.anantaram@iiitd.ac.in
Google classroom code: dke4bgy
Note: This session is being recorded.
Disclaimer: I do not claim that all material in these slides are self-produced.
Some Material for the slides are taken from internet and other sources.
RECAP: Intelligent Agents
• Agents and environments
• Rationality
• Environment types
• Agent types
2
From https://cs.brynmawr.edu/Courses/cs372/fall2017/IntroducingAI2.pdf
3
RECAP: Agents
• Agent: An agent is anything that can be viewed as perceiving its
environment through sensors and acting upon that environment
through actuators
• 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
• Software agent: receives keystrokes, file contents, network packets as
sensory inputs and acts by displaying, writing files, sending network
packets, etc.
4
RECAP: Agent
5
From https://cs.brynmawr.edu/Courses/cs372/fall2017/IntroducingAI2.pdf
RECAP: Agent = Architecture + Program
6
From https://cs.brynmawr.edu/Courses/cs372/fall2017/IntroducingAI2.pdf
RECAP: Example: Vacuum cleaner world
7
From https://cs.brynmawr.edu/Courses/cs372/fall2017/IntroducingAI2.pdf
A vacuum cleaner agent
8
A vacuum cleaner agent
9
From https://cs.brynmawr.edu/Courses/cs372/fall2017/IntroducingAI2.pdf
A vacuum cleaner agent
10
From https://cs.brynmawr.edu/Courses/cs372/fall2017/IntroducingAI2.pdf
Designing Agents
11
From https://cs.brynmawr.edu/Courses/cs372/fall2017/IntroducingAI2.pdf
Agents: Performance measurement
• An agent should strive to "do the right thing", based on what it can
perceive and the actions it can perform. The right action is the one
that will cause the agent to be most successful
• Performance measure: An objective criterion for success of an agent's
behavior
• E.g., performance measure of a vacuum‐cleaner agent could be
amount of dirt cleaned up, amount of time taken, amount of
electricity consumed, amount of noise generated, etc
12
From https://cs.brynmawr.edu/Courses/cs372/fall2017/IntroducingAI2.pdf
Rational agents
• Rational Agent: For each possible percept sequence, a rational agent
should select an action that is expected to maximize its performance
measure, given the evidence provided by the percept sequence and
whatever built‐in knowledge the agent has
13
From https://cs.brynmawr.edu/Courses/cs372/fall2017/IntroducingAI2.pdf
PEAS
• PEAS: Performance measure, Environment, Actuators, Sensors
• Must first specify the setting for intelligent agent design
• Consider, e.g., the task of designing an automated taxi (Autonomous
Uber?)
• Performance measure : comfort, shortest route, rating, safety,
punctuality
• Environment: traffic, roads, potholes, weather
• Actuators: brake, steering, accelerator
• Sensors: cameras, iot sensors, proximity sensors, lidars
14
PEAS
• PEAS: Performance measure, Environment, Actuators, Sensors
• Must first specify the setting for intelligent agent design
• Consider, e.g., the task of designing an automated taxi driver
• Performance measure: Safe, fast, legal, comfortable trip, profits
• Environment: Roads, other traffic, pedestrians, customers
• Actuators: Steering wheel, accelerator, brake, signal, horn
• Sensors: Cameras, sonar, speedometer, GPS, odometer, engine sensors,
keyboard
15
PEAS – an example
• Agent: Medical diagnosis system
• Performance measure: Healthy patient, minimize costs, lawsuits
• Environment: Patient, hospital, staff
• Actuators: Screen display (questions, tests, diagnoses, treatments,
referrals)
• Sensors: Keyboard (entry of symptoms, findings, patient's answers)
16
PEAS – an example – part-picking robot
• For a part-picking robot agent specify the PEAS
17
PEAS – an example – part-picking robot
Agent: Part‐picking robot
18
19
Environment types
• Fully observable (vs. partially observable): An agent's sensors give it access
to the complete state of the environment at each point in time.
20
Environment types
• Static (vs. dynamic): The environment is unchanged while an agent is
deliberating. (The environment is semidynamic if the environment
itself does not change with the passage of time but the agent's
performance score does)
21
Environment types
Chess Earthquake Internet Automated car Real-world
Shopping
22
Environment types
Chess Earthquake Internet Automated car Real-world
Shopping
24
Vacuum cleaner robot agent – Table lookup
function TableDrivenVacuumAgent(percept) returns action
append percept to end of percepts
action ← LookUp(percepts, table)
return action
Drawbacks:
• Huge table
• Takes a long time to build the table
• No autonomy
• Even with learning, need a long time to learn the table entries
26
Agent types
In order of increasing generality:
• Goal‐based agents
• Utility‐based agents
27
Simple Reflex Agent
28
Simple Reflex Agent
function SimpleReflexAgent(percept) returns Action
persistent: rules, a set of condition‐action rules
state ←InterpretInput(percept)
rule ← RuleMatch(state, rules)
action ← rule.Action
return action
29
Model based Reflex Agents
30
Model based Reflex Agents
function ModelBasedReflexAgent(percept) returns Action
persistent:
state, the agent’s current conception of the world state
model, a description of how the next state depends on current state and action
rules, a set of condition‐action rules
action, the most recent action, initially none
31
Goal-based agents
32
Utility based agents
33
Learning agents
34
How the components of Agent program works?
35
How the components of Agent program works?
• In an atomic representation each state of the world is indivisible—it
has no internal structure
• Search and game-playing, Hidden Markov models and Markov decision
processes all work with atomic representations—or, at least, they treat
representations as if they were atomic
36
Reference
• Chapter 2, Russell and Norvig
37