0% found this document useful (0 votes)
9 views

Chapter 2 Intelligent Agent

The document outlines the concepts of intelligent agents and their environments, detailing the design and functionality of agents, including their sensors, actions, and types. It discusses rationality in agents, differentiating between rational and omniscient agents, and introduces the PEAS framework for agent design. Additionally, it categorizes environments based on observability, determinism, episodic nature, and the presence of multiple agents.

Uploaded by

desalegndagne717
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Chapter 2 Intelligent Agent

The document outlines the concepts of intelligent agents and their environments, detailing the design and functionality of agents, including their sensors, actions, and types. It discusses rationality in agents, differentiating between rational and omniscient agents, and introduces the PEAS framework for agent design. Additionally, it categorizes environments based on observability, determinism, episodic nature, and the presence of multiple agents.

Uploaded by

desalegndagne717
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

3/30/2024

Topics to be covered
• Agents and environments
Chapter-2 • Rationality & Omniscience

Intelligent Agents • PAGE & PEAS

• Environment types

• Agent types

• Learning agents
3/30/2024 1 3/30/2024 2

Agents
Agents and environments
 How do you design an intelligent agent?
• An agent is anything that can be viewed as perceiving its
environment through sensors and acting upon that
environment through actuators/ effectors
• A discrete agent receives percepts one at a time,
and maps this percept sequence to a sequence of • The agent function maps from percept histories
discrete actions. to actions:
• Properties [f: P*  A]
–Autonomous
–Reactive to the environment • The agent program runs on the physical
–Pro-active (goal-directed) architecture to produce f
–Interacts with other agents
• agent = architecture + program
via the environment
3/30/2024 3 3/30/2024 4

1
3/30/2024

Sensors/percepts and effectors/actions A more specific example 1:


• Humans Automated taxi driving system
– Sensors: Eyes (vision), ears (hearing), skin (touch), • SENSOR----------------------------------------------------
tongue (gestation), nose (olfaction), neuromuscular • Percepts: Video, sonar, speedometer, odometer, engine sensors,
system (proprioception) keyboard input, microphone, GPS, …
– Percepts: • Actions: Steer(navigate), accelerate, brake, horn, speak/display,
• At the lowest level – electrical signals from these sensors …
• After preprocessing – objects in the visual field (location, textures, colors, …),
auditory streams (pitch, loudness, direction), … • Goals: Maintain safety, reach destination, maximize profits (fuel,
– Effectors: limbs, digits, eyes, tongue, … tire wear), obey laws, provide passenger comfort, …
• Environment: urban streets, freeways, traffic, pedestrians,
– Actions: lift a finger, turn left, walk, run, carry an
weather, customers, …
object, …
• The Point: percepts and actions need to be carefully defined,
possibly at different levels of abstraction • Don’t forget that different aspects of driving
3/30/2024 5
may require different types of agent programs!
3/30/2024 6

A more specific example 2: Vacuum cleaner world Rational agents


• Agent: robot vacuum cleaner • An agent should strive to "do the right thing", based on what it
• Environment: floors of your apartment can perceive and the actions it can perform. The right action is
• Sensors: the one that will cause the agent to be most successful.
– dirt sensor: detects when floor in front of robot is dirty • An ideal rational agent should, for each possible percept
– bump sensor: detects when it has bumped into something sequence, do whatever actions will maximize its expected
– power sensor: measures amount of power in battery performance measure based on
– bag sensor: amount of space remaining in dirt bag 1. The percept sequence, and
• Actuators/Effectors: 2. its built-in and acquired knowledge.
– motorized wheels
– Suction[pulls] motor • In summary what is Rational at any given point depends on
– plug into wall? empty dirt bag? four things:[parameters on which rational agent are depend on]
• Percepts: location and contents, e.g., [A,Dirty] or [“Floor A is a) Performance Measure
dirty”] b) Percept Sequence
– Actions: Left, Right, Suck, NoOp e.g. “Forward, 0.5 ft/sec” c) Knowledge from Environment
3/30/2024 7 3/30/2024 d) Possible Actions 8

