0% found this document useful (0 votes)
15 views58 pages

Understanding Intelligent Agents and Environments

Intelligent agents are entities that perceive their environments through sensors and act upon them using actuators to automate tasks, make decisions, and solve problems. They are crucial for efficiently handling complex environments and driving innovations across various industries. The document outlines the structure, types, and properties of intelligent agents, as well as their problem-solving capabilities and the concept of rationality in decision-making.

Uploaded by

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

Understanding Intelligent Agents and Environments

Intelligent agents are entities that perceive their environments through sensors and act upon them using actuators to automate tasks, make decisions, and solve problems. They are crucial for efficiently handling complex environments and driving innovations across various industries. The document outlines the structure, types, and properties of intelligent agents, as well as their problem-solving capabilities and the concept of rationality in decision-making.

Uploaded by

meghaseshadri5
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

INTELLIGEN

T
AGENTS
1 Agents and
Environments,

CONTEN 2 The concept of


rationality
3 The nature of
TS Environment,

4 The structure of Agents

5 Types of Agents,

6 Learning Agent

7 Problem Solving Agent

8 Formulating Problems
WHAT ARE INTELLIGENT INTRODUCTI
AGENTS?
Definition:
ON TO
Agents are entities that perceive environments INTELLIGEN
T AGENTS
via
sensors and act upon them through actuators.
Purpose:
Automate tasks, make decisions, and solve
problems.

Applications:
Virtual assistants (e.g., Alexa,
Siri). Autonomous vehicles.
Industrial robots.
WHY INTELLIGENT AGENTS IMPORTAN
MATTER? CE
OF
Intelligent Agents are important to:
Handle complex, dynamic environments
INTELLIGE
efficiently. Automate routine or repetitive tasks. NT
Drive innovations across industries like
healthcare, AGENTS
Examples:
finance, and logistics.
real-time traffic management
systems personalized shopping
assistants etc
AGENTS INTERACTING WITH
AND ENVIRONMENTS
ENVIRONME Components of an Agent:
Sensors: Gather environmental data (e.g.,

NTS cameras, microphones).


Actuators: Respond to the environment (e.g.,
motors, speakers).

Environment: External conditions influencing the agent.

Examples:
Robotic arm with touch sensors and motors
for precision tasks.
Smart thermostat sensing temperature
and adjusting heating.
AGENTS INTERACTING WITH
AND ENVIRONMENTS
ENVIRONME Scuscu
s
9cvcc ťs

NTS
uvivcumcuť

cťicus
c”vn”cus çcuť

Fig. Agents interact with environments through sensors and actuators.


AGENTS INTERACTING WITH
AND ENVIRONMENTS
An AI Agent must follow the following four rules:
ENVIRONME 1
AI agent must have the ability to perceive
NTS the
environment

2 The observation must be used to make the


decision.
3 Decision should result in an action.

An action taken by an AI agent must be


4
rational action.
AGENTS INTERACTING WITH
AND ENVIRONMENTS
Percepts are the content an agent’s sensors
What an agent senses
ENVIRONME
are perceiving.
right now.

NTS An agent’s percept sequence is the complete history


of everything the agent has ever perceived.

An agent’s choice of action at any given instant can depend


on its built-in knowledge and on the entire percept
sequence observed to date, but not on anything it hasn’t
perceived.

Agent function → A rule or mapping that says:


“If I see this percept sequence → I will do this action.”
Example: If the robot sees a red ball → pick it up.
Agent program → The actual code/computer program
AGENTS INTERACTING WITH
AND ENVIRONMENTS
E.g. a robotic vacuum-cleaner world with just two locations
ENVIRONME This agent has two
NTS sensors
[Link] (A or B)
[Link] (Dirty or Clean)

Actions
Possible Percepts allowed:
[A, Dirty], [A, Clean] [Link] Left
[B, Dirty], [B, Clean] [Link] Right
The robot looks at its location and whether the [Link] dirt
is dirty or not, then
decides whether to clean or move.
This is how a simple intelligent agent works: sense → think → act.
AGENTS INTERACTING WITH
AND ENVIRONMENTS
Partial tabulation of a simple agent function for the
ENVIRONME vacuum- cleaner world

