Professional Documents
Culture Documents
INTELLIGENT AGENTS VER2
INTELLIGENT AGENTS VER2
An agent is anything that can be viewed as perceiving its environment through sensors and
acting upon that environment through actuators. This simple idea is illustrated in Figure below.
Percept - We use the term percept to refer to the agent's perceptual inputs at any given instant.
Percept Sequence - An agent's percept sequence is the complete history of everything the
agent has ever perceived.
architecture,
agent function, and
agent program.
1. Architecture
Architecture refers to machinery or devices that consists of actuators and sensors. The intelligent
agent executes on this machinery.
Examples
Human agent:
• Sensors: eyes, ears,and other organs,
• Actuators: hands, legs, mouth, other body parts
Robotic agent:
• Sensors: cameras, sonars, laser range finders;
• Actuators: various motors, gripper
Agent function is a function in which actions are mapped from a certain percept sequence.
Percept sequence refers to a history of what the intelligent agent has perceived.
Mathematically speaking, we say that an agent's behavior is described by the agent function that
maps any given percept sequence to an action.
To illustrate these idea, we will use a very simple example-the vacuum-cleaner world
shown in Figure above. 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.
3. Agent program
Internally, The agent function for an artificial agent will be implemented by an agent program. It
is important to keep these two ideas distinct. The agent function is an abstract mathematical
RATIONAL AGENT
A rational agent is one that does the right thing, 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 here depends on four things:
AGENT CHARACTERISTICS
Situatedness
The agent receives some form of sensory input from its environment, and it performs some
action that changes its environment in some way. Examples of environments: the physical
world and the Internet.
Autonomy
The agent can act without direct intervention by humans or other agents and that it has
control over its own actions and internal state.
Adaptivity
The agent is capable of (1) reacting flexibly to changes in its environment; (2) taking goal-
directed initiative (i.e., is pro-active), when appropriate; and (3) learning from its own
experience, its environment, and interactions with others.
Sociability
The agent is capable of interacting in a peer-to-peer manner with other agents or humans.
If an agent's sensors give it access to the complete state of the environment at each point in time,
then we say that the task environment is fully observable. A task environment is effectively fully
observable if the sensors detect all aspects that are relevant to the choice of action;
If the next state of the environment is completely determined by the current state and the action
executed by the agent, then we say the environment is deterministic; otherwise, it is stochastic.
An agent cannot entirely control a stochastic environment because it is unpredictable in nature.
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. Crucially, the next
episode does not depend on the actions taken in previous episodes. For example, an agent that
has to spot defective parts on an assembly line bases each decision on the current part, regardless
of previous decisions;
In sequential environments, on the other hand, the current decision could affect all future
decisions. Sequential environment, an agent requires memory of past actions to determine the
next best actions. Chess and taxi driving are sequential.
Taxi driving is a continuous state and continuous-time problem: the speed and location of the
taxi and of the other vehicles sweep through a range of continuous values and do so smoothly
over time. Taxi-driving actions are also continuous (steering angles, etc.).
TYPES OF AGENTS
The simplest kind of agent is the simple reflex agent. These agents select actions on the basis of
the current percept, ignoring the rest of the percept history. For example, the vacuum agent
whose agent function is tabulated above is a simple reflex agent, because its decision is based
only on the current location and on whether that contains dirt.
state INTERPRET-INPUT(percept)
action RULE-ACTION[rule]
return action
A simple reflex agent. It acts according to a rule whose condition matches the current state, as
defined by the percept.
The agent program for a simple reflex agent in the two-state vacuum environment. This
program implements the agent function tabulated in the figure 1.4.
Characteristics
Only works if the environment is fully observable.
Lacking history, easily get stuck in infinite loops
One solution is to randomize actions
Unlike simple reflex agents, model-based reflex agents consider the percept history in their
actions. The agent function can still work well even in an environment that is not fully
observable. These agents use an internal model that determines the percept history and effect of
actions. They reflect on certain aspects of the present state that have been unobserved.
.
Model: It is knowledge about "how things happen in the world," so it is called a Model-based
agent. These agents have the model, "which is knowledge of the world" and based on the model
they perform actions.
Internal State: It is a representation of the current state based on percept history. Updating
the agent state requires information about:
o How the world evolves - First, we need some information about how the world evolves
independently of the agent-for example, that an overtaking car generally will be closer
behind than it was a moment ago.
o How the agent's action affects the world - Second, we need some information about
how the agent's own actions affect the world-for example, that when the agent turns the
steering wheel clockwise, the car turns to the right or that after driving for five minutes
northbound on the freeway one is usually about five miles north of where one was five
minutes ago.
Model-Based Reflex Agent utilizes condition-action rule where it works by finding a rule that
will allow the condition, which is based on the current situation, to be satisfied.
function REFLEX-AGENT-WITH-STATE(percept) returns an action
action RULE-ACTION[rule]
return action
Model based reflex agent. It keeps track of the current state of the world using an internal
model. It then chooses an action in the same way as the 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. Agents of this kind take future events into
consideration.
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.
4. Utility-based agents
A utility-based agent is an agent that acts based not only on what the goal is, but the best way
to reach that goal. In short, it's the usefulness (or utility) of the agent that makes itself distinct
from its counterparts. The utility can be anything from maximizing profits to minimizing energy
consumption. Generally, utility-based agents will have a utility function as part of their model.
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.
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 others.