2
3/30/2024

Rational Agents… Rationality vs. Omniscience


a) Performance measure: An objective criterion for •Rational agent acts so as to achieve one's goals, given one's beliefs
success of an agent's behavior. (one that does the right thing).
– In other words, criteria for determining the quality of an –What does right thing mean? one that will cause the agent to be most successful
and is expected to maximize goal achievement, given the available information
agent’s behavior.
•An Omniscient agent knows the actual outcome of its actions, and
• E.g., performance measure of a vacuum-cleaner agent can act accordingly.
could be amount of dirt cleaned up, amount of time – in reality omniscience is impossible.
– An omniscient agent is one that can predict the future
taken, amount of electricity consumed, amount of noise perfectly.
– Omniscience =all-knowing with infinite knowledge
generated, etc.
• Rational Agent ≠ Omniscient[all-knowing/all-seeing] Agent
– Dirt collected in 8 hour shift/ጽዳት የምካሄደዉ ብ 8 ሰዓት ልዩነት
ነዉ፡/
3/30/2024 9 3/30/2024 10

Example Rationality
– You are walking along the road to Adama; You see
an old friend across the street. There is no traffic. • This points out that rationality is concerned with

– So, being rational, you start to cross the street. expected success, given what has been perceived.

– Meanwhile a big banner falls off from above and • Crossing the street was rational, because most of the

before you finish crossing the road, you are flattened. time, the crossing would be successful, and there was
no way you could have foreseen the falling banner.
Were you irrational to cross the street?

3/30/2024 11 3/30/2024 12

3
3/30/2024

Rational agent Autonomy


•The EXAMPLE shows that we can not blame an agent for failing to • A system is autonomous to the extent that its own
take into account something it could not perceive.
behavior is determined by its own experience (with ability
OR
for failing to take an action that it is incapable of taking. to learn and adapt).

•In summary what is rational at any given point depends on • Therefore, a system is not autonomous if it is guided by
four things. its designer according to a prior decisions.
a) Everything that the agent has perceived so far
b) What an agent knows about the environment • To survive, agents must have:
c) The actions that the agent can perform Enough built-in knowledge to survive.
d) The performance measure that defines degrees of success;
The ability to learn.
3/30/2024 13 3/30/2024 14

PEAS PEAS…
• PEAS: Stands for: Performance measure, Environment, • Must first specify the setting for intelligent agent design
Actuators, Sensors • Consider, e.g., the task of designing an automated taxi
• Must first specify the setting for intelligent agent design driver:
• Consider, e.g., the task of designing an automated taxi – Performance measure:
driver: • Safe, fast, legal, comfortable trip, maximize profits
– Environment:
– Performance measure • Roads, other traffic, pedestrians, customers

– Environment – Actuators:
• Steering wheel, accelerator, brake, signal, horn
– Actuators – Sensors:
• Cameras, sonar, speedometer, GPS, odometer, engine sensors, keyboard
– Sensors
3/30/2024 15 3/30/2024 16

4
3/30/2024