NTS Percepts Sequence


[A, Clean]
Action
Move Right
[A, Dirty] Takes the dirt
[B, Clean] Move Left
[B, Dirty] Takes the dirt
[A, Clean], [A, Move Right
Clean] Takes the dirt
[A, Clean], [A, .
Dirty]
.
.
What makes an agent
. good or bad, intelligent or stupid?
An agent is considered good if:
[Link] achieves the desired goal (cleaning the environment).
[Link] does so efficiently

It is bad if:
• It leaves dirt uncleaned.
• It wastes steps

An intelligent agent: A stupid (non-intelligent) agent:


• Chooses actions that are appropriate for the given • Only follows a rigid table of rules (no adaptability).
environment. • Fails when the environment changes
• Handles unseen situations using rational decision-
making, not just a fixed table.
• Can adapt and improve
PROPERTIES OF TASK
ENVIRONMENTS
Fully Observable Partially Observable

The agent has complete The agent has incomplete,


and accurate information noisy or missing data
about the current state about the environment.
of the environment.

E.g. Chess E.g. Driving in fog


PROPERTIES OF TASK
ENVIRONMENTS
Deterministic Stochastic

The next state of the Outcomes are


environment is entirely uncertain, and actions
predictable based on can lead to
the current state and probabilistic results.
the agent's actions.
E.g. Dice rolls in board
E.g. Solving a puzzle. games
PROPERTIES OF TASK
ENVIRONMENTS
Episodic Sequential

The agent’s actions are Each action impacts


divided into episodes, future states, requiring
and decisions in one a long-term strategy.
episode do not affect
others.
E.g. Driving, chess
E.g. Spam filtering
PROPERTIES OF TASK
ENVIRONMENTS
Static Dynamic

The environment The environment can


remains constant while change over time, even
the agent decides on an as the agent deliberates.
action.
E.g. Real-time traffic
E.g. Crossword puzzles. systems
PROPERTIES OF TASK
ENVIRONMENTS
Discrete Continuous

The environment has The environment has


a finite set of states infinite states or
and actions. requires continuous
control.
E.g. Turn-based board
games. E.g. Robot motion
control.
PROPERTIES OF TASK
ENVIRONMENTS
Single Agent Multi-Agent

A system with a single A system comprising


intelligent agent that multiple intelligent
perceives and agents that can interact,
interacts with its collaborate, or compete
environment. E.g. Traffic management
E.g. A vacuum-cleaning systems
robot in a single room.
PROPERTIES OF TASK
ENVIRONMENTS
Known Unknown

All aspects, including The agent has


rules, states, actions, and incomplete or no prior
their outcomes, are knowledge of the
completely understood dynamics, rules, or
by the agent at design outcomes of actions.
time.
E.g. Autonomous driving
E.g. Chess
RATIONALITY: THE GOOD
BEHA
Evaluation Criteria VIOR
of Rationality:
Performance measure.
Environment
knowledge. Available
actions.
Percept sequence.

Definition of Rational
Agent:
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
whatever built-in knowledge the agent has.
THE NATURE OF
ENVIRONMENTS
Task environments:
The “problems” to w h i c h rational agents are the “solutions.”

Task environment of a rational agent is specifi ed by:


PEAS (Performance, Environment, Actuators, Sensors) description.

The first step in designing an agent is to specify the task environment as fully as
possible.

e.g. A self-driving Car


THE NATURE OF
PEAS Description for AENVIRONMENTS
self-driving Car
STRUCTU Behavior of an agent is the action that is performed after

RE any given sequence of percepts.

OF Agent program implements the agent function (the mapping


from percepts to actions).
AGEN
T Agent architecture refers to a type of computing device
equipped with physical sensors and actuators, on which
the agent program operates.
STRUCTU TYPES OF
RE Aagent
Four basic kinds of GENprograms
TS that embody
the principles underlying almost all intelligent
OF systems
Single Reflex Agents
AGEN
T Model-based Reflex Agents

Goal-based Agents

