Intelligent Agents: An Introduction To Multiagent Systems
Intelligent Agents: An Introduction To Multiagent Systems
INTELLIGENT AGENTS
1
What is an Agent?
The main point about agents is they are
autonomous: capable of acting independently,
exhibiting control over their internal state
Thus: an agent is a computer system capable
of autonomous action in some environment in
order to meet its design objectives
SYSTEM
input output
ENVIRONMENT
2
What is an Agent?
Trivial (non-interesting) agents:
thermostat
UNIX daemon (e.g., biff)
An intelligent agent is a computer system
capable of flexible autonomous action in
some environment
By flexible, we mean:
reactive
pro-active
social
3
Reactivity
If a program’s environment is guaranteed to be fixed, the
program need never worry about its own success or
failure – program just executes blindly
Example of fixed environment: compiler
The real world is not like that: things change, information
is incomplete. Many (most?) interesting environments are
dynamic
Software is hard to build for dynamic domains: program
must take into account possibility of failure – ask itself
whether it is worth executing!
A reactive system is one that maintains an ongoing
interaction with its environment, and responds to changes
that occur in it (in time for the response to be useful)
4
Proactiveness
Reacting to an environment is easy (e.g.,
stimulus → response rules)
But we generally want agents to do things
for us
Hence goal directed behavior
Pro-activeness = generating and
attempting to achieve goals; not driven
solely by events; taking the initiative
Recognizing opportunities
5
Balancing Reactive and Goal-
Oriented Behavior
We want our agents to be reactive,
responding to changing conditions in an
appropriate (timely) fashion
We want our agents to systematically work
towards long-term goals
These two considerations can be at odds with
one another
Designing an agent that can balance the two
remains an open research problem
6
Social Ability
The real world is a multi-agent environment:
we cannot go around attempting to achieve
goals without taking others into account
Some goals can only be achieved with the
cooperation of others
Similarly for many computer environments:
witness the Internet
Social ability in agents is the ability to interact
with other agents (and possibly humans) via
some kind of agent-communication language,
and perhaps cooperate with others
7
Other Properties
Other properties, sometimes discussed in the context of
agency:
mobility: the ability of an agent to move around an electronic
network
veracity: an agent will not knowingly communicate false
information
benevolence: agents do not have conflicting goals, and that
every agent will therefore always try to do what is asked of it
rationality: agent will act in order to achieve its goals, and will
not act in such a way as to prevent its goals being achieved
— at least insofar as its beliefs permit
learning/adaption: agents improve performance over time
8
Agents and Objects
Are agents just objects by another name?
Object:
encapsulates some state
communicates via message passing
has methods, corresponding to operations
that may be performed on this state
9
Agents and Objects
Main differences:
agents are autonomous:
agents embody stronger notion of autonomy than
objects, and in particular, they decide for themselves
whether or not to perform an action on request from
another agent
agents are smart:
capable of flexible (reactive, pro-active, social) behavior,
and the standard object model has nothing to say about
such types of behavior
agents are active:
a multi-agent system is inherently multi-threaded, in that
each agent is assumed to have at least one thread of
active control
10
Objects do it for free…
11
Agents and Expert Systems
Aren’t agents just expert systems by another
name?
Expert systems typically disembodied ‘expertise’
about some (abstract) domain of discourse (e.g.,
blood diseases)
Example: MYCIN knows about blood diseases in
humans
It has a wealth of knowledge about blood diseases, in the
form of rules
A doctor can obtain expert advice about blood diseases
by giving MYCIN facts, answering questions, and posing
queries
12
Agents and Expert Systems
Main differences:
agents situated in an environment:
MYCIN is not aware of the world — only
information obtained is by asking the user
questions
agents act:
MYCIN does not operate on patients
Some real-time (typically process control)
expert systems are agents
13
Intelligent Agents and AI
Aren’t agents just the AI project?
Isn’t building an agent what AI is all about?
AI aims to build systems that can
(ultimately) understand natural language,
recognize and understand scenes, use
common sense, think creatively, etc. — all
of which are very hard
So, don’t we need to solve all of AI to build
an agent…?
14
Intelligent Agents and AI
When building an agent, we simply want a
system that can choose the right action to
perform, typically in a limited domain
We do not have to solve all the problems of
AI to build a useful agent:
a little intelligence goes a long way!
Oren Etzioni, speaking about the commercial
experience of NETBOT, Inc:
“We made our agents dumber and dumber
and dumber…until finally they made money.”
15
Environments – Accessible vs.
inaccessible
An accessible environment is one in which
17
Environments - Episodic vs.
non-episodic
In an episodic environment, the performance
18
Environments - Static vs.
dynamic
A static environment is one that can be
assumed to remain unchanged except by the
performance of actions by the agent
A dynamic environment is one that has other
processes operating on it, and which hence
changes in ways beyond the agent’s control
Other processes can interfere with the agent’s
actions (as in concurrent systems theory)
The physical world is a highly dynamic
environment
19
Environments – Discrete vs.
continuous
An environment is discrete if there are a
23
Agents as Intentional
Systems
McCarthy argued that there are occasions
when the intentional stance is appropriate:
‘To ascribe beliefs, free will, intentions, consciousness, abilities, or wants
to a machine is legitimate when such an ascription expresses the same
information about the machine that it expresses about a person. It is useful
when the ascription helps us understand the structure of the machine, its
past or future behavior, or how to repair or improve it. It is perhaps never
logically required even for humans, but expressing reasonably briefly what
is actually known about the state of the machine in a particular situation
may require mental qualities or qualities isomorphic to them. Theories of
belief, knowledge and wanting can be constructed for machines in a
simpler setting than for humans, and later applied to humans. Ascription of
mental qualities is most straightforward for machines of known structure
such as thermostats and computer operating systems, but is most useful
when applied to entities whose structure is incompletely known’.
24
Agents as Intentional
Systems
What objects can be described by the intentional
stance?
As it turns out, more or less anything can. . .
consider a light switch:
‘It is perfectly coherent to treat a light switch as a
(very cooperative) agent with the capability of
transmitting current at will, who invariably transmits
current when it believes that we want it transmitted
and not otherwise; flicking the switch is simply our
way of communicating our desires’. (Yoav Shoham)
But most adults would find such a description
absurd!
Why is this?
25
Agents as Intentional
The answer seems to be that while the intentional stance
Systems
description is consistent,
objects
28
Agents as Intentional
Systems
Other 3 points in favor of this idea:
Characterizing Agents:
It provides us with a familiar, non-technical way
of understanding & explaining agents
Nested Representations:
It gives us the potential to specify systems that
include representations of other systems
It is widely accepted that such nested
representations are essential for agents that
must cooperate with other agents
29
Agents as Intentional
Systems Systems:
Post-Declarative
This view of agents leads to a kind of post-declarative
programming:
In procedural programming, we say exactly what a system
should do
In declarative programming, we state something that we want to
achieve, give the system general info about the relationships
between objects, and let a built-in control mechanism (e.g.,
goal-directed theorem proving) figure out what to do
With agents, we give a very abstract specification of the system,
and let the control mechanism figure out what to do, knowing
that it will act in accordance with some built-in theory of agency
(e.g., the well-known Cohen-Levesque model of intention)
30
An aside…
We find that researchers from a more mainstream
computing discipline have adopted a similar set of ideas…
In distributed systems theory, logics of knowledge are used
in the development of knowledge based protocols
The rationale is that when constructing protocols, one often
encounters reasoning such as the following:
IF process i knows process j has
received message m1
THEN process i should send process j
the message m2
In DS theory, knowledge is grounded — given a precise
interpretation in terms of the states of a process; we’ll
examine this point in detail later
31
Abstract Architecture for
Agents
Assume the environment may be in any of a finite
32
Abstract Architecture for
Agents
Let:
R be the set of all such possible finite
sequences (over E and Ac)
RAc be the subset of these that end with an
action
RE be the subset of these that end with an
environment state
33
State Transformer Functions
A state transformer function represents behavior
of the environment:
35
Systems
36
Systems
Formally, a sequence
37
Purely Reactive Agents
38
Perception
see action
Agent
Environment
39
Perception
The see function is the agent’s ability to
observe its environment, whereas the action
function represents the agent’s decision
making process
Output of the see function is a percept:
see : E → Per
which maps environment states to percepts,
and action is now a function
action : Per* → A
which maps sequences of percepts to actions
40
Agents with State
We now consider agents that maintain state:
Agent
see action
next state
Environment
41
Agents with State
These agents have some internal data structure, which is
typically used to record information about the environment
state and history.
Let I be the set of all internal states of the agent.
The perception function see for a state-based agent is
unchanged:
see : E → Per
The action-selection function action is now defined as a
mapping
action : I → Ac
from internal states to actions. An additional function next is
introduced, which maps an internal state and percept to an
internal state:
next : I × Per → I
42
Agent Control Loop
43
Tasks for Agents
44
Utility Functions over States
One possibility: associate utilities with
individual states — the task of the agent is
then to bring about states that maximize
utility
A task specification is a function
u:E→
which associates a real number with every
environment state
45
Utility Functions over States
But what is the value of a run…
minimum utility of state on run?
maximum utility of state on run?
sum of utilities of states on run?
average?
Disadvantage: difficult to specify a long term
view when assigning utilities to individual
states
(One possibility: a discount for states later
on.)
46
Utilities over Runs
Another possibility: assigns a utility not to
individual states, but to runs themselves:
u:R→
Such an approach takes an inherently long
term view
Other variations: incorporate probabilities of
different states emerging
Difficulties with utility-based approaches:
where do the numbers come from?
we don’t think in terms of utilities!
hard to formulate tasks in these terms
47
Utility in the Tileworld
Simulated two dimensional grid environment on
which there are agents, tiles, obstacles, and holes
An agent can move in four directions, up, down, left,
or right, and if it is located next to a tile, it can push it
Holes have to be filled up with tiles by the agent. An
agent scores points by filling holes with tiles, with the
aim being to fill as many holes as possible
TILEWORLD changes with the random appearance
and disappearance of holes
Utility function defined as follows:
48
The Tileworld, Some
Examples
From Goldman and Rosenschein, AAAI-94:
49
The Tileworld, Some
Examples
From Goldman and Rosenschein, AAAI-94:
50
Expected Utility & Optimal
Agents
Write P(r | Ag, Env) to denote probability that
51
Bounded Optimal Agents
Some agents cannot be implemented on
some computers
(A function Ag : RE → Ac may need more than
available memory to implement)
Write AGm to denote the agents that can be
implemented on machine (computer) m:
52
Predicate Task Specifications
53
Task Environments
A task environment is a pair 〈Env, Ψ〉 where
Env is an environment,
Ψ : R → {0, 1}
is a predicate over runs.
Let TE be the set of all task environments.
A task environment specifies:
the properties of the system the agent will
inhabit
the criteria by which an agent will be judged to
have either failed or succeeded
54
Task Environments
55
The Probability of Success
56
Achievement & Maintenance
Tasks
Two most common types of tasks
are achievement tasks and
maintenance tasks:
Achievement tasks are those of the
form “achieve state of affairs φ”
Maintenance tasks are those of the
form “maintain state of affairs ψ”
57
Achievement & Maintenance
Tasks
An achievement task is specified by a set G of
“good” or “goal” states: G ⊆ E
The agent succeeds if it is guaranteed to bring
about at least one of these states (we do not care
which one — they are all considered equally good).
A maintenance goal is specified by a set B of “bad”
states: B ⊆ E
The agent succeeds in a particular environment if it
manages to avoid all states in B — if it never
performs actions which result in any state in B
occurring
58
Agent Synthesis
Agent synthesis is automatic programming: goal is to
have a program that will take a task environment, and
from this task environment automatically generate an
agent that succeeds in this environment:
59
Agent Synthesis
60