0% found this document useful (0 votes)
29 views6 pages

2 Intelligent Agents

Uploaded by

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

2 Intelligent Agents

Uploaded by

ceyikep910
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

An agent is anything that can be viewed as perceiving its environment through sensors and acting upon

that environment through actuators.


 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.

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.

Mathematically speaking, we say that an agent’s behavior is described by the agent function that maps
any given percept sequence to an action.

We can imagine tabulating the agent function that describes any given agent; for most agents, this would
be a very large table—infinite, in fact, unless we place a bound on the length of percept sequences we
want to consider. Given an agent to experiment with, we can, in principle, construct this table by trying
out all possible percept sequences and recording which actions the agent does in response. 1
The table is, of course, an external characterization of the agent.

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 description;
the agent program is a concrete implementation, running within some physical system.

Example

Consider the vacuum-cleaner world shown.


 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.
 Looking at Figure, 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?

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?

We answer this age-old question in an age-old way: by considering the consequences of the agent’s
behavior. 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.

Notice that we said environment states, not agent states. If we define success in terms of agent’s opinion
of its own performance, an agent could achieve perfect rationality simply by deluding itself that its
performance was perfect.

Obviously, there is not one fixed performance measure for all tasks and agents; typically, a designer will
devise one appropriate to the circumstances. This is not as easy as it sounds.

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.

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.

2 Omniscience, learning, and autonomy


We need to be careful to distinguish between rationality and omniscience. An omniscient agent knows
the actual outcome of its actions and can act accordingly; but omniscience is impossible in reality.

Consider the following example: I am walking along the Champs Elys´ees one day and I see an old friend
across the street. There is no traffic nearby and I’m not otherwise engaged, so, being rational, I start to
cross the street. Meanwhile, at 33,000 feet, a cargo door falls off a passing airliner, 2 and before I make it
to the other side of the street I am flattened. Was I irrational to cross the street? It is unlikely that my
obituary would read “Idiot attempts to cross street.”

This example shows that rationality is not the same as perfection. Rationality maximizes expected
performance, while perfection maximizes actual performance. Retreating from a requirement of
perfection is not just a question of being fair to agents.

Our definition requires a rational agent not only to gather information but also to learn as much as
possible from what it perceives. The agent’s initial configuration could reflect some prior knowledge of
the environment, but as the agent gains experience this may be modified and augmented. There are
extreme cases in which the environment is completely known a priori. In such cases, the agent need not
perceive or learn; it simply acts correctly.

To the extent that an agent relies on the prior knowledge of its designer rather than on its own percepts,
we say that the agent lacks autonomy. A rational agent should be autonomous—it should learn what it
can to compensate for partial or incorrect prior knowledge.
Specifying the task environment
The first step in designing an AI agent is to specify the task environment. The task environment
is comprised of PEAS (Performance measure, Environment, Actuators, Sensors).