Utility-based Agents
STRUCTU TYPES OF
RE AGENTS
Simple Reflex Agents:

OF Simple reflex agents select actions on the basis of the

AGEN current
percept, ignoring the rest of the percept history.

T How It works?
These agents executes actions based
a set of predefined Condition-action rules or if-then
rules
e.g. if car-in-front-is-braking then initiate-braking.

Example:
Thermostat adjusting temperature.
A light sensor turning on a streetlight when it gets dark.
STRUCTU TYPES OF
RE AGENTS
Simple Reflex Agents:

OF
AGEN
T
STRUCTU TYPES OF
RE AGENTS
Simple Reflex Agents:

OF Advantages:

AGEN Easy to design and implement.


Real-time responses to environmental
T changes.
Disadvantages:
No memory or state; cannot handle partial
observability. Ineffective in dynamic or complex
environments.
STRUCTU TYPES OF
RE Model-Based ReflexA GENTS
Agents

OF It uses an internal state to keep track of


unobservable aspects of the environment.
AGEN Maintain a model of how the world evolves.

T
Two kinds of knowledge to be encoded in the agent
program
A transition model of the world.
A sensor model.

How It Works?
Sense, model, reason, and act
in stages.
Example: Robot vacuum navigating
obstacles
STRUCTU TYPES OF
RE Model-Based ReflexA GENTS
Agents

OF
AGEN
T
STRUCTU TYPES OF
RE Model-Based ReflexA GENTS
Agents

OF Advantages:
Effective in partially observable
AGEN environments. Provides more informed

T decision-making.
Disadvantages:
Computationally expensive to maintain
models. Models may not accurately capture
real-world complexity.
STRUCTU TYPES OF
RE Goal-Based Agents AGENTS

OF AI agents that act to achieve specific goals using

AGEN search algorithms and reasoning.


Use goals to decide actions by evaluating future
T states..

How It Works?
Perceive, reason, act, evaluate, and achieve
goals.

Example:
GPS navigation system planning the shortest route
STRUCTU TYPES OF
RE Goal-Based Agents AGENTS

OF
AGEN
T
STRUCTU TYPES OF
RE Goal-Based Agents AGENTS

OF Advantages:

AGEN Flexible and capable of long-term


planning. Easy to evaluate based on goal
T completion.
Disadvantages:
Limited to specific goals.
Ineffective in environments with many variables
or changing goals.
STRUCTU TYPES OF
RE AGENTS
Utility-Based Agents

OF Make decisions by maximizing a utility function

AGEN that quantifies the desirability of outcomes.


Capable of handling trade-offs and optimizing

T performance.
How It Works:
Evaluate actions based on expected utility.

Example:
An autonomous car optimizing speed, safety, and
fuel efficiency.
STRUCTU TYPES OF
RE AGENTS
Utility-Based Agents

OF
AGEN
T
STRUCTU TYPES OF
RE AGENTS
Utility-Based Agents

OF Advantages:

AGEN Handles complex decision-making problems.


Provides flexibility in uncertain

T environments.
Disadvantages:
Requires accurate utility functions and
high computation.
Difficult to interpret or validate for
humans.
STRUCTU LEARNING
RE AGENT over time by learning from
Improve their performance
experiences.
OF Evolve and adjust behaviors for dynamic environments.

AGEN More robust

T Components:
[Link] Element: Executes actions.
[Link] Element: Improves behavior based on feedback.
[Link]: Evaluates performance and provides feedback.
[Link] Generator: Explores new ways to improve.

Example: Spam filters improving based on flagged emails


and user feedback., Alexa, Siri
STRUCTU LEARNING
RE AGENT
OF
AGEN
T
STRUCTU LEARNING
RE How It Works:
AGENT
OF Observe, learn, act, and adapt using feedback
loops.
AGEN Advantages:

T Continuously improve and evolve.


Adaptable to new and changing environments.

Disadvantages:
Require significant data and computational
resources. Susceptible to biased or incorrect
decision-making.
SOLVING PROBLEMS BY
SEARCHING
PROBLEM SOLVING AGENTS
Problem Solving A is an
agent that finds a sequences
of actions that form a path to
a goal state.

