0% found this document useful (0 votes)
70 views40 pages

Week 3 Topic 2 Intelligent Agents

The document outlines the learning objectives and key concepts related to intelligent agents in AI, including definitions, types, and applications. It explains the PEAS framework (Performance measure, Environment, Actuators, Sensors) for designing rational agents and describes various types of agents such as simple reflex, model-based reflex, goal-based, utility-based, and learning agents. Real-world applications of intelligent agents, including AI assistants and navigation systems, are also discussed.

Uploaded by

mr.sajjadov
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views40 pages

Week 3 Topic 2 Intelligent Agents

The document outlines the learning objectives and key concepts related to intelligent agents in AI, including definitions, types, and applications. It explains the PEAS framework (Performance measure, Environment, Actuators, Sensors) for designing rational agents and describes various types of agents such as simple reflex, model-based reflex, goal-based, utility-based, and learning agents. Real-world applications of intelligent agents, including AI assistants and navigation systems, are also discussed.

Uploaded by

mr.sajjadov
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Topic 2:

Intelligent agents

Term 2-ARTI 106


Computer Track
2024-2025
Learning outcomes

The main learning objectives of this topic are:


❑ Define an agent and its environment.
❑ Identify the PEAS.
❑ Identify and explain types of AI Agents
❑ Discuss the real-world applications of intelligent agents.
Outlines

❑ What is an agent ?
❑ Agents and environment
❑ Define a rational agent
❑ PEAS: Performance measure, Environment, Actuators,
Sensors
❑ Types of AI Agents
❑ Applications of intelligent agent
Intelligent agent

❑An AI system is composed of:


❖An agent
❖And its environment
❑The agents act in their environment
❑The environment may contain other agents
What is an intelligent
agent ?

❑ An agent is anything that perceiving its environment through


sensors and acting upon that environment through actuators
❑ An agent is an entity that perceives and acts.
❑ Example:
❖ Human is an agent that has sensory organs such as eyes, ears, nose and
other organs such as hands, legs, mouth for effectors (actuators).
❖ A robot is also an agent with cameras for the sensors and motors for
effectors (actuators).
❖ A thermostat is an agent to detect room temperature.
Intelligent agent

❑ An intelligent agent is a program


that can make decisions or perform
a service based on its environment,
user input and experiences.
❑ It is an autonomous entity which act
upon an environment using sensors
and actuators for achieving goals. An
intelligent agent may learn from the
environment to achieve their goals.
Agents and environment

What AI should fill


What is Percept?
❑ Percept is the input that an intelligent agent is perceiving at any given
moment.
❑ It is the information or data an agent receives from its environment
through its sensors at a particular moment in time.
❑ For example:
❖ For a robot, a percept might be "Obstacle detected 2 meters ahead."
❖ For a thermostat, a percept could be "Current temperature is 24°C."
❖ For a virtual assistant, a percept might be "User said, 'What's the
weather today?’”
❑ The agent uses percepts as inputs to determine how to act in the
environment to achieve its goals.
What is Percept sequence?

❑ Percept sequence: is the complete history of everything an agent has


perceived, which forms the basis of its decisions and actions. It is a
sequence of percepts (individual pieces of information) received by
an agent from the environment over time through its sensors.
For example: If a robot is navigating a maze, its percept sequence might
include:
1. Observing a wall in front (percept 1).
2. Sensing an open path to the left (percept 2).
3. Detecting a turn to the right (percept 3).
Test your knowledge…
What is an agent?
A. A program that only processes data
B. An entity that perceives its environment and acts upon it
C. A device that stores information
D. A tool for only collecting data
Which of the following statements is true?
A. An intelligent agent only acts upon user input.
B. An agent cannot function without a network connection.
C. An intelligent agent uses sensors and actuators to perceive and act.
D. An agent requires manual input for every task.
Rules for AI agent
The main four rules to design an AI agent are:
❑Rule 1: An AI agent must have the ability to
perceive the environment.
❑Rule 2: The observation must be used to make
decisions.
❑Rule 3: Decision should result in an action.
❑Rule 4: The action taken by an AI agent must be a
rational action.
AI Agent function &
program
❑ Agent’s behavior is mathematically described by:
⚫ Agent function
⚫ A function mapping any given percept sequence to an action:
[f: P* → A]
❑ Practically it is described by:
⚫ An agent program

