INTELLIGENT AGENTS
In which we discuss the nature of agents, perfect or otherwise, the diversity of
environments, and the resulting menagerie of agent types
AGENTS AND ENVIRONMENTS
• An agent is anything that can be viewed as perceiving its environment through sensors and
acting upon that environment through actuators. Figure 2.1.
• A human agent has eyes, ears, and other organs for sensors and hands, legs, vocal tract, and so
on for actuators.
• A robotic agent might have cameras and infrared range finders for sensors and various motors for
actuators.
• A software agent receives keystrokes, file contents, and network packets as sensory inputs and
acts on the environment by displaying on the screen, writing files, and sending network packets
AGENTS AND ENVIRONMENTS…
• An actuator is a part of a device or machine that helps it to
achieve physical movements by converting energy, often
electrical, air, or hydraulic, into mechanical force.
• Perceptual inputs are the information that people receive
from their environment through their sensory organs.
AGENTS AND ENVIRONMENTS…
• We use the term percept to refer to the agent’s perceptual inputs at any given instant.
• An agent’s percept sequence is the complete history of everything the agent has ever
perceived.
• In general, an agent’s choice of action at any given instant can depend on the entire percept
sequence observed to date, but not on anything it hasn’t perceived.
• By specifying the agent’s choice of action for every possible percept sequence, we have
said more or less everything there is to say about the agent.
• Mathematically speaking, we say that an agent’s behavior is described by the agent
function that maps any given percept sequence to an action.
AGENTS AND ENVIRONMENTS…
• To illustrate these ideas, we use a very simple example—the vacuum-cleaner world shown in
Figure 2.2.
• This particular world has just two locations: squares A and B.
• The vacuum agent perceives which square it is in and whether there is dirt in the square.
• It can choose to move left, move right, suck up the dirt, or do nothing.
• One very simple agent function is the following:
• if the current square is dirty, then suck otherwise, move to the other square.
• A partial tabulation of this agent function is shown in Figure 2.3
AGENTS AND ENVIRONMENTS…
AGENTS AND ENVIRONMENTS…
Looking at Figure 2.3, we see that various vacuum-world agents can be defined simply
by filling in the right-hand column in various ways.
The obvious question, then, is this:
What is the right way to fill out the table?
In other words, what makes an agent good or bad, intelligent or stupid?
We answer these questions in the next section
2.2 GOOD BEHAVIOR: THE CONCEPT OF RATIONALITY
• A rational agent is one that does the right thing
• —conceptually speaking, every entry in the table for the
agent function is filled out correctly.
• Obviously, doing the right thing is better than doing the
wrong thing, but what does it mean to do the right thing?
GOOD BEHAVIOR: THE CONCEPT OF RATIONALITY…
• When an agent is plunked down in an environment, it generates a sequence of actions
according to the percepts it receives.
• This sequence of actions causes the environment to go through a sequence of states.
• If the sequence is desirable, then the agent has performed well.
• This notion of desirability is captured by a performance measure that evaluates any
given sequence of environment states.
• As a general rule, it is better to design performance measures according to what one
actually wants in the environment, rather than according to how one thinks the agent
should behave.
• Consider, for example, the vacuum-cleaner agent from the preceding section.
• We might propose to measure performance by the amount of dirt cleaned up in a
single eight-hour shift. With a rational agent, of course, what you ask for is what
you get.
• A rational agent can maximize this performance measure by cleaning up the dirt,
then dumping it all on the floor, then cleaning it up again, and so on.
• A more suitable performance measure would reward the agent for having a clean
floor.
• For example, one point could be awarded for each clean square at each time step
(perhaps with a penalty for electricity consumed and noise generated).
• As a general rule, it is better to design performance measures according to what one
actually
GOOD BEHAVIOR: THE CONCEPT OF RATIONALITY…
2.2.1 Rationality
What is rational at any given time depends on four things:
• The performance measure that defines the criterion of success.
• The agent’s prior knowledge of the environment.
• The actions that the agent can perform.
• The agent’s percept sequence to date
This leads to a definition of a 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.
Rationality…
Consider the simple vacuum-cleaner agent that cleans a square if it is dirty and moves to the
other square if not; this is the agent function tabulated in Figure 2.3. Is this a rational agent
First, we need to say what the performance measure is, what is known about the
environment, and what sensors and actuators the agent has.
Let us assume the following:
• The performance measure awards one point for each clean square at each time step, over a
“lifetime” of 1000 time steps.
• The “geography” of the environment is known a priori but the dirt distribution and the
initial location of the agent are not.
• Clean squares stay clean and sucking cleans the current square.
Rationality…
• The Left and Right actions move the agent left and right
except when this would take the agent outside the
environment, in which case the agent remains where it is.
• The only available actions are Left , Right, and Suck.
• The agent correctly perceives its location and whether that
location contains dirt
We claim that under these circumstances the agent is indeed
rational; its expected performance is at least as high as any
other agent’s
Rationality…
One can see easily that the same agent would be irrational under different
circumstances.
For example, once all the dirt is cleaned up, the agent will oscillate needlessly back
and forth; if the performance measure includes a penalty of one point for each
movement left or right, the agent will fare poorly.
A better agent for this case would do nothing once it is sure that all the squares are
clean.
If clean squares can become dirty again, the agent should occasionally check and re-
clean them if needed.
If the geography of the environment is unknown, the agent will need to explore it
rather than stick to squares A and B.
2.2.2 Omniscience, learning, and
autonomy
• Omniscience refers to the ability to know everything about an environment,
including all states, outcomes of actions, and the exact future.
• An omniscient agent has perfect knowledge, enabling it to make flawless decisions
and always select the optimal course of action.
• In many cases, agents operate with incomplete or noisy data and face stochastic
outcomes, making true omniscience impossible.
• Instead, real-world agents approximate knowledge by gathering percepts and
building models of their environment to make informed decisions.
Learning
• Learning is the capability of an agent to improve its performance over
time by leveraging past experiences. A learning agent observes its
environment, performs actions, and receives feedback that it uses to
refine its behavior and decision-making processes. This adaptability
enables the agent to generalize from previous situations and handle new
or changing conditions. For instance, a robot navigating a warehouse can
learn which routes are most efficient or which obstacles frequently block
paths, allowing it to optimize its movements.
Autonomy
• Autonomy is the agent’s ability to operate independently, making decisions
and acting without external guidance.
• Autonomous agents rely on their percepts, knowledge, and internal
reasoning processes to select and execute actions that align with their goals.
• Unlike agents that depend on predefined rules or continuous human input,
autonomous agents can adapt to unexpected changes in their environment.
For example, a self-driving car adjusts its route based on traffic conditions
and unforeseen obstacles, all without human intervention.
THE NATURE OF ENVIRONMNETS
• How to to specify a task environment.
• Task environments come in a variety of flavors.
• The flavor of the task environment directly affects the appropriate design for the agent
program.
2.3.1 Specifying the task environment
• For the acronymically minded, we call this the
• PEAS (Performance, Environment, Actuators, Sensors) description.
• In designing an agent, the first step must always be to specify the task environment as fully as
possible
2.3.2 Properties of task environments
 An environment in artificial intelligence is the surrounding of the agent. The agent takes
