You are on page 1of 33

INTELLIGENT AGENTS

LECTURE OBJECTIVES
Agents and environments
Rationality
PEAS (Performance measure, Environment, Actuators,
Sensors)
Environment types
Agent types

AGENTS
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 agents or softbots that have some functions as


sensors and some functions as actuators.

Askjeeves.com is an example of a softbot.

4. Expert systems like the Cardiologist is an agent.


5. Autonomous spacecrafts.

GLOSSARY
Percept
agents perceptual inputs
Percept sequence
History of everything the agent has perceived
Agent function
Describes agents behaviour maps any percept to an
action
Agent program
Implements agent function

AGENTS AND ENVIRONMENTS

The agent function maps from percept histories to


actions:
[f: P* A]
The agent program runs on the physical architecture
to produce f
agent = architecture + program

EXAMPLE: VACUUM-CLEANER
AGENT

Percepts: location and


contents, e.g., [A,Dirty]
Actions: Left, Right,
suck, NoOp
A simple agent
function may be if
the current square is
dirty, then suck or move
to other square..

Agent Program !!!

Whats right way to fill actions


in above table what makes6 an
agent
good
or
bad,
intelligent or stupid..

INTELLIGENT AGENTS
The

fundamental faculties of intelligence are

Acting

Sensing

Understanding,

reasoning, learning

Intelligent Agent must sense, must act,


must be autonomous (to some extent).
It also
An

must

AI

be rational.

is about building rational agents.

RATIONAL AGENT
An agent should strive to "do the right thing", based on
what it can perceive and the actions it can perform.
What is the right thing?

Causes the agent to be most successful


Require a way to measure success
Rationality is not the same as Perfection - Rationality maximizes Expected Performance
Perfection maximizes Actual Performance

Performance measure is a criteria to measure an agents


behaviour
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
Not always easy to select because measuring
8

performance/behaviour has deep philosophical meanings

RATIONALITY CONTD

What is rational - depends on four things:


The performance measure
The agents prior knowledge of the environment
The actions the agent can perform
The agents percept sequence to date

A rational agent is:


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
what ever built in knowledge the agent has.

can you describe an example of a rational agent !

RATIONAL AGENTS CONTD


Rationality is distinct from omniscience (all-knowing
with infinite knowledge)
Agents can perform actions in order to modify future
percepts so as to obtain useful information
(information gathering, exploration an important
part of rationality)
An agent is autonomous if its behavior is determined
by its own experience (with ability to learn and adapt)
a rational agent should be autonomous .!

10

IS OUR VACUUM-CLEANER AGENT


RATIONAL?
Keeping in view four aspects to measure rationality:
The

performance measure awards one point for


each clean square at each time step over 10000
time steps.
The geography of the environment is known.
- Clean squares stay clean and sucking cleans
the current square.
Only actions are left, right, suck, and NoOp
The agent correctly perceives its location and
whether that location contains dirt.
11

Whats your Answer -- Yes/No

BUILDING RATIONAL AGENTS


PEAS DESCRIPTION TO SPECIFY TASK
ENVIRONMENTS
Must

first specify the setting for intelligent


agent design
PEAS: Performance measure, Environment,
Actuators, Sensors these specify the task
environment for a rational agent
Consider, e.g., the task of designing an
automated taxi driver:
Performance

measure: Safe, fast, legal, comfortable


trip, maximize profits
Environment: Roads, other traffic, pedestrians,
customers
Actuators: Steering wheel, accelerator, brake, signal,
horn
12
Sensors: Cameras, sonar, speedometer, GPS,
odometer, engine sensors, keyboard