⚫ The real implementation


Example: Vacuum-
cleaner world
❑ Perception: Clean or Dirty? where it is in?
❑ Actions: Move left, Move right, suck, do nothing
Program implements the agent
function for Vacuum-Agent

Function Reflex-Vacuum-Agent([location,status])
return an action
If status = Dirty then return Suck
else if location = A then return Right
else if location = B then return left
Rational agent
❑A rational agent is a type of intelligent agent that always
takes the action expected to maximize its performance
measure, based on the available evidence and built-in
knowledge.
❑A rational AI agent is a system that makes optimal
decisions to achieve its goals, while an intelligent agent
learns and adapts to its environment.
❑AI agents are rational agents.
Rational Agent
❑ Rationality of an agent depends on the following four factors:
❖ Performance measuring success.
❖ Agent’s prior knowledge of environment.
❖ Actions that agent can perform.
❖ Agent’s percept sequence to date.

❑ A rational agent should choose an action for each percept sequence


that maximizes its performance measure, based on the evidence
from the percept sequence and its built-in knowledge.
❑ 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.
PEAS
❑ A rational agent always performs right action, where the right action means the
action that causes the agent to be most successful in the given percept
sequence.
❑ To design a rational agent, we need to specify a task environment (a problem
specification for which the agent is a solution).
❑ Agents can be described by their PEAS.
❑ PEAS is used to specify a task environment:
❖ Performance measure
❖ Environment
❖ Actuators
❖ Sensors
PEAS agent: Automated taxi
driver Performance measure
❑ Agent: 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
❑Sensors: Cameras, sonar, speedometer, GPS, odometer,
engine sensors, keyboard
PEAS agent: Interactive English
tutor system Performance
measure

❑Agent: Interactive English tutor


❑Performance measure: Maximize student's score
on test
❑Environment: Set of students
❑Actuators: Screen display (exercises, suggestions,
corrections)
❑Sensors: Keyboard
PEAS Agent: Medical diagnosis
system Performance measure

❑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)
PEAS agent: satellite image
analysis system Performance
measure

❑Performance measure: correct image categorization


❑Environment: downlink from orbiting satellite
❑Actuators: display categorization of scene
❑ Sensors: color pixel arrays
Types of AI Agents
Four basic types of AI agents:
❑Simple reflex agents
❑ Reflex agents with state/model
❑Goal-based agents
❑Utility-based agents
Note that all these agents can be turned into learning
agents.
Simple reflex agents

❑ Simple but very limited intelligence. It uses just condition-action rules:


❖ These agents function on a set of so-called reflexes or rules. This means that the agent
is preprogrammed to perform actions that correspond to certain conditions being met
(“if … then …” ).
❑ Action does not depend on percept history; it depend only on the current percept.
Therefore, no memory requirements.
❑ If the agent encounters a situation that it is not prepared for, it cannot respond
appropriately:
❖ Suppose vacuum cleaner does not observe location. What do you do given location =
clean? Left of A or right on B -> Possible Solution: Randomize action.
Example of Simple reflex agents: A thermostat that turns on the heating system at a set
time every night. The condition-action rule here is, for instance, if it is 8 PM, then the
heating is activated.
Simple reflex agents
A Simple Reflex Agent in Nature

percepts
(size, motion)

RULES:
(1) If small moving object,
then activate SNAP
(2) If large moving object,
then activate AVOID and inhibit SNAP
ELSE (not moving) then NO-OP
Model-based reflex
agents
❑A reflex agent with internal state use both their
current perception and memory to maintain an internal
model of the world.
❑As this agent continues to receive new information,
the model is updated. The agent’s actions depend
on its model, reflexes, previous precepts and
current state.
Model-based reflex agents
❑ The internal state information should be updated as the time
goes by, and it requires two kinds of knowledge to
be encoded in the agent program:
❖Information about how the world evolves independently of
the agent.
❖Information about how the agent's own actions affects the
world.
Example of Model-based reflex agents: A
robot vacuum cleaner
As it cleans a dirty room, it senses obstacles such as furniture and
adjusts around them. The robot also stores a model of the areas it has
already cleaned to not get stuck in a loop of repeated cleaning.
Tesla’s Autopilot: continuously process sensor data to navigate safely in
changing traffic conditions.
Model-based reflex
agents
Test your Knowledge…