input from the environment through sensors and delivers the output to the
environment
through actuators.
 An environment is everything in the world which surrounds the agent, but it is not a part
of
an agent itself. An environment can be described as a situation in which an agent is present.
 The environment is where agent lives, operate and provide the agent with something to
sense
and act upon it. An environment is mostly said to be non-feministic.
Properties of task environments…
As per Russell and Norvig, an environment can have various features from the point of view of an
agent:
1. Fully observable vs Partially Observable
2. Static vs Dynamic
3. Discrete vs Continuous
4. Deterministic vs Stochastic
5. Single-agent vs Multi-agent
6. Episodic vs sequential
7. Known vs Unknown
8. Accessible vs Inaccessible
1. FULLY OBSERVABLE VS PARTIALLY OBSERVABLE:
An environment is fully observable if the agent has access to complete and accurate
information about the current state of the environment. This means there are no hidden or
unknown elements, and the agent can make decisions based on the entirety of the environment.
Example:
(Fully observable) Chess: The positions of all pieces on the board are fully visible to both players.
An environment is partially observable if the agent does not have complete information about
the current state of the environment. There may be hidden states or incomplete data that make
decision-making more challenging.
Example: Poker: Players cannot see their opponents' cards
2. DETERMINISTIC VS STOCHASTIC:
An environment is deterministic if the outcome of every action is completely
predictable and depends solely on the current state and the chosen action. There is no
element of randomness in determining the result.
Example:
DETERMINISTIC : Chess: Moving a piece always leads to the expected position.
An environment is stochastic if there is uncertainty in the outcome of an action. The
result depends on probabilistic factors or random variables, making the outcome
unpredictable even in the same state.
Example:
Poker: The cards dealt are random and affect the outcome.
3. EPISODIC VS SEQUENTIAL:
An environment is episodic if the agent's experience can be divided into independent episodes.
Each episode consists of the agent perceiving the environment and performing an action
without any effect on future episodes.
Example: Chess: Each move affects the state of the game and future decisions.
EPISODIC Image RecognitionClassifying images; the classification of one image does not affect
others
An environment is sequential if the agent’s current actions affect future states and decisions.
The agent must consider the long-term consequences of its actions.
Example:
Financial Planning: Decisions today affect future outcomes
4. SINGLE-AGENT VS MULTI-AGENT
 If only one agent is involved in an environment, and operating by itself then such
