Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 43

Objectives

0 Agents and environments


0 Rationality
0 PEAS (Performance measure,
Environment, Actuators, Sensors)
0 Environment types
0 Agent types

3
Agents
is anything that can be viewed as
perceiving its environment through and
acting upon that environment through

› eyes, ears, and other organs for sensors;


› legs, mouth, and other body parts for actuators

› cameras and infrared range finders for sensors;


› various motors for actuators
that have some functions as
sensors and some functions as actuators.
4
Glossary

– agents perceptual inputs

– History of everything the agent has perceived

– Describes agent’s behaviour


– maps any percept to an action

– Implements agent function

5
6
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
7
Example: Vacuum-cleaner
Agent

 Environment: square A and B


 Percepts: [location and content] e.g. [A, Dirty]
 Actions: left, right, suck up dirt, and no-
operation
 A simple agent function may be “if the current
square is dirty, then suck dirt or move to other
square..”
8
Contd…

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

0 To design a rational agent we need to


specify a task environment
0 PEAS: to specify a task environment
0 P:Performance Measure
0 E: Environment
0 A: Actuators
0 S: Sensors

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

Four basic types in order of increasing


generality:
 Simple reflex agents
 Model-based reflex agents
 Goal-based agents
 Utility-based agents

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

Will only work if the environment is fully observable


otherwise infinite loops may occur. 26
27
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

You might also like