Ai 2
Ai 2
دانشگاه اراک
1402
CHAPTER 2
INTELLIGENT
AGENTS
[email protected]
AGENT
An agent is anything that can be viewed as perceiving its environment
through sensors and acting upon that environment through actuators.
we will say that the right action is the one that will cause the agent to be most successful
Is impossible in reality
it should learn what it can to compensate for partial or incorrect prior knowledge.
After sufficient experience of its environment, the behavior of a rational agent can
become effectively independent of its prior knowledge.
TASK ENVIRONMENTS
we had to specify the
❖ Performance measure,
❖ Environment,
❖ agent's Actuators
❖ agent's Sensors
We will group all these together under the heading of the task environment.
➢ Fully observable : If an agent's sensors give it access to the complete state of the
environment at each point in time
for example, a vacuum agent with only a local dirt sensor cannot tell whether there is dirt in
other squares
EPISODIC & SEQUENTIAL
In an episodic task environment, the agent's experience is divided into
atomic episodes.
Each episode consists of the agent perceiving and then performing a single action.
In episodic environments, the choice of action in each episode depends only on the
episode itself. Many classification tasks are episodic
In sequential environments, on the other hand, the current decision could affect all
future decisions.
Episodic environments are much simpler than sequential environments because the
agent does not need to think ahead.
SINGLE-AGENT & MULTIAGENT
Deterministic : If the next state of the environment is completely determined by the current
state and the action executed by the agent
➢ If the environment is deterministic except for the actions of other agents, we say that
the environment is strategic.
STATIC & DYNAMIC
if the environment can change while an agent is deliberating, then we say the environment is
dynamic
If the environment itself does not change with the passage of time but the agent's
performance score does, then we say the environment is semi-dynamic.
DISCRETE & CONTINUOUS
The discrete/continuous distinction can be applied to the state of the environment, to the
way time is handled, and to the percepts and actions of the agent.
THE STRUCTURE OF AGENTS
The job of AI is to design the agent program that implements the agent function mapping
percepts to actions.
Architecture : this program will run on some sort of computing device with physical sensors
and actuators.
● Utility-based agents.
SIMPLE REFLEX AGENTS
These agents select actions on the basis of the current percept, ignoring the rest of the
percept history.
For example, the vacuum agent is a simple reflex agent
MODEL-BASED REFLEX AGENTS
The most effective way to handle partial observability is for the agent to keep track of the
part of the world it can't see now.
• That is, the agent should maintain some sort of internal state that depends on the
percept history
Knowing about the current state of the environment is not always enough to decide what to
do.
• For example, at a road junction, the taxi can turn left, turn right, or go straight on.
• The correct decision depends on where the taxi is trying to get to.
Goals alone are not really enough to generate high-quality behavior in most environments.
• For example, there are many action sequences that will get the taxi to its destination
(thereby achieving the goal) but some are quicker, safer, more reliable, or cheaper than
other
• Goals just provide a crude binary distinction between "happy" and "unhappy" states.
• A utility function maps a state
(or a sequence of states) onto a real number,
which describes the associated degree of
happiness.
LEARNING AGENTS
Learning allows the agent: to operate in initially unknown environments and to become
more competent
• learning element, which is responsible for making improvements. The 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.
An agent is something that perceives and acts in an environment. The agent function for an agent
specifies the action taken by the agent in response to any percept sequence.
The performance measure evaluates the behavior of the agent in an environment. A rational agent acts
so as to maximize the expected value of the performance measure, given the percept sequence it has
seen so far.
A task environment specification includes the performance measure, the external environment, the
actuators, and the sensors. In designing an agent, the first step must always be to specify the task
environment as fully as possible.
Task environments vary along several significant dimensions. They can be fully or partially observable,
single-agent or multiagent, deterministic or nondeterministic, episodic or sequential, static or dynamic
SUMMARY
In cases where the performance measure is unknown or hard to specify correctly, there is a significant
risk of the agent optimizing the wrong objective. In such cases the agent design should reflect
uncertainty about the true objective.
The agent program implements the agent function. There exists a variety of basic agent program designs
reflecting the kind of information made explicit and used in the decision process. The designs vary in
efficiency, compactness, and flexibility. The appropriate design of the agent program depends on the
nature of the environment.
Simple reflex agents respond directly to percepts, whereas model-based reflex agents maintain internal
state to track aspects of the world that are not evident in the current percept. Goal-based agents act to
achieve their goals, and utility-based agents try to maximize their own expected “happiness.”
All agents can improve their performance through learning.