The computational process


problem solving agent
undertakes is called search.
PROBLEM SOLVING AGENTS
Agent follows four-phase problem-solving process

Goal Formulation Define the desired outcome.

Problem Formulation Define states, actions, and goals.

Search Find a sequence of actions to reach the goal


called as Solution.

Execution Perform the actions one at a time.


PROBLEM SOLVING AGENTS
E.g. Robot navigating a warehouse to pick up an item.

[Link] Formulation: Reaching a specific shelf location and grabbing a


particular item.
[Link] Formulation: Robot's current position, possible actions (move forward,
turn left/right), constraints (avoid obstacles), and the goal test (reaching the
target item)
[Link]: The process of exploring different paths through the warehouse to
find the most efficient sequence of actions to reach the goal.
[Link]: The actual act of the robot physically moving through the
warehouse following the chosen path to pick up the item.
Search Problems and
Solutions
A search problem can be defined formally by
following:
State space
Initial state
Goal state

PROBLE Actions
Transition model
Action cost function
M Path.
Solution Optimal
SOLVIN solution
A state space can be represented a graph in which the
G vertices are states and the directed edges between them
are actions.
Search Problems and
Solutions
State Space
A set of possible states that the environment can be in.
Initial state
A state that the agent starts in.
Goal:
PROBLE A set of one or more goal states.
Action:

M The actions available to the agent.


Given a state s, ACTIONS(s) returns a finite set of

SOLVIN actions that can be executed in s.


Each of these action is said to be applicable in s.

G
Search Problems and
Solutions
Transition model,
It describes what each action does.
RESULT(s,a) returns the state that results from doing
action
a in state s.

PROBLE Action cost function


Denoted by ACTION-COST(s,a,s’) gives the numeric cost
of applying action a in state s to reach s’ state.
M Path:
A sequence of actions forms a path.
SOLVIN Solution
it is a path from the initial state to a goal state.
G An optimal solution has the lowest path cost among
all solutions.
Formulating Problems
A model—an abstract mathematical description of a real-
world situation.
A good problem formulation has the right level of
abstraction
(the process of removing detail from a representation).
The abstraction is valid if we can elaborate any
PROBLE abstract solution into a solution in the more detailed
world.
M The abstraction is useful if carrying out each of the actions
in the solution is easier than the original problem.
SOLVIN
G
VACUUM CLEANER WORLD
Problem: An agent (a vacuum cleaner) operating in a
simple environment where it must clean dirt from a set of
locations.

STATE SPACE:
A state space of the world says which objects are in which
locations. A state is represented as (L,R,P), where:
L represents the status of the left location (clean or dirty).
R represents the status of the right location (clean or dirty).
P represents the current position of the vacuum (left or right).
Example states:
(Dirty, Dirty, Left) → Both locations are dirty, and the vacuum is at the
left. (Clean, Dirty, Rioftht) → Left is clean, right is dirty, and the vacuum
is at the right.
VACUUM CLEANER WORLD

INITIAL STATE:
Any valid combination of dirt distribution and vacuum
position. Assume the initial state is (Dirty, Dirty, Left)

GOAL STATE:
The environment is completely clean.
i.e., (Clean, Clean, Left) or (Clean, Clean, Rioftht).
VACUUM CLEANER WORLD

ACTIONS:
The vacuum cleaner can perform three actions:
Move Left: Moves to the left if it's at the
right. Move Right: Moves to the right if it's at
the left. Suck: Cleans the current location if it
is dirty.
TRANSITION MODEL:
If the action is Move Left, the vacuum moves to the left location.
If the action is Move Right, the vacuum moves to the right
location. If the action is Suck, the current location is cleaned.
VACUUM CLEANER WORLD

PATH:
(Dirty, Dirty, Left) -> (Clean, Dirty, Left)->(Clean, Dirty, Right)->(Clean, Clean, Right)

ACTION COST:
\

Each action (Move Left, Move Right, Suck) has a cost of 1.


The total path cost is the sum of all actions taken to reach the goal state.

Total Cost = ?

You might also like