Professional Documents
Culture Documents
Lecture # 2,3
Lecture # 2,3
3
Agents
is anything that can be viewed as
perceiving its environment through and
acting upon that environment through
5
6
Agents and environments
9
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.
How to evaluate agent’s success?
Performance measure – is a criteria to measure
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
Performance measure according to what is
wanted in the environment instead of how the
agents should behave.
10
Contd...
What is rational - depends on four things:
– The performance measure
– The agent’s prior knowledge of the environment
– The actions the agent can perform
– The agent’s 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.
11
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 ….!
Rational ⇒ exploration, learning, autonomy
12
Building Rational Agents
PEAS Description to Specify Task
Environments
13
PEAS: Specifying an automated
taxi
Performance measure:
?
Environment:
?
Actuators:
?
Sensors:
?
14
Contd…
Performance measure:
safe, fast, legal, comfortable, maximize profits
Environment:
roads, other traffic, pedestrians, customers
Actuators:
steering, accelerator, brake, signal, horn
Sensors:
cameras, sonar, speedometer, GPS
15
PEAS: Specifying a 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
16
PEAS: Specifying an
interactive English tutor
Performance measure:
Maximize student's score on test
Environment:
Set of students
Actuators:
Screen display (exercises, suggestions,
corrections)
Sensors:
Keyboard, user interface
17
Environment types
0 Fully observable(vs. partially observable)
Fully -everything seen shows all relevant information
partially -noise, inaccurate sensors, hidden info,...
0 Deterministic (vs. stochastic)
Deterministic -next state depends on current state and
next action
stochastic -other factors involved (complex?)
0 Episodic (vs. sequential)
episodic one self-contained, independent situation
sequential -current decision affects future ones
18
Environment types
0 Static (vs. dynamic)
static -environment is fixed during decision
making
dynamic -environment changes
0 Discrete(vs. continuous)
discrete -finite # states (measurements, values,...)
Continuous -smooth, infinite scale
0 Single agent(vs. multi-agent)
single -one agent involved
multi -more than one (adversary or cooperative)
19
Examples
20
21
Table Driven Approach
22
Agent types
23
Simple reflex agents
Simplest
No percept history
› These agents select actions on the basis of current
percept
The condition-action rules
› if car-in-front-is-braking then brake
› if light-becomes-green then move-forward
› if intersection-has-stop-sign then stop
› If dirty then suck
24
Simple reflex agents
0 Characteristics
0Such agents have limited intelligence…
0Efficient
0No internal representation for reasoning,
inference.
0No strategic planning, learning.
0Are not good for multiple, opposing goals.
0 Works only if correct decision can be made
on basis of current percept.
25
Simple reflex agents
28
Simple Reflex Agent
see action
Agent
Environment
29
Model based reflex agents
To tackle partially observable environments.
To update its state the agent needs two kinds of
knowledge:
how the world evolves independently from the
agent;
Ex: an overtaking car gets closer with time.
how the world is affected by the agent’s actions.
Ex: if I turn left, what was to my right is
now behind Me.
30
Model based reflex agents
31
Model-based reflex agents
32
Model Based reflex Agent
Agent
see action
Predict
state
Environment
33
Goal based agents
0 Current state of environments is not always
enough
0e.g at a road junction, it can turn left, right or
go straight
0Correct decision in such cases depends on where
taxi is trying to get to
0 Major difference: future is taken into account
0 Combining goal information with the knowledge of
its actions, the agent can choose those actions that
will achieve the goal.
34
Goal based agents
0 Goal-based Agents are much more flexible in
responding to a changing environment;
accepting different goals.
0 Such agents work as follows:
0 information comes from sensors - percepts
0 changes the agents current state of the world
0 based on state of the world and knowledge
(memory) and goals/intentions, it chooses
actions and does them through the effectors.
35
Goal-based agents
36
Goal Based Agent
Agent
see Goals Decision action
Predict State
Environment
37
Utility based agents
0 Goals alone are not always enough to
generate quality behaviours
0 E.g. different action sequences can take
the taxi agent to destination (and
achieving thereby the “goal”) – but some
may be quicker, safer, economical etc ..
0 A general performance measure is
required to compare different world states
38
Utility based agents
0 A utility function maps a state (or sequence of
states) to a real number to take rational decisions
and to specify tradeoffs when:
0 goals are conflicting – like speed and safety
0There are several goals and none of which can
be achieved with certainty
39
Utility-based agents
40
Learning agents
0 A learning agent can be divided into four
conceptual components:
0 Learning Element
0 Responsible for making improvements in Performance element
0 uses feedback from Critic to determine how performance element should
be modified to do better
0 Performance Element
0 Responsible for taking external actions
0 selecting actions based on percepts
0 Critic
0 Tells the learning element how well agent is doing w.r.t. to fixed
performance standard
0 Problem Generator
0 Responsible for suggesting actions that will lead to improved and
informative experiences.
41
Learning agents
42
43