Intelligent agents
Definitions
Agent
An agent is everything that can be viewed to be perceiving its environment through
sensors and act on it through actuators.
Percept
a percept is the agent's perception inputs at some instant of times.
a sequence of percepts is the complete history of everything the agent has ever
perceived
Sensors
Sensor is a special kind of physical devices that allow the agent to be informed about
the environment state partially or fully.
Actuators
Actuator is a physical device that allow the agent to act on the environment.
Agent function
The agent function maps any sequence of percepts to actions that can be taken in the
environment. This function will be implemented for an intelligent agent through a
computer program that takes percepts as input and provides actions as output. It's
important to note that the agent function is a mathematical abstraction, while the
computer program serves as its practical implementation.
Example : Vacuum cleaner world
Partial tabulation for vacuum-cleaner world agent
Good Behavior
A rational agent is one that consistently takes the right actions, determined by
evaluating the consequences of its decisions. This series of actions influences the
environment, causing it to evolve toward various states, some of which may be
desirable and others not. The concept of desirability can be assessed by measuring
the agent's performance.
Rational agent
Rational behavior 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.
Based on we define a rational agent as :
A rational agent should choose an action for each possible sequence of percepts
that it encounters. This action should be the one expected to best enhance its
performance measure, considering the evidence from the percept sequence and
any existing knowledge it possesses.
Task environment
A task environment is considered as fully specified if we have sufficient knowledge
about four elements:
Performance measure.
Environment.
Sensors.
Actuators.
We regroups all of them in the acronym PESA.
Example Taxi driver agent
Properties of Task environment
In this section, we will focus on the environment properties as viewed by the agent :
Observability (full or partial)
This is the first property for which we need to pay close attention in the agent
conception process. We must ensure that the agent's sensors can collect enough
information about the environment, enabling it to make informed decisions and take
appropriate actions to maximize its performance measure.
Single or multi-agent environment
The second property pertains to the external factors that lead to changes in the
environment from one state to another. These changes can result from the actions of a
single agent or from the presence of other agents that compete with our agent. In this
situation, what would be the optimal behavior for our agent—should it be competitive
or collaborative ? Additionally, how will this choice affect the agent's function ?
Deterministic or stochastic
The third property concerns the outcomes of agent actions in the environment. Are
they consistent for the same action, or do they vary ?
An environment is called uncertain if it is partially observable or non-deterministic,
and we must quantify those uncertainties by using probabilistic framework.
An environment is called non-deterministic if there is many outcomes for the same
action and we must handle them without using probabilistic framework
Episodic or sequential
The fourth property indicates whether the agent's actions lead to independent or
dependent outcomes.
Static vs dynamic
This property relates to the evolution of the environment, whether it is caused by
agent actions or other internal or external factors. It is important to note that a multiagent environment is dynamic by default.
Continuous vs discrete
The sixth property informs us about the continuous or discrete nature of environment
states space.
Known vs Unknown
The final property pertains to the agent's prior knowledge of the laws and rules that
govern the evolution of the environment.
The most challenging environmental scenario is one that is partially
observable, involves multiple agents, incorporates randomness
(stochastic), is sequential, dynamic, continuous, and where the
environmental dynamics are completely unknown. Taxi driving presents
difficulties in many of these aspects; however, the driver is
generally familiar with their surroundings. In contrast, driving a
rented car in a new country, with unfamiliar geography and traffic
laws, tends to be much more thrilling.
Structure of an agent
In general, the structure of an agent consists of two main components:
Architecture
Program
There should be a correspondence between the agent's program and its
architecture. For instance, if an agent needs to walk, the architecture must include
legs and other necessary features.
In this course, we will focus primarily on how to design the program and implement
it, ensuring that the agent's architecture is compatible with the tasks it is intended
to perform in its environment.
The program is intended to implement the agent function that can be one of these
four categories :
Simple Reflex Agent (SRA)
The agent in this category responds only to the current percept it receives from its
sensors. There is no prior knowledge, history of actions, goals, or anything else to
influence its response.
Model-Based Reflex Agent (MBRA)
In this category, the agent tracks the effects of its actions on the environment through
an internal state that enables it to manage a partially observable environment. The
model provides the agent with the ability to interpret incomplete information gathered
from its sensors. After processing the measured and estimated information using the
agent's functions, it can make decisions and generate actions to move the
environment toward a new state.
Goal-Based Agent (GBA)
Understanding the environment's current state alone is not enough to make decisions.
For example, at a junction, a taxi can turn left, right, or continue straight, depending on
its intended destination. A goal-based agent needs both a current state description
and goal information—like reaching the passenger's destination. By combining this
goal information with its model, the agent can choose actions that achieve the desired
outcome.
Utility-Based Agent (UBA)
Goals alone do not guarantee high-quality performance. While different action
sequences can get a taxi to its destination, some are quicker, safer, or more costeffective than others. Goals create a basic distinction between “satisfied” and
“unsatisfied” states, but a better measure of performance should compare how
desirable different states are for the agent. Economists and computer scientists refer
to this desirability as "utility."
Learning agent
The common property among the four categories of intelligent agents is their ability to
learn from their experiments in the environment.
A learning agent is supposed to implement four components:
Critic
Learning elements
Performance elements
Problem generator.
Critic
The critic informs the learning element about the agent's performance against some
fixed standard performance. The critic is essential because the percepts alone do not
indicate the agent’s level of success.
Learning element
This element is responsible for making improvements
Performance element
Is responsible for the choice of action that will be executed by the agent in the
environment
Problem generator
The final component of the learning agent is the problem generator. Its role is to
suggest actions that can lead to new and informative experiences. If the performance
element had its way, it would continue to perform actions that it considers the best,
based on its current knowledge. However, if the agent is willing to explore and try
some actions that may not be optimal in the short term, it might discover much better
actions for the long term. The problem generator is responsible for proposing these
exploratory actions.
We have described agent programs (in very general terms) as
consisting of various components that are responsible for answering
key questions, such as: “What is the current state of the world?”
“What action should I take now?” and “What are the consequences of my
actions?” The next logical question for a student of artificial
intelligence is, “How do these components actually function?” While a
comprehensive answer would require about a thousand pages, we will
focus on some basic distinctions in how the components can represent
the environment in which the agent operates.
We can roughly categorize these representations along a spectrum of
increasing complexity and expressive power: atomic, factored, and
structured.