an environment is called single agent environment.
However, if multiple agents are operating in an environment, then such an
environment is called a multi-agent environment.
• Maze Solving: A robot navigating a maze to find the exit.
• Sudoku Solver: A program filling in numbers to solve the puzzle.
Types of Multi-Agent Interactions:
1.Cooperative: Agents work together to achieve a common goal.
Example: Robots collaborating to transport an object.
2.Competitive: Agents work against each other to maximize their individual goals.
Example: Chess, where each player (agent) tries to defeat the other.
3.Mixed: A combination of cooperative and competitive behaviors.
Example: Multi-player online games with alliances and rivalries.
5. STATIC VS DYNAMIC:
An environment is static if it remains unchanged while the agent is making decisions or
performing actions. The environment is effectively frozen in time during the agent's operations.
Chess: The board state does not change unless a player makes a move.
Puzzle Solving: A Rubik's cube configuration remains static until the solver manipulates it.
An environment is dynamic if it changes over time, either independently or due to the actions
of other entities. The agent must act and adapt in real-time to the evolving environment.
Self-Driving Cars: Traffic, weather, and other vehicles continuously change the environment.
tock Trading: Market conditions evolve dynamically based on external factors and other
6. DISCRETE VS CONTINUOUS:
An environment is discrete if it has a finite or countable number of distinct states,
actions, or time steps. Everything in the environment can be broken down into
clearly defined steps or units.
Chess: The board has a finite number of states, and each move corresponds to a
discrete action.
Tic-tac-toe: A limited set of positions and moves.
An environment is continuous if it has an infinite number of possible states, actions,
or time values. The environment cannot be easily broken into discrete units.
Self-Driving Cars: Steering angles, speed, and positions can take any value within a
range.
7. ACCESSIBLE VS INACCESSIBLE
• An environment is accessible if the agent can fully perceive all the relevant aspects of
the environment needed to make a decision. In this case, there is no hidden or missing
information for the agent.
• Chess: The positions of all pieces are visible on the board.
• Sudoku Solver: The entire puzzle is visible to the solver.
An environment is inaccessible if the agent cannot perceive all the relevant aspects of the
environment. There is some hidden or missing information, which introduces uncertainty
in the decision-making process.
Self-Driving Cars: Sensors may fail to detect all obstacles due to blind spots or adverse
weather.
Poker: A player cannot see their opponent's cards.
8. KNOWN VS UNKNOWN
An environment is known if the agent has complete knowledge of the environment's rules,
dynamics, and the consequences of its actions beforehand. The agent does not need to learn or
infer the environment's structure during operation.
Chess: The rules and outcomes of moves are fully known to both players.
Tic-tac-toe: The agent knows how placing a marker will change the game state.
An environment is unknown if the agent does not have prior knowledge of its rules, structure,
or the consequences of its actions. The agent must explore, learn, or infer the environment's
dynamics to operate effectively.
Maze Exploration: A robot navigating an unknown maze without a map.
Real-World Robotics: A robot interacting with a new, unpredictable physical environment.
THE STRUCTURE OF AGENTS
The task of AI is to design an agent program which implements the agent function. The
structure of an intelligent agent is a combination of architecture and agent program. It can be viewed
as:
Agent = Architecture + Agent program
Architecture: Architecture is machinery that an AI agent executes
on. Agent Function: Agent function is used to map a percept to an
action. f:P* → A
Agent program: Agent program is an implementation of agent
function. An agent
program executes on the physical architecture to produce function
f.
Agent Program
TYPES OF AI AGENTS
Agents can be grouped into five classes based on their degree of perceived intelligence
and
capability. All these agents can improve their performance and generate better action over the time.
These are given below:

