Multiagent Systems - Slides
Multiagent Systems - Slides
Multi-Agent Systems
Michal Pechoucek, Branislav Bošanský & Michal Jakob
General Information
Lecturers: Prof. Michal Pěchouček, Dr. Branislav Bošanský, Dr. Michal Jákob
Tutorials: Branislav Bošanský and Karel Horak
14 lectures and 14 tutorials
Course web page:
https://cw.fel.cvut.cz/wiki/courses/be4m36mas/start
Recommended reading:
– J. M. Vidal: Multiagent Systems: with NetLogo Examples (on-line)
– Y. Shoham and K. Leyton-Brown: Multiagent Systems: Algorithmic, Game-
Theoretic, and Logical Foundations (on-line)
– Russel and Norvig: Artificial Intelligence: Modern Approach
Selected illustrations taken Russel and Norvig – Artificial Intelligence: Modern Approach
Selected slides have been prepared by Terry Payne, University of LIverpool, who kindly provided them for OI/MAS
Outline of Lecture 1
1. Motivational Introduction
2. Defining Agency
3. Specifying Agents
4. Agent Architectures
!3
Introduction to Multiagent Systems
Motivational Introduction
Autonomous Agents and Multiagent Systems
!5
Why Intelligent Agents?
1992: computers everywhere
– lots of computerised data
– computer driven manufacturing, production planning, diagnostics
!6
Why Intelligent Agents?
1992: computers everywhere
– lots of computerised data
– computer driven manufacturing, production planning, diagnostics
!7
Why Intelligent Agents?
1992: computers everywhere
Y2K: internet everywhere
– data provisioning via internet, search (Google from 1998, in 2001 3B of documents)
!8
Why Intelligent Agents?
1992: computers everywhere
Y2K: internet everywhere
– data provisioning via internet, search (Google from 1998, in 2001 3B of documents)
!9
Why Intelligent Agents?
1992: computers everywhere
Y2K: internet everywhere
NOW: internet of everything
– mobile computing
– cloud computing
– wireless enabled devices
!10
Why Intelligent Agents?
1992: computers everywhere
Y2K: internet everywhere
NOW: internet of everything
– mobile computing
– cloud computing
– wireless enabled devices
!11
Why Intelligent Agents? Ubiquity: Cost of processing power
decreases dramatically (e.g. Moore’s
Law), computers used everywhere
1992: computers everywhere
Interconnection: Formerly only user-
Y2K: internet everywhere
!12
Agents briefly
multi-agent system is a decentralized multi-actor (software) system,
often geographically distributed whose behavior is defined and
implemented by means of complex, peer-to-peer interaction among
autonomous, rational and deliberative entities.
autonomous agent is a special kind of a intelligent software program
that is capable of highly autonomous rational action, aimed at achieving
the private objective of the agent – can exists on its own but often is a
component of a multi-agent system – agent is autonomous, reactive,
proactive and social
agent researchers study problems of integration, communication,
reasoning and knowledge representation, competition (games) and
cooperation (robotics), agent oriented software engineering, …
!13
Agents briefly
agent technology is software technology supporting the development
of the autonomous agents and multi-agent systems agent-based
computing is a special research domain, subfield of computer science
and artificial intelligence that studies the concepts of autonomous agents
multi-agent application is a software system, functionality of which is
given by interaction among autonomous software/hardware/human
components.
- but also a monolithic software application that is autonomously
operating within a community of autonomously acting software
applications, hardware systems or human individuals
!14
Key properties of Intelligent Agent
Autonomy: Agent is fully accountable for its given state. Agent accepts
requests from other agents or the environment but decides individually
about its actions
Reactivity: Agent is capable of near-real-time decision with respect to
changes in the environment or events in its social neighbourhood
Intentionality: Agent maintain long term intention. the agent meets the
designer’s objectives. It knows its purpose and executes even if not
requested.
.
!15
Key properties of Intelligent Agent
Rationality: Agent is capable of intelligent rational decision making. Agent
can analyze future course of actions and choose an action which maximizes
his utility
Social capability: Agent is aware of the either:
(i) existence,
(ii) communication protocols,
(iii) capability, services provided by the other agents.
Agent can reason about other agents.
!16
Reactivity
Reactivity
• If a program’s environment is guaranteed to be fixed, the
program need never worry about its own success or
failure
!17
Reactivity Reactivity
!18
Proactiveness
Proactiveness
• Reacting to an environment is easy
• e.g., stimulus → response rules
!19
Social Ability 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 by interacting with others.
• Similarly for many computer environments: witness the INTERNET.
!20
SocialSocial
Ability:Ability: Cooperation
Cooperation
!21
Social Ability: Coordination
Social Ability: Coordination
• Coordination is managing the
interdependencies between
activities.
!22
Social Ability: Coordination
Social Ability: Negotiation
• Negotiation is the ability to reach
agreements on matters of common
interest.
• For example:
• You have one TV in your house; you want to watch a
movie, your housemate wants to watch football.
• A possible deal: watch football tonight, and a movie
tomorrow.
!23
Some other properties
Some Other Properties...
• Mobility • Veracity
• The ability of an agent to move. For • Whether an agent will knowingly
software agents this movement is communicate false information.
around an electronic network.
• Benevolence
• Rationality • Whether agents have conflicting goals,
• Whether an agent will act in order to and thus whether they are inherently
achieve its goals, and will not helpful.
deliberately act so as to prevent its
goals being achieved.
• Learning/adaption
• Whether agents improve performance
over time.
!24
Agents vs. Objects
agent's behaviour is unpredictable as observed from the outside,
agent is situated in the environment, communication model is
asynchronous, agent is autonomous, …
!25
Agents vs. Objects
agent's behaviour is unpredictable as observed from the outside,
agent is situated in the environment, communication model is
asynchronous, agent is autonomous, …
!26
Multiagent Systems Engineering &
Agent Oriented Software Engineering
!29
Multiagent Design Problem
Traditional design problem: How can I build a system that
produces the correct output given some input?
– Each system is more or less isolated, built from scratch
!30
Types of Agent Systems
single-agent multi-agent
cooperative competitive
!31
Micro vs. Macro MAS Engineering
!32
!33
!34
!35
!36
Opportunities for MAS Deployment
Agent-based computing have been used:
1. Design paradigm – the concept of decentralized, interacting, socially
aware, autonomous entities as underlying software paradigm (often deployed
only in parts, where it suits the application)
2. Source of technologies – algorithms, models, techniques architectures,
protocols but also software packages that facilitate development of
multi-agent systems
3. Simulation concept – a specialized software technology that allows
simulation of natural multi-agent systems, based on (1) and (2).
!37
Opportunities for MAS Deployment
Agent-based computing have been used:
1. Design paradigm – the concept of decentralized, interacting, socially
aware, autonomous entities as underlying software paradigm (often deployed
only in parts, where it suits the application)
2. Source of technologies – algorithms, models, techniques architectures,
protocols but also software packages that facilitate development of
multi-agent systems
3.Agent Oriented
Simulation Software
concept Engineering
– a specialized software– technology
provide designers and
that allows
developers with
simulation a way of
of natural structuring
multi-agent an application
systems, based onaround
(1) andautonomous,
(2).
communicative elements, and lead to the construction of software tools and
infrastructures to support this metaphor
!38
Opportunities for MAS Deployment
Agent-based computing have been used:
1. Design paradigm – the concept of decentralized, interacting, socially
aware, autonomous entities as underlying software paradigm (often deployed
only in parts, where it suits the application)
2. Source of technologies – algorithms, models, techniques architectures,
protocols but also software packages that facilitate development of
multi-agent systems
3. Simulation concept – a specialized software technology that allows
simulation of natural multi-agent systems, based on (1) and (2).
!39
Opportunities for MAS Deployment
Agent-based computing have been used:
1. Design paradigm – the concept of decentralized, interacting, socially
aware, autonomous entities as underlying software paradigm (often deployed
only in parts, where it suits the application)
2. Source of technologies – algorithms, models, techniques architectures,
protocols but also software packages that facilitate development of
multi-agent systems
3. Simulation concept – a specialized software technology that allows
simulation of natural multi-agent systems, based on (1) and (2).
!41
Course Content
– Agent architectures
– Non-cooperative game theory
– Coalition game theory
– Mechanism design
– Auctions
– Social choice
– Distributed constraint reasoning
– Agent based simulation
!42
Introduction to Multi-Agent Systems
Defining Agency
!43
What is Agent?
!45
Rational Behaviour
Definition (Russell & Norvig): Rational agent chooses
whichever action maximizes the expected value of the
performance measure given the percept sequence to date and
whatever bulit-in knowledge the agent has.
!46
Agent Environments
!47
Agent Environments
!48
Agent Environments
!49
Agent Environments
!50
Agent Environments
!51
Agent Environments
!52
AgentProperties of Environments
Environments
• Real time
• A real time interaction is one in which time plays a part in evaluating an agents performance
• Such interactions include those in which:
• A decision must be made about some action within a given time bound
• Some state of affairs must occur as quickly as possible
• An agent has to repeat some task, with the objective to repeat the task as often as possible
!53
Example Environments
!54
Rational Behaviour
Definition (Russell & Norvig): Rational agent chooses
whichever action maximizes the expected value of the
performance measure given the percept sequence to date and
whatever bulit-in knowledge the agent has.
!55
Abstract Architectures for Agents
•Assume the world may be in any of a finite set E of discrete,
instantaneous states
E = {e, e0 , . . .}
• Actions can be non-deterministic, but only one state ever results from and
action.
North
North
Abstract Architectures for Agents (2)
• When actions are deterministic each state has only
one possible successor.
• A run would look something like the following:
East
North
Abstract Architectures for Agents
North
North
We could
illustrate this
as a graph...
Abstract Architectures for Agents
North
North
• 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; and
RE be the subset of these that end with a state.
R(Ag, Env)
Formally, a sequence
(e0 , ↵0 , e1 , ↵1 , e2 , . . .)
represents a run of an agent Ag in environment Env = hE, e0 , ⌧ i if:
2. ↵0 = Ag(e0 ); and
3. for u > 0,
eu 2 ⌧ ((e0 , ↵0 , . . . , ↵u 1 )) and
↵u = Ag((e0 , ↵0 , . . . , eu ))
Why the notation?
• We won’t be able to tell two such agents apart by watching what they
do.
Deliberative Agents
action : E ! Ac
⇢
o↵ if e = temperature OK
action(e) =
on otherwise.
Reactive Agents
Environment
see actio
Agent
next
Perception
• The agent has some internal data structure, which is typically used to
record information about the environment state and history.
next : I ⇥ P er ! I
• This says how the agent updates its view of the world
when it gets a new percept.
Agent Control Loop
u:E!R
Local Utility Functions
• 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. This is what we do in reinforcement
learning.
r = -0.04 (unless stated otherwise)
utility function 2
1
r=-1
3 👎
1 2 3 4
• Goal is to select actions to
maximise future rewards
– Each action results in moving to a state with some assigned reward
– Allocation of that reward may be immediate or delayed (e.g. until the
end of the run)
– It may be better to sacrifice immediate reward to gain more long-
term reward
• r = (-0.04 x 4) + 1.0
• r = 1.0 - 0.16 = 0.84
Making 2 👍
r=-1
3 👎
u:R!R
and clearly:
X
P (r | Ag, Env) = 1.
r2R(Ag,Env)
Expected Utility
• That is, for each run we compute the utility and multiply it by
the probability of the run.
Example 1 as follows:
P (e0 !
0↵
e1 | Ag1 , Env1 ) = 0.4
↵
P (e0 !
0
e2 | Ag1 , Env1 ) = 0.6
↵
P (e0 !
1
e3 | Ag2 , Env1 ) = 0.1
Consider the environment Env1 = hE, e0 , ⌧ i ↵
defined as follows: P (e0 !
1
e4 | Ag2 , Env1 ) = 0.2
↵
P (e0 !
1
e5 | Ag2 , Env1 ) = 0.7
E = {e0 , e1 , e2 , e3 , e4 , e5 }
↵ Assume the utility function u1 is defined
⌧ (e0 !)
0
= {e1 , e2 } as follows:
↵
⌧ (e0 !)
1
= {e3 , e4 , e5 } ↵
u1 (e0 !
0
e1 ) = 8
↵
There are two agents possible with respect u1 (e0 !
0
e2 ) = 11
to this environment: ↵
u1 (e0 !
1
e3 ) = 70
Ag1 (e0 ) = ↵0 ↵
u1 (e0 !
1
e4 ) = 9
Ag2 (e0 ) = ↵1 ↵
u1 (e0 !
1
e5 ) = 10
Given the utility function u1 in the question, we have two transition func-
↵0 ↵1
tions defined as ⌧ (e0 !) = {e1 , e2 , e3 }, and ⌧ (e0 !) = {e4 , e5 , e6 }. The
probabilities of the various runs (two for the first agent and three for the sec-
ond) is given in the question, along with the probability of each run occurring.
Given the definition of the utility function u1 , the expected utilities of agents
Ag0 and Ag1 in environment Env can be calculated using:
X
EU (Ag, Env) = u(r)P (r|Ag, Env).
r2R(Ag,Env)
This is equivalent to calculating the sum of the product of each utility for a run
ending in some state with the probability of performing that run; i.e.
Example 2 as follows:
0
P (e0 !
↵
e1 | Ag1 , Env1 ) = 0.5
0↵
P (e0 ! e2 | Ag1 , Env1 ) = 0.5
1↵
Consider the environment Env1 = hE, e0 , ⌧ i P (e1 ! e3 | Ag1 , Env1 ) = 1.0
defined as follows: 0
P (e0 !
↵
e1 | Ag2 , Env1 ) = 0.1
↵
E = {e0 , e1 , e2 , e3 , e4 , e5 } 0
P (e0 ! e2 | Ag2 , Env1 ) = 0.9
↵ 2↵
0
⌧ (e0 !) = {e1 , e2 } P (e2 ! e4 | Ag2 , Env1 ) = 0.4
2↵
1↵ P (e2 ! e5 | Ag2 , Env1 ) = 0.6
⌧ (e1 !) = {e3 }
↵
Assume the utility function u1 is defined
2
⌧ (e2 !) = {e4 , e5 } as follows:
↵
0
There are two agents, Ag1 and Ag2 , with respect u1 (e0 ! e1 ) = 4
to this environment: ↵
0
u1 (e0 ! e2 ) = 3
↵
1
Ag1 (e0 ) = ↵0 Ag2 (e0 ) = ↵0 u1 (e1 ! e3 ) = 7
Ag1 (e1 ) = ↵1 Ag2 (e2 ) = ↵2 ↵
2
u1 (e2 ! e4 ) = 3
↵
2
u1 (e2 ! e5 ) = 2
Agent 1
=0.5p(e1⟶ e3)=1.0
e 1) e1 e3
e 0⟶
p ( .1
0
ep(0e =
e 1) e1
0⟶
e 0⟶
e2 ) (
=0e2
p
ep0(e
.5 0⟶ =0.4
e2 ) e 4) e4
=0 e 2⟶
p.9(
ep(e2
2⟶
e5 ) Agent 2
=0e5
.6
Example 2 solution
0.1 1e
Agent 1 p =
p=0.9⨉0.4=0.36
0.5p(e1⟶ e3)=1.0 pe e4
=
e 1) e1 e3 =00
.9⨉
e 0⟶ 0.6
p (
0 . 1 =0 e5
ep(0e =
e 1) e1 .54
0⟶
e 0⟶
e2 ) (
=0e2
p
ep0(e
.5
0 .5 0⟶ =0.4
=
.0 e3 e2 ) e 4) e4
⨉ 1 =0 e 2⟶
=0.5 p.9(
p
e0 ep(e2
p= 2⟶
0.5 e5 ) Agent 2
e2 =0e5
.6
Example 2 solution
u= 0.1 e1
4
Agent41 u(e1⟶ e3)=7 p=
= .5 p=0.9⨉0.4=0.36
e 1) )=0 p(e1⟶ e3)=1.0 pe=00 e
u=3+3=6 4
⟶ e 1 e1 e3 .9⨉
e 0
u( (e 0⟶ 4 0.6
u= =0 e5
p )= .1
e =0
ep(0e ⟶ e
1
1) e1 3+ .54
u( 0 ⟶ u(e 0⟶ 2=
0
e0 ⟶ 5
e2 ) p(e
e2 ) =0e 2 ep0 =3 .4
=3 5. 1 5 u( (e0 ⟶ )
e )=0
=1 = 0.
4
e0 ⟶
e2 ) (e 2⟶ e e4
7
4+ 1.0 e3
4
= e2 ) =0u e 2⟶
Find sum up=0.5 ⨉ =3 p.9(
ep 2
of utilities e0p= u( (e2
e2 ⟶⟶
for each u= 0.5 e
e5 ) 5 )= e5
Agent 2
3 e2 =2 0.6
run
Example 2 solution
: R ! {0, 1}
Task Environments
• A task environment is a pair <Env, Ψ>, where Env is an
environment, and the task specification Ψ is defined by:
: R ! {0, 1}
We could also write this as: A more optimistic idea of success is:
8r 2 R(Ag, Env), we have (r) = 1 9r 2 R(Ag, Env), we have (r) = 1
X
P( | Ag, Env) = P (r | Ag, Env)
r2R (Ag,Env)
Achievement and Maintenance Tasks
!101
Rationality
The agents rationality is given by the choice of actions based on expected utility
of the outcome of the action. The rational agent selects an action a that
provides the maximal expected outcome:
!103