A reflex agent with internal state uses both their current _______ and
memory to maintain an internal model of the world. As this agent
continues to receive new ________, the model is updated.
The agent’s actions depend on its _______, reflexes, previous _______
and current state.
Goal-based agents

❑ These agents search for action sequences to achieve a goal or set of goals e.g.
where the taxi wants to go.
❑ Goal-based agents plan these actions before acting on them. This search and
planning improve their effectiveness when compared to simple and model-
based reflex agents.
❑ Goal-based agents is not only using percept history and internal memory to
understand their environment but also considering the impact of their possible
actions before performing them. This allows goal-based agents to think beyond
the present moment and decide the best actions to take to achieve their
objectives (i.e: “what will happen if I do…?” (search and planning))
Goal-based agents
Unlike the previous reflex agents before acting this agent reviews many actions
and chooses the one which come closest to achieving its goals, whereas the
reflex agents just have an automated response for certain situations.
For example, in autonomous driving, a goal-based agent plans routes, adapts to
traffic, and ensures safe travel.
Example of Goal-based agents: Amazon’s Kiva Robots
Those robots are widely regarded as goal-based agents, planning optimal paths
to retrieve and deliver inventory efficiently.
Goal-based agents
Utility-based agent
❑ Goals are not always enough:
❖ Many action sequences get the taxi to its destination (goal)
❖ Consider other things: How fast, how safe…..
❑ Utility-based agents select the sequence of actions that reach the goal
describe maximize utility or reward.
❑ Utility is calculated using a utility function that assigns a utility value to
each scenario based on a set of fixed criteria.
❑ This value measure the degree of “happiness”, “goodness”, “success” of the
agent.
❑ If goal means success, then utility means the degree of success (how
successful it is).
Example Utility-based agent: A navigation system that
recommends the route to your destination that optimizes
fuel efficiency and minimizes the time spent in traffic and
the cost of tolls. This agent measures utility through this set
of criteria to select the most favorable route.
Utility-based agent
Learning agent
❑ In AI, Learning agents hold the same capabilities as the other agent types
but are unique in their ability to learn. New experiences are added to
their initial knowledge base, which occurs autonomously.
❑ We then say the agent learns (A learning agent).
❑ Learning also allows the agent to operate in initially unfamiliar
environments and to become more competent than its initial knowledge
alone might allow.
❑ Example of learning agent: Personalized recommendations on e-
commerce sites. These agents track user activity and preferences in their
memory. This information is used to recommend certain products and
services to the user. The cycle repeats each time new recommendations
are made. The user’s activity is continuously stored for learning purposes.
In doing so, the agent improves its accuracy over time.
Learning agent
Learning agent
Learning agents include four main elements:
❑Learning element : This improves the agent’s knowledge by
learning from the environment through its precepts and sensors.
❑ Performance element : This element is responsible for selecting
actions upon learning.
❑ Learning element uses feedback from the critic on how the
agent is doing and determines how the performance element
should be modified to do better in the future.
❑ Problem generator is responsible for suggesting actions that will
lead to a new and informative experiences
Applications of
intelligent agent
❑ AI assistants such as Alexa and Siri are examples of intelligent AI agents
that use sensors to perceive a user request and automatically collect data
from the internet without the user's help. They can gather information
about their observable environments, such as weather and time.
❑ Google Assistant is another example of an intelligent AI agent. It
uses machine learning and natural language processing technology
to answer users' questions and perform tasks, such as calling
contacts stated in voice commands.
❑ Global Positioning System navigation and cameras for reactive
decision-making in the real world to maneuver through traffic.
Thank you for you attention

You might also like