Simple Reflex Agent

Model-based reflex agent

Goal-based agents

Utility-based agent

Learning agent
1. SIMPLE REFLEX AGENT:

The Simple reflex agents are the simplest agents. These agents take decisions on the basis of the
current percepts and ignore the rest of the percept history.

These agents only succeed in the fully observable environment.

The Simple reflex agent does not consider any part of percepts history during their decision and
action process.

The Simple reflex agent works on, which means it maps the current state to
action. Such as a Room Cleaner agent, it works only if there is dirt in the room.

Problems for the simple reflex agent design approach:

They have very limited intelligence

They do not have knowledge of non-perceptual parts of the current state

Mostly too big to generate and to store.

Not adaptive to changes in the environment.

Schematic diagram of a simple reflex agent.
2. MODEL-BASED REFLEX AGENT

The Model-based agent can work in a partially observable environment, and track the
situation.

A model-based agent has two important factors:

Model: It is knowledge about "how things happen in the world," so it is called a
Model-based agent.

Internal State: It is a representation of the current state based on percept history.

These agents have the model, "which is knowledge of the world" and based on the model
they perform actions.

Updating the agent state requires information about:

How the world evolves

How the agent's action affects the world.

A robotic vacuum that remembers cleaned areas and avoids
A model-based reflex agent.

The knowledge of the current state environment is not always sufficient to decide for an
agent to what to do.

The agent needs to know its goal which describes desirable situations.

Goal-based agents expand the capabilities of the model-based agent by having the "goal"
information.

They choose an action, so that they can achieve the goal.

These agents may have to consider a long sequence of possible actions before
deciding
whether the goal is achieved or not.
Such considerations of different scenario are called searching and planning, which makes
an agent proactive.
A navigation system aiming to find the shortest path to a
3. GOAL-BASED AGENTS

These agents are similar to the goal-based agent but provide an extra component of utility
measurement which makes them different by providing a measure of success at a given
state.

Utility-based agent act based not only goals but also the best way to achieve the goal.

The Utility-based agent is useful when there are multiple possible alternatives, and an
agent has to choose in order to perform the best action.

The utility function maps each state to a real number to check how efficiently each action
achieves the goals.
A self-driving car optimizing for safety, speed, and fuel efficiency.
4. UTILITY-BASED AGENTS
 A learning agent in AI is the type of agent which can learn from its past experiences, or it has
learning capabilities.
 It starts to act with basic knowledge and then able to act and adapt automatically through learning.
 A learning agent has mainly four conceptual components, which are:
 Learning element: It is responsible for making improvements by learning from environment
 Critic: Learning element takes feedback from critic which describes that how well the agent is
doing with respect to a fixed performance standard.
 Performance element: It is responsible for selecting external action
 Problem generator: This component is responsible for suggesting actions that will lead to new
and informative experiences.
 Hence, learning agents are able to learn, analyze performance, and look for new ways to improve
the performance.
 A reinforcement learning agent playing chess or Go, improving by learning from wins and
losses.
5. LEARNING AGENTS
A general learning agent.