The vacuum world was a simple example; let us consider a more complex problem: an automated taxi
driver. We should point out, before the reader becomes alarmed, that a fully automated taxi is currently
somewhat beyond the capabilities of existing technology. (

Figure 2.4 summarizes the PEAS description for the taxi’s task environment. We discuss each element in
more detail in the following paragraphs.

First, what is the performance measure to which we would like our automated driver to aspire?
Desirable qualities include getting to the correct destination; minimizing fuel consumption and wear and
tear; minimizing the trip time or cost; minimizing violations of traffic laws and disturbances to other
drivers; maximizing safety and passenger comfort; maximizing profits. Obviously, some of these goals
conflict, so tradeoffs will be required.

Next, what is the driving environment that the taxi will face? Any taxi driver must deal with a variety of
roads, ranging from rural lanes and urban alleys to 12-lane freeways. The roads contain other traffic,
pedestrians, stray animals, road works, police cars, puddles, and potholes. The taxi must also interact with
potential and actual passengers. There are also some optional choices. The taxi might need to operate in
Southern California, where snow is seldom a problem, or in Alaska, where it seldom is not. It could
always be driving on the right, or we might want it to be flexible enough to drive on the left when in
Britain or Japan. Obviously, the more restricted the environment, the easier the design problem.

The actuators for an automated taxi include those available to a human driver: control over the engine
through the accelerator and control over steering and braking. In addition, it will need output to a display
screen or voice synthesizer to talk back to the passengers, and perhaps some way to communicate with
other vehicles, politely or otherwise.

The basic sensors for the taxi will include one or more controllable video cameras so that it can see the
road; it might augment these with infrared or sonar sensors to detect distances to other cars and obstacles.
To avoid speeding tickets, the taxi should have a speedometer, and to control the vehicle properly,
especially on curves, it should have an accelerometer. To determine the mechanical state of the vehicle, it
will need the usual array of engine, fuel, and electrical system sensors. Like many human drivers, it might
want a global positioning system (GPS) so that it doesn’t get lost. Finally, it will need a keyboard or
microphone for the passenger to request a destination.

In contrast, some software agents (or software robots or softbots) exist in rich, unlimited domains.
Imagine a softbot Web site operator designed to scan Internet news sources and show the interesting
items to its users, while selling advertising space to generate revenue.
To do well, that operator will need some natural language processing abilities, it will need to learn what
each user and advertiser is interested in, and it will need to change its plans dynamically—for example,
when the connection for one news source goes down or when a new one comes online. The Internet is an
environment whose complexity rivals that of the physical world and whose inhabitants include many
artificial and human agents.

Properties of task environments


The range of task environments that might arise in AI is obviously vast. We can, however, identify a
fairly small number of dimensions along which task environments can be categorized.

These dimensions determine, to a large extent, the appropriate agent design and the applicability of each
of the principal families of techniques for agent implementation.

Fully observable vs. partially observable: 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; relevance, in turn, depends on the performance measure. Fully observable environments are
convenient because the agent need not maintain any internal state to keep track of the world. An
environment might be partially observable because of noisy and inaccurate sensors or because parts of the
state are simply missing from the sensor data—for example, a vacuum agent with only a local dirt sensor
cannot tell whether there is dirt in other squares, and an automated taxi cannot see what other drivers are
thinking. If the agent has no sensors at all then the environment is unobservable.

Single agent vs. multiagent: The distinction between single-agent and multiagent environments may
seem simple enough. For example, an agent solving a crossword puzzle by itself is clearly in a single-
agent environment, whereas an agent playing chess is in a two agent environment. There are, however,
some subtle issues. First, we have described how an entity may be viewed as an agent, but we have not
explained which entities must be viewed as agents. Does an agent A (the taxi driver for example) have to
treat an object B (another vehicle) as an agent, or can it be treated merely as an object behaving according
to the laws of physics, analogous to waves at the beach or leaves blowing in the wind? The key
distinction is whether B’s behavior is best described as maximizing a performance measure whose value
depends on agent A’s behavior. For example, in chess, the opponent entity B is trying to maximize its
performance measure, which, by the rules of chess, minimizes agent A’s performance measure. Thus,
chess is a competitive multiagent environment. In the taxi-driving environment, on the other hand,
avoiding collisions maximizes the performance measure of all agents, so it is a partially cooperative
multiagent environment. It is also partially competitive because, for example, only one car can occupy a
parking space. The agent-design problems in multiagent environments are often quite different from those
in single-agent environments; for example, communication often emerges as a rational behavior in
multiagent environments; in some competitive environments, randomized behavior is rational because
it avoids the pitfalls of predictability.

Deterministic vs. stochastic. 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. In principle, an agent need not worry about uncertainty in a fully observable, deterministic
environment

We say an environment is uncertain if it is not fully observable or not deterministic.

Episodic vs. sequential: In an episodic task environment, the agent’s experience is divided into atomic
episodes. Eg an agent that has to spot defective parts on an assembly line bases each decision on the
current part, regardless of previous decisions;

THE STRUCTURE OF AGENTS


The job of AI is to design an agent program that implements the agent function— the mapping from
percepts to actions. We assume this program will run on some sort of computing device with physical
sensors and actuators—we call this the architecture

agent = architecture + program

Obviously, the program we choose has to be one that is appropriate for the architecture. If the program is
going to recommend actions like Walk, the architecture had better have legs

The agent programs take the current percept as input from the sensors and return an action to the
actuators.
Notice the difference between the agent program, which takes the current percept as input, and the agent
function, which takes the entire percept history. The agent program takes just the current percept as input
because nothing more is available from the environment; if the agent’s actions

You might also like