PEAS
Agent: Medical diagnosis system
Performance measure: Healthy patient, minimize
costs, lawsuits
Environment: Patient, hospital, staf
Actuators: Screen display (questions, tests, diagnoses,
treatments, referrals)
Sensors: Keyboard (entry of symptoms, findings,
patient's answers)

13

PEAS
Agent: Part-picking robot
Performance measure: Percentage of parts in correct
bins
Environment: Conveyor belt with parts, bins
Actuators: Jointed arm and hand
Sensors: Camera, joint angle sensors

14

PEAS
Agent: Interactive English tutor
Performance measure: Maximize student's score on
test
Environment: Set of students
Actuators: Screen display (exercises, suggestions,
corrections)
Sensors: Keyboard

15

ENVIRONMENT TYPES/PROPERTIES OF TASK


ENVIRONMENTS

Fully observable (vs. partially observable):

An agent's sensors give it access to the complete state


of the environment at each point in time.

Fully Observable environments are convenient as an agent


need not to maintain internal states to keep track of
world..
Partially Observability may be due to noisy/inaccurate
sensors OR part of state is missing

e.g a taxi agent doesnt has sensor to see what other drivers are
doing/thinking .

Deterministic (vs. stochastic):

The next state of the environment is completely


determined by the current state and the action
executed by the agent. (If the environment is
deterministic except for the actions of other agents,
then the environment is strategic)

Vacuum worlds is Deterministic while Taxi Driving is


Stochastic as one can not exactly predict the behaviour of
traffic
16

ENVIRONMENT TYPES
Episodic

(vs. sequential):
The agent's experience is divided into atomic
"episodes" (each episode consists of the agent
perceiving and then performing a single action),
and the choice of action in each episode depends
only on the episode itself.
Next episode does not depend on the actions taken in previous
episodes.
E.g. an agent sorting defective parts in an assembly line is episodic
while a taxi driving agent or a chess playing agent are sequential
.

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
17
agent's performance score does)

Taxi Driving is Dynamic, Crossword Puzzle solver is static

ENVIRONMENT TYPES CONTD


Discrete

(vs. continuous): A limited number of


distinct, clearly defined percepts and actions.
e,.g. chess game has finite number of states
Taxi Driving is continuous-state and continuous-time
problem

Single

agent (vs. multiagent): An agent


operating by itself in an environment.

An agent solving a crossword puzzle is in a single agent


environment
Agent in chess playing is in two-agent environment

18

EXAMPLES

The environment type largely determines the agent


design
19
The real world is (of course) partially observable,
stochastic, sequential, dynamic, continuous, multi-

AGENT TYPES
Four basic types in order of increasing generality:
Simple reflex agents
Model-based reflex agents
Goal-based agents
Utility-based agents
Learning Agents

All of these can be turned into learning


agents

20

SIMPLE REFLEX AGENTS


comes from sensors - percepts
Changes the agents current state of the world
Information

These agents select actions on the basis of current percept

Triggers
The

actions through the effectors

condition-action rules allow the agent to make


connection from percept to actions

Characteristics

Such agents have limited intelligence


Efficient
No internal representation for reasoning, inference.
No strategic planning, learning.
Are not good for multiple, opposing, goals.

21

SIMPLE REFLEX AGENTS

22

MODEL BASED REFLEX AGENTS


These

agents keep track of part of world it cant


see ..
Agent maintains internal state through the
knowledge about:
How the world evolves independently of the agent and
How agents actions afect the world ..

Thus

a model based agent works as follows:

information comes from sensors - percepts


based on this, the agent changes the current state of the world
based on state of the world and knowledge (memory), it
triggers actions through the effectors
E.g.

Know about other car location in overtaking scenario for taxi driving
agent
When agent turns the steering clockwise, car turns right .

23

MODEL-BASED REFLEX AGENTS

24

GOAL BASED AGENTS

Current state of environments is not always enough .

e.g at a road junction, it can turn left, right or go straight ..


Correct decision in such cases depends on where taxi is trying
to get to .

Agents need some Goal information as well to describe


desirable situations

Knowledge to support decisions (according to goals set) is


explicitly modelled and can be modified as well

The taxi driving agent is not to hit the other car so will have
all rules set to support actions in diferent situations

Such agents work as follows:

information comes from sensors - percepts


changes the agents current state of the world
based on state of the world and knowledge (memory) and
25
goals/intentions, it chooses actions and does them through the
effectors.

GOAL-BASED AGENTS

26

UTILITY BASED AGENTS


Goals

alone are not always enough to generate


quality behaviours
eg

different action sequences can take the taxi agent to


destination (and achieving thereby the goal) but
some may be quicker, safer, economical etc ..

general performance measure is required to


compare diferent world states
A utility function maps a state (or sequence of
states) to a real number to take rational
decisions and to specify tradeofs when:
goals are conflicting like speed and safety
There are several goals and none of which can be achieved
with certainty

27

UTILITY-BASED AGENTS

28

LEARNING AGENTS
A

learning agent can be divided into four


conceptual components:
Learning

Element

Responsible for making improvements

uses feedback from Critic to determine how performance


element should be modified to do better.

Performance

Element

Responsible for taking external actions

Critic

Tells the learning element how well agent is doing wrt to


fixed performance standards

Problem

Generator

Responsible for suggesting actions .


Especially suggesting exploratory type actions.

29

For

a taxi driver agent:

Performance

element consists of collection of


knowledge and procedures for selecting driving
actions
The Critic observes the world and passes the
information to performance element e.g.
reaction/response of other drivers when the agent
takes quick left turn from top lane !!

Learning element then can formulate a rule to mark a bad


action

Problem

generator identifies certain areas of


behaviour improvement and suggest experiments
trying brakes on diferent road conditions etc
The Learning element can make changes in
knowledge components by observing pairs of
successive states allow an agent to learn (learn from
what happens when strong brake is applied on a wet
30
road )

LEARNING AGENTS

31

SUMMARY
An agent is something that perceives and acts
in an environment. The agent function
specifies the action taken by the agent in
response to any percept sequence.
The performance measure evaluates the
behaviour of the agent in the environment. A
rational agent acts to maximise the expected
value of the performance measure.
Task environments can be fully or partially
observable,
deterministic
or
stochastic,
episodic or sequential, static or dynamic,
32
discrete or continuous, and single-agent or
multiagent

SUMMARY
Simplex

reflex agents respond directly to


percepts, whereas model-based reflex agents
maintain internal state to track aspects of the
world that are not evident in the current percept.
Goal-based agents act to achieve their goals,
and utility-based agents try to maximize their
own expected happiness.
All agents can improve their performance
through learning
33

You might also like