UNIT 1 INTELLIGENT AGENTS ARTIFICIAL INTELIGENCE

  • 1.
    INTELLIGENT AGENTS In whichwe discuss the nature of agents, perfect or otherwise, the diversity of environments, and the resulting menagerie of agent types
  • 2.
    AGENTS AND ENVIRONMENTS •An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment through actuators. Figure 2.1. • A human agent has eyes, ears, and other organs for sensors and hands, legs, vocal tract, and so on for actuators. • A robotic agent might have cameras and infrared range finders for sensors and various motors for actuators. • A software agent receives keystrokes, file contents, and network packets as sensory inputs and acts on the environment by displaying on the screen, writing files, and sending network packets
  • 3.
    AGENTS AND ENVIRONMENTS… •An actuator is a part of a device or machine that helps it to achieve physical movements by converting energy, often electrical, air, or hydraulic, into mechanical force. • Perceptual inputs are the information that people receive from their environment through their sensory organs.
  • 4.
    AGENTS AND ENVIRONMENTS… •We use the term percept to refer to the agent’s perceptual inputs at any given instant. • An agent’s percept sequence is the complete history of everything the agent has ever perceived. • In general, an agent’s choice of action at any given instant can depend on the entire percept sequence observed to date, but not on anything it hasn’t perceived. • By specifying the agent’s choice of action for every possible percept sequence, we have said more or less everything there is to say about the agent. • Mathematically speaking, we say that an agent’s behavior is described by the agent function that maps any given percept sequence to an action.
  • 7.
    AGENTS AND ENVIRONMENTS… •To illustrate these ideas, we use a very simple example—the vacuum-cleaner world shown in Figure 2.2. • This particular world has just two locations: squares A and B. • The vacuum agent perceives which square it is in and whether there is dirt in the square. • It can choose to move left, move right, suck up the dirt, or do nothing. • One very simple agent function is the following: • if the current square is dirty, then suck otherwise, move to the other square. • A partial tabulation of this agent function is shown in Figure 2.3
  • 8.
  • 9.
    AGENTS AND ENVIRONMENTS… Lookingat Figure 2.3, we see that various vacuum-world agents can be defined simply by filling in the right-hand column in various ways. The obvious question, then, is this: What is the right way to fill out the table? In other words, what makes an agent good or bad, intelligent or stupid? We answer these questions in the next section
  • 11.
    2.2 GOOD BEHAVIOR:THE CONCEPT OF RATIONALITY • A rational agent is one that does the right thing • —conceptually speaking, every entry in the table for the agent function is filled out correctly. • Obviously, doing the right thing is better than doing the wrong thing, but what does it mean to do the right thing?
  • 12.
    GOOD BEHAVIOR: THECONCEPT OF RATIONALITY… • When an agent is plunked down in an environment, it generates a sequence of actions according to the percepts it receives. • This sequence of actions causes the environment to go through a sequence of states. • If the sequence is desirable, then the agent has performed well. • This notion of desirability is captured by a performance measure that evaluates any given sequence of environment states. • As a general rule, it is better to design performance measures according to what one actually wants in the environment, rather than according to how one thinks the agent should behave.
  • 13.
    • Consider, forexample, the vacuum-cleaner agent from the preceding section. • We might propose to measure performance by the amount of dirt cleaned up in a single eight-hour shift. With a rational agent, of course, what you ask for is what you get. • A rational agent can maximize this performance measure by cleaning up the dirt, then dumping it all on the floor, then cleaning it up again, and so on. • A more suitable performance measure would reward the agent for having a clean floor. • For example, one point could be awarded for each clean square at each time step (perhaps with a penalty for electricity consumed and noise generated). • As a general rule, it is better to design performance measures according to what one actually
  • 14.
    GOOD BEHAVIOR: THECONCEPT OF RATIONALITY… 2.2.1 Rationality What is rational at any given time depends on four things: • The performance measure that defines the criterion of success. • The agent’s prior knowledge of the environment. • The actions that the agent can perform. • The agent’s percept sequence to date This leads to a definition of a 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.
  • 15.
    Rationality… Consider the simplevacuum-cleaner agent that cleans a square if it is dirty and moves to the other square if not; this is the agent function tabulated in Figure 2.3. Is this a rational agent First, we need to say what the performance measure is, what is known about the environment, and what sensors and actuators the agent has. Let us assume the following: • The performance measure awards one point for each clean square at each time step, over a “lifetime” of 1000 time steps. • The “geography” of the environment is known a priori but the dirt distribution and the initial location of the agent are not. • Clean squares stay clean and sucking cleans the current square.
  • 16.
    Rationality… • The Leftand Right actions move the agent left and right except when this would take the agent outside the environment, in which case the agent remains where it is. • The only available actions are Left , Right, and Suck. • The agent correctly perceives its location and whether that location contains dirt We claim that under these circumstances the agent is indeed rational; its expected performance is at least as high as any other agent’s
  • 17.
    Rationality… One can seeeasily that the same agent would be irrational under different circumstances. For example, once all the dirt is cleaned up, the agent will oscillate needlessly back and forth; if the performance measure includes a penalty of one point for each movement left or right, the agent will fare poorly. A better agent for this case would do nothing once it is sure that all the squares are clean. If clean squares can become dirty again, the agent should occasionally check and re- clean them if needed. If the geography of the environment is unknown, the agent will need to explore it rather than stick to squares A and B.
  • 18.
    2.2.2 Omniscience, learning,and autonomy • Omniscience refers to the ability to know everything about an environment, including all states, outcomes of actions, and the exact future. • An omniscient agent has perfect knowledge, enabling it to make flawless decisions and always select the optimal course of action. • In many cases, agents operate with incomplete or noisy data and face stochastic outcomes, making true omniscience impossible. • Instead, real-world agents approximate knowledge by gathering percepts and building models of their environment to make informed decisions.
  • 19.
    Learning • Learning isthe capability of an agent to improve its performance over time by leveraging past experiences. A learning agent observes its environment, performs actions, and receives feedback that it uses to refine its behavior and decision-making processes. This adaptability enables the agent to generalize from previous situations and handle new or changing conditions. For instance, a robot navigating a warehouse can learn which routes are most efficient or which obstacles frequently block paths, allowing it to optimize its movements.
  • 20.
    Autonomy • Autonomy isthe agent’s ability to operate independently, making decisions and acting without external guidance. • Autonomous agents rely on their percepts, knowledge, and internal reasoning processes to select and execute actions that align with their goals. • Unlike agents that depend on predefined rules or continuous human input, autonomous agents can adapt to unexpected changes in their environment. For example, a self-driving car adjusts its route based on traffic conditions and unforeseen obstacles, all without human intervention.
  • 21.
    THE NATURE OFENVIRONMNETS • How to to specify a task environment. • Task environments come in a variety of flavors. • The flavor of the task environment directly affects the appropriate design for the agent program.
  • 22.
    2.3.1 Specifying thetask environment • For the acronymically minded, we call this the • PEAS (Performance, Environment, Actuators, Sensors) description. • In designing an agent, the first step must always be to specify the task environment as fully as possible
  • 25.
    2.3.2 Properties oftask environments  An environment in artificial intelligence is the surrounding of the agent. The agent takes input from the environment through sensors and delivers the output to the environment through actuators.  An environment is everything in the world which surrounds the agent, but it is not a part of an agent itself. An environment can be described as a situation in which an agent is present.  The environment is where agent lives, operate and provide the agent with something to sense and act upon it. An environment is mostly said to be non-feministic.
  • 26.
    Properties of taskenvironments… As per Russell and Norvig, an environment can have various features from the point of view of an agent: 1. Fully observable vs Partially Observable 2. Static vs Dynamic 3. Discrete vs Continuous 4. Deterministic vs Stochastic 5. Single-agent vs Multi-agent 6. Episodic vs sequential 7. Known vs Unknown 8. Accessible vs Inaccessible
  • 27.
    1. FULLY OBSERVABLEVS PARTIALLY OBSERVABLE: An environment is fully observable if the agent has access to complete and accurate information about the current state of the environment. This means there are no hidden or unknown elements, and the agent can make decisions based on the entirety of the environment. Example: (Fully observable) Chess: The positions of all pieces on the board are fully visible to both players. An environment is partially observable if the agent does not have complete information about the current state of the environment. There may be hidden states or incomplete data that make decision-making more challenging. Example: Poker: Players cannot see their opponents' cards
  • 28.
    2. DETERMINISTIC VSSTOCHASTIC: An environment is deterministic if the outcome of every action is completely predictable and depends solely on the current state and the chosen action. There is no element of randomness in determining the result. Example: DETERMINISTIC : Chess: Moving a piece always leads to the expected position. An environment is stochastic if there is uncertainty in the outcome of an action. The result depends on probabilistic factors or random variables, making the outcome unpredictable even in the same state. Example: Poker: The cards dealt are random and affect the outcome.
  • 29.
    3. EPISODIC VSSEQUENTIAL: An environment is episodic if the agent's experience can be divided into independent episodes. Each episode consists of the agent perceiving the environment and performing an action without any effect on future episodes. Example: Chess: Each move affects the state of the game and future decisions. EPISODIC Image RecognitionClassifying images; the classification of one image does not affect others An environment is sequential if the agent’s current actions affect future states and decisions. The agent must consider the long-term consequences of its actions. Example: Financial Planning: Decisions today affect future outcomes
  • 30.
    4. SINGLE-AGENT VSMULTI-AGENT  If only one agent is involved in an environment, and operating by itself then such an environment is called single agent environment. However, if multiple agents are operating in an environment, then such an environment is called a multi-agent environment. • Maze Solving: A robot navigating a maze to find the exit. • Sudoku Solver: A program filling in numbers to solve the puzzle. Types of Multi-Agent Interactions: 1.Cooperative: Agents work together to achieve a common goal. Example: Robots collaborating to transport an object. 2.Competitive: Agents work against each other to maximize their individual goals. Example: Chess, where each player (agent) tries to defeat the other. 3.Mixed: A combination of cooperative and competitive behaviors. Example: Multi-player online games with alliances and rivalries.
  • 31.
    5. STATIC VSDYNAMIC: An environment is static if it remains unchanged while the agent is making decisions or performing actions. The environment is effectively frozen in time during the agent's operations. Chess: The board state does not change unless a player makes a move. Puzzle Solving: A Rubik's cube configuration remains static until the solver manipulates it. An environment is dynamic if it changes over time, either independently or due to the actions of other entities. The agent must act and adapt in real-time to the evolving environment. Self-Driving Cars: Traffic, weather, and other vehicles continuously change the environment. tock Trading: Market conditions evolve dynamically based on external factors and other
  • 32.
    6. DISCRETE VSCONTINUOUS: An environment is discrete if it has a finite or countable number of distinct states, actions, or time steps. Everything in the environment can be broken down into clearly defined steps or units. Chess: The board has a finite number of states, and each move corresponds to a discrete action. Tic-tac-toe: A limited set of positions and moves. An environment is continuous if it has an infinite number of possible states, actions, or time values. The environment cannot be easily broken into discrete units. Self-Driving Cars: Steering angles, speed, and positions can take any value within a range.
  • 33.
    7. ACCESSIBLE VSINACCESSIBLE • An environment is accessible if the agent can fully perceive all the relevant aspects of the environment needed to make a decision. In this case, there is no hidden or missing information for the agent. • Chess: The positions of all pieces are visible on the board. • Sudoku Solver: The entire puzzle is visible to the solver. An environment is inaccessible if the agent cannot perceive all the relevant aspects of the environment. There is some hidden or missing information, which introduces uncertainty in the decision-making process. Self-Driving Cars: Sensors may fail to detect all obstacles due to blind spots or adverse weather. Poker: A player cannot see their opponent's cards.
  • 34.
    8. KNOWN VSUNKNOWN An environment is known if the agent has complete knowledge of the environment's rules, dynamics, and the consequences of its actions beforehand. The agent does not need to learn or infer the environment's structure during operation. Chess: The rules and outcomes of moves are fully known to both players. Tic-tac-toe: The agent knows how placing a marker will change the game state. An environment is unknown if the agent does not have prior knowledge of its rules, structure, or the consequences of its actions. The agent must explore, learn, or infer the environment's dynamics to operate effectively. Maze Exploration: A robot navigating an unknown maze without a map. Real-World Robotics: A robot interacting with a new, unpredictable physical environment.
  • 36.
    THE STRUCTURE OFAGENTS The task of AI is to design an agent program which implements the agent function. The structure of an intelligent agent is a combination of architecture and agent program. It can be viewed as: Agent = Architecture + Agent program Architecture: Architecture is machinery that an AI agent executes on. Agent Function: Agent function is used to map a percept to an action. f:P* → A Agent program: Agent program is an implementation of agent function. An agent program executes on the physical architecture to produce function f.
  • 37.
  • 38.
    TYPES OF AIAGENTS Agents can be grouped into five classes based on their degree of perceived intelligence and capability. All these agents can improve their performance and generate better action over the time. These are given below:  Simple Reflex Agent  Model-based reflex agent  Goal-based agents  Utility-based agent  Learning agent
  • 39.
    1. SIMPLE REFLEXAGENT:  The Simple reflex agents are the simplest agents. These agents take decisions on the basis of the current percepts and ignore the rest of the percept history.  These agents only succeed in the fully observable environment.  The Simple reflex agent does not consider any part of percepts history during their decision and action process.  The Simple reflex agent works on, which means it maps the current state to action. Such as a Room Cleaner agent, it works only if there is dirt in the room.  Problems for the simple reflex agent design approach:  They have very limited intelligence  They do not have knowledge of non-perceptual parts of the current state  Mostly too big to generate and to store.  Not adaptive to changes in the environment. 
  • 40.
    Schematic diagram ofa simple reflex agent.
  • 42.
    2. MODEL-BASED REFLEXAGENT  The Model-based agent can work in a partially observable environment, and track the situation.  A model-based agent has two important factors:  Model: It is knowledge about "how things happen in the world," so it is called a Model-based agent.  Internal State: It is a representation of the current state based on percept history.  These agents have the model, "which is knowledge of the world" and based on the model they perform actions.  Updating the agent state requires information about:  How the world evolves  How the agent's action affects the world.  A robotic vacuum that remembers cleaned areas and avoids
  • 43.
  • 45.
     The knowledge ofthe current state environment is not always sufficient to decide for an agent to what to do.  The agent needs to know its goal which describes desirable situations.  Goal-based agents expand the capabilities of the model-based agent by having the "goal" information.  They choose an action, so that they can achieve the goal.  These agents may have to consider a long sequence of possible actions before deciding whether the goal is achieved or not. Such considerations of different scenario are called searching and planning, which makes an agent proactive. A navigation system aiming to find the shortest path to a 3. GOAL-BASED AGENTS
  • 47.
     These agents aresimilar to the goal-based agent but provide an extra component of utility measurement which makes them different by providing a measure of success at a given state.  Utility-based agent act based not only goals but also the best way to achieve the goal.  The Utility-based agent is useful when there are multiple possible alternatives, and an agent has to choose in order to perform the best action.  The utility function maps each state to a real number to check how efficiently each action achieves the goals. A self-driving car optimizing for safety, speed, and fuel efficiency. 4. UTILITY-BASED AGENTS
  • 49.
     A learningagent in AI is the type of agent which can learn from its past experiences, or it has learning capabilities.  It starts to act with basic knowledge and then able to act and adapt automatically through learning.  A learning agent has mainly four conceptual components, which are:  Learning element: It is responsible for making improvements by learning from environment  Critic: Learning element takes feedback from critic which describes that how well the agent is doing with respect to a fixed performance standard.  Performance element: It is responsible for selecting external action  Problem generator: This component is responsible for suggesting actions that will lead to new and informative experiences.  Hence, learning agents are able to learn, analyze performance, and look for new ways to improve the performance.  A reinforcement learning agent playing chess or Go, improving by learning from wins and losses. 5. LEARNING AGENTS
  • 50.