PEAS… PEAS…
• Agent:
• Agent:
– Medical diagnosis system
– Interactive English tutor
• Performance measure: • Performance measure:
– Healthy patient, minimize costs, lawsuits – Maximize student's score on test
• Environment: • Environment:
– Set of students
– Patient, hospital, staff
• Actuators:
• Actuators:
– Screen display (exercises, suggestions, corrections)
– Screen display (questions, tests, diagnoses, treatments, referrals)
• Sensors: Keyboard
• Sensors:
– Keyboard (entry of symptoms, findings, patient's answers)17
3/30/2024 3/30/2024 18

Classes of Environments Fully observable vs. partially observable


•Actions are done/taken by the agent on the • Does the agent’s sensory see the complete state
environment. Environments provide percepts to an
agent. of the environment?
•Agent perceives and acts in an environment. – If an agent has access to the complete state of the
•Properties of Environments: it can be: environment, then the environment is accessible or fully
–Fully observable vs. partially observable observable.
–Deterministic vs. stochastic
• An environment is effectively accessible if the
–Episodic vs. non-episodic
sensors detect all aspects that are relevant to the
–Static vs. Dynamic
choice of action.
–Discrete vs. continuous
3/30/2024 19 – Taxi driving is partially observable
3/30/2024 20

5
3/30/2024

Deterministic vs. stochastic Episodic vs. Sequential


• Does the next “episode”(incident) depend on the actions
• Is there a unique mapping from one state to taken in previous episodes?
another state for a given action? • In an episodic environment, the agent's experience
is divided into "episodes".
• The environment is deterministic if the next state – Each episode consists of the agent perceiving and then
acting.
is completely determined by
– The quality of its action depends just on the episode
1. Current state of the environment and itself.

2. Actions selected by the agents. • In sequential environment the current decision


could affect all future decisions
• Taxi driving is non-deterministic (i.e. stochastic) • Taxi driving is sequential, while assembly line
defective detecting is episodic
3/30/2024 21 3/30/2024 22

Static vs. Dynamic Discrete vs. Continuous


• Can the world change while the agent is thinking? • Are the distinct percepts & actions limited or
unlimited?
– If the environment can change while the agent is – If there are a limited number of distinct,
on purpose, then we say the environment is clearly defined percepts and actions, we say
the environment is discrete[countable].
dynamic/changing for that agent

– otherwise it is static. • Taxi driving is continuous - speed location are


in a range of continuous values.
• Taxi driving is dynamic:- the nature of the • Chess is discrete:- there are a fixed number of
possible moves on each item
environment is changing b/c of several reason!
3/30/2024 23 3/30/2024 24

6
3/30/2024

Single agent Vs. Multi-agent Agent functions and programs


• Single agent vs. Multi-agent • An agent is completely specified by the agent
function mapping percept sequences to
– If the environment contains other intelligent agents, the agent
actions
needs to be concerned about strategic, game-theoretic aspects of
[f: P*  A]
the environment (for either cooperative or competitive agents)
• One agent function (or a small equivalence
• An agent operating by itself in an environment.
class) is rational
– Most engineering environments don’t have multi-agent
properties, whereas most social and economic systems get their
• Aim: find a way to implement the rational agent
complexity from the interactions of (more or less) rational agents. function concisely
3/30/2024 25 3/30/2024 26

Some agent types


• (0) Table-driven agents • Algorithm for Table-driven agent

– use a percept sequence/action table in memory to find


the next action. They are implemented by a (large)
lookup table.

– Table lookup of percept-action pairs mapping from


every possible perceived state to the optimal action for
that state: An agent based on a pre-specified lookup table. It

– E.g. for a Percept (“ red light in a traffic system”)the keeps track of the percept sequence and just looks

Action (“Stop”) is executed/initiated. up the best action.

3/30/2024 27 3/30/2024 28

7
3/30/2024

Table-driven agents (1) Simple reflex agents


• Drawbacks: •Works by finding a rule whose condition matches the
– Huge table current situation (as defined by the percept) and then doing
• Too big to generate and to store (Chess has about 10120 states, for
example) the action associated with that rule.
• difficult to write codes for a large number of table entries E.g. If the car in front brakes, and its brake lights come on,
– Take a long time to build the table then the driver should notice this and initiate braking,
– No autonomy –Some processing is done on the visual input to establish the
– Even with learning, need a long time to learn the table condition. If "The car in front is braking"; then this triggers some
entries established connection in the agent program to the action "initiate
– No knowledge of non-perceptual parts of the current state braking". We call such a connection a condition-action rule written
– Not adaptive to changes in the environment; requires as:
entire table to be updated if changes occur If car-in-front-is breaking then initiate-braking.
– Looping: Can’t make actions conditional on previous
•Humans also have many such conditions. Some of which are learned
actions/states responses. Some of which are innate (inborn) responses
3/30/2024 29 3/30/2024 30
–Blinking when something approaches the eye.

Cont’d…. Simple reflex agents


Characteristics Simple Reflex Agent
sensors
• Has rule-based (some rule) in form of “condition-action”

Environment
• Has a component to extract feature What the world
is like now
• There is no access to complete state of the world
• Works only if correct decision can be made on basis of
What action I
current percept. Condition - action rules
should do now
• Problems
effectors
– Still usually too big to generate and to store
– Still no knowledge of non-perceptual parts of state function SIMPLE-REFLEX-AGENT(percept) returns action
static: rules, a set of condition-action rules
– Still not adaptive to changes in the environment; requires
state  INTERPRET-INPUT (percept)
collection of rules to be updated if changes occur rule  RULE-MATCH (state,rules)
– Still can’t make actions conditional on previous state action  RULE-ACTION [rule]
return action
3/30/2024 31 3/30/2024 32

8
3/30/2024

(2) Agents with memory(Model-Based reflex) Structure of a Model-Based reflex agent


•This is a reflex agent with internal state. State sensors
–It keeps track of the world that it can’t see now.
How the world evolves What the world
•It works by finding a rule whose condition matches the current is like now

Environment
situation (as defined by the percept and the stored internal state) What my actions do

–If the car is a recent model -- there is a centrally mounted brake light. With older
models, there is no centrally mounted, so what if the agent gets confused?
Is it a parking light? Is it a brake light? Is it a turn signal light? Condition - action rules
What action I
should do now
–Some sort of internal state should be in order to choose an action.
–The camera should detect two red lights at the edge of the vehicle go ON or OFF effectors
simultaneously. function REFLEX-AGENT-WITH-STATE (percept) returns action
static: state, a description of the current world state
•The driver should look in the rear-view mirror to check on the rules, a set of condition-action rules
location of near by vehicles. In order to decide on lane-change the
state  UPDATE-STATE (state, percept)
driver needs to know whether or not they are there. The driver sees, rule  RULE-MATCH (state, rules)
and there is already stored information, and then does the action action  RULE-ACTION [rule]
state  UPDATE-STATE (state, action)
associated with that rule.
return action
3/30/2024 33 34
3/30/2024

(3) Goal-based agents Structure of a goal-based agent


•Keeping track of the current state is often not enough  need to add State sensors
goals to decide which situations are good
How the world evolves What the world
•Choose actions that achieve the goal (an agent with explicit goals) is like now

Environment
What my actions do
•Involves consideration of the future:
What it will be like
–Knowing about the current state of the environment is not always enough to if I do action A
decide what to do.
For example, at a road junction, the taxi can turn left, right or go straight. Goals
What action I
should do now
–The right decision depends on where the taxi is trying to get to. As well as a
current state description, the agent needs some sort of goal information, which effectors
describes situations that are desirable. E.g. being at the passenger's destination.
•The agent may need to consider long sequences, twists and turns to Decision making of this kind is fundamentally different from the condition-
find a way to achieve a goal. action rules described earlier. It involves
1. What will happen if I take such and such action?
2. Will that enable me reach goal?
3/30/2024 35 36
3/30/2024

9
3/30/2024

(4) Utility-based agents Structure of a utility-based agent


• Goals are not really enough to generate high quality
behavior. State sensors

For e.g., there are many action sequences that will get the taxi to its How the world evolves What the world
destination, thereby achieving the goal. Some are quicker, safer, is like now
What my actions do
more reliable, or cheaper than others. We need to consider Speed
What it will be like

Environment
and safety if I do action A
• When there are several goals that the agent can aim for,
non of which can be achieved with certainty. Utility Utility
How happy I will
be in such as a state
provides a way in which the likelihood of success can be
weighed up against the importance of the goals. What action I
should do now
• An agent that possesses an explicit utility function can effectors
make rational decisions.
3/30/2024 37 3/30/2024 38

(5)Learning agents Learning agents

• Learning has an advantage that it allows the agents to


initially operate in unknown environments and to
become more competent than its initial knowledge
alone might allow.

• Implements learning methods for extending and


refining the knowledge base to improve agent’s
competence and/or efficiency in problem solving.
3/30/2024 39 40
3/30/2024

10
3/30/2024

Thank You!
?
3/30/2024 41

11

You might also like