27.01.2014 Views

Multiagent Systems

Multiagent Systems

Multiagent Systems

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 1/731<br />

<strong>Multiagent</strong> <strong>Systems</strong><br />

Prof. Dr. Jürgen Dix<br />

Department of Informatics<br />

Clausthal University of Technology<br />

WS 06/07


Time and place: Monday and Tuesday 10–12 in<br />

R 210 (Am Regenbogen)<br />

Exercises: Every other Tuesday (approx.).<br />

Website<br />

http://cig.in.tu-clausthal.de/<br />

Visit regularly!<br />

There you will find important information about<br />

the lecture, documents, exercises et cetera.<br />

Organization: Lecture: Prof. Dix,<br />

Exercise: Dr. Jamroga<br />

Exam: Oral exams on demand.<br />

rof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 2/731


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 3/731<br />

About this lecture<br />

This course is based, among other papers listed in the<br />

following chapters, mainly on the following books and<br />

articles. I am very much indebted to Yoav Shoham (for<br />

providing me with a draft of his forthcoming book), to<br />

Mike Wooldridge (for providing me with many of the<br />

figures and graphs of his two books), to Viviana Mascardi<br />

(for providing me with the tex sources of her nice article<br />

and the slides of a course), to Michael Fisher (for allowing<br />

me to make use of parts his forthcoming book on<br />

temporal logics) and to Tuomas Sandholm (for allowing<br />

me to use some of his graphs and experimental results<br />

wrt. multiagent TSP’s and contract nets).<br />

Thanks to Tristan Behrens who helped to translate my<br />

slides into beamer tex (and made many improvements).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 4/731<br />

Literatur I<br />

[Bordini et al. 2005] Bordini, R., Dastani, M., Dix, J., and<br />

El Fallah Segrouchni, A. (2005).<br />

Programming Multi Agent <strong>Systems</strong>: Languages,<br />

Platforms and Applications.<br />

Springer.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 5/731<br />

Literatur II<br />

[Mascardi et al. 2004] Mascardi, V., M. Martelli, and<br />

L. Sterling (2004).<br />

Logic-based specification languages for intelligent<br />

software agents.<br />

Theory and Practice of Logic Programming 4(4),<br />

429–494.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 6/731<br />

Literatur III<br />

[Shoham and Leyton-Brown 2007] Shoham, Y. and<br />

K. Leyton-Brown (2007).<br />

Multi Agent <strong>Systems</strong>.<br />

MIT Press.<br />

[Subrahmanian et al. 2000] Subrahmanian, V., P. Bonatti,<br />

J. Dix, T. Eiter, S. Kraus, F. Özcan, and R. Ross (2000).<br />

Heterogenous Active Agents.<br />

MIT-Press.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 7/731<br />

Literatur IV<br />

[Weiss 1999] Weiss, G. (Ed.) (1999).<br />

Multi-Agent <strong>Systems</strong>.<br />

MIT-Press.<br />

[Wooldridge 2000] Wooldridge, M. (2000).<br />

Reasoning about Rational Agents.<br />

MIT Press.<br />

[Wooldridge 2002] Wooldridge, M. (2002).<br />

An Introduction to MultiAgent <strong>Systems</strong>.<br />

John Wiley & Sons.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 8/731<br />

1. Introduction<br />

Chapter 1. Introduction<br />

Introduction<br />

1.1 Motivation<br />

1.2 Intelligent Agents<br />

1.3 Formal Description<br />

1.4 References


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 9/731<br />

1. Introduction<br />

We are setting the stage for a precise discussion<br />

of agency. From informal concepts to (more or<br />

less) mathematical definitions.<br />

1 MAS versus Distributed AI,<br />

2 Environment of agents,<br />

3 Agents and other frameworks,<br />

4 Runs as characteristic behaviour,<br />

5 state-based versus standard agents.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 10/731<br />

1. Introduction 1. Motivation<br />

1.1 Motivation


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 11/731<br />

1. Introduction 1. Motivation<br />

Three Important Questions<br />

(Q1) What is a (software) agent?<br />

⇒ [Franklin and Graesser1997,<br />

Wooldridge and Jennings1995] (and<br />

references therein)<br />

(Q2) If some program P is not an agent,<br />

how can it be transformed into an<br />

agent?<br />

(Q3) If (Q1) is clear, what kind of Software<br />

Infrastructure is needed for the<br />

interaction of agents? What services<br />

are necessary?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 12/731<br />

1. Introduction 1. Motivation<br />

Definition 1.1 (Distributed Artificial Intelligence (DAI))<br />

The area investigating systems, where several<br />

autonomous acting entities work together to<br />

reach a given goal.<br />

The entities are called Agents, the area<br />

<strong>Multiagent</strong> <strong>Systems</strong>.<br />

AAMAS: several conferences joined in 2002 to<br />

form the main annual event. Bologna (2002),<br />

Melbourne (2003), New York (2004), Utrecht<br />

(2005), Hakodate (2006), Hawaii (2007):<br />

http://www.fun.ac.jp/aamas2006/main.html


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 13/731<br />

1. Introduction 1. Motivation<br />

Example 1.2 (RoboCup)<br />

2d Simulation, 3d simulation, small size, mid size, four<br />

legged, humanoid and rescue league.<br />

Example 1.3 (Grand Challenge)<br />

Grand Challenge: organised by DARPA (8th October).<br />

Stanley (VW Touareg coached by Stanford University<br />

(Sebastian Thrun) won in 2005.<br />

Example 1.4 (CLIMA Contest)<br />

A simple grid where agents are supposed to collect gold.<br />

Different roles of agents: scouts, collectors.<br />

http://clima.deis.unibo.it/contest.html<br />

http://cig.in.tu-clausthal.de/index.php\relax?<br />

id=clima7contest


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 14/731<br />

1. Introduction 1. Motivation<br />

Why do we need them?<br />

Information systems are distributed, open,<br />

heterogenous.<br />

We therefore need intelligent, interactive<br />

agents, that act autonomously.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 15/731<br />

1. Introduction 1. Motivation<br />

(Software) Agent: Programs that are implemented on a<br />

platform and have “sensors” and “effectors” to<br />

read from and make changes to the<br />

environment, respectively.<br />

Intelligent: Performance measures, to evaluate the<br />

success. Rational vs. omniscient, decision<br />

making<br />

Interactive: with other agents (software or humans) by<br />

observing the environment.<br />

Coordination: Cooperation vs. Competition


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 16/731<br />

1. Introduction 1. Motivation<br />

MAS versus Classical DAI<br />

MAS: Several Agents coordinate their<br />

knowledge and actions (semantics<br />

describes this).<br />

DAI: Particular problem is divided into<br />

smaller problems (nodes). These<br />

nodes have common knowledge. The<br />

solution method is given.<br />

Attention:<br />

Today DAI is often used synonymous with MAS.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 17/731<br />

1. Introduction 1. Motivation<br />

AI<br />

Agent<br />

Intelligence:<br />

Property of a<br />

single Agent<br />

Cognitive Processes<br />

of a single Agent<br />

DAI<br />

Multiple Agents<br />

Intelligence:<br />

Property of<br />

several Agents<br />

Social Processes<br />

of several Agents


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 18/731<br />

1. Introduction 1. Motivation<br />

10 Desiderata<br />

1. Agents are for everyone! We need a method<br />

to agentise given programs.<br />

2. Take into account that data is stored in a wide<br />

variety of data structures, and data is<br />

manipulated by an existing corpus of<br />

algorithms.<br />

3. A theory of agents must not depend upon<br />

the set of actions that the agent performs.<br />

Rather, the set of actions that the agent<br />

performs must be a parameter that is taken<br />

into account in the semantics.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 19/731<br />

1. Introduction 1. Motivation<br />

10 Desiderata<br />

4. Every (software) agent should execute<br />

actions based on some clearly articulated<br />

decision policy. A declarative framework for<br />

articulating decision policies of agents is<br />

imperative.<br />

5. Any agent construction framework must<br />

allow agents to reason:<br />

Reasoning about its beliefs about other agents.<br />

Reasoning about uncertainty in its beliefs about the world and<br />

about its beliefs about other agents.<br />

Reasoning about time.<br />

These capabilities should be viewed as<br />

extensions to a core agent action language.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 20/731<br />

1. Introduction 1. Motivation<br />

10 Desiderata<br />

6. Any infrastructure to support multiagent<br />

interactions must provide security.<br />

7. While the efficiency of the code underlying a<br />

software agent cannot be guaranteed (as it<br />

will vary from one application to another),<br />

guarantees are needed that provide<br />

information on the performance of an agent<br />

relative to an oracle that supports calls to<br />

underlying software code.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 21/731<br />

1. Introduction 1. Motivation<br />

10 Desiderata<br />

8. We must identify efficiently computable<br />

fragments of the general hierarchy of<br />

languages alluded to above, and our<br />

implementations must take advantage of the<br />

specific structure of such language<br />

fragments.<br />

9. A critical point is reliability—there is no point<br />

in a highly efficient implementation, if all<br />

agents deployed in the implementation come<br />

to a grinding halt when the agent<br />

“infrastructure” crashes.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 22/731<br />

1. Introduction 1. Motivation<br />

10 Desiderata<br />

10. The only way of testing the applicability of<br />

any theory is to build a software system<br />

based on the theory, to deploy a set of<br />

applications based on the theory, and to<br />

report on experiments based on those<br />

applications.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 23/731<br />

1. Introduction 2. Intelligent Agents<br />

1.2 Intelligent Agents


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 24/731<br />

1. Introduction 2. Intelligent Agents<br />

Definition 1.5 (Agent)<br />

An agent is a computer system that acts in its<br />

environment and executes autonomous actions<br />

to reach certain goals.<br />

Learning, Intelligence. Environment is<br />

non-deterministic.<br />

sensors<br />

environment<br />

percepts<br />

actions<br />

?<br />

agent<br />

effectors


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 25/731<br />

1. Introduction 2. Intelligent Agents<br />

Definition 1.6 (Rational, Omniscient Agent)<br />

Rational agents are those, that always do the<br />

right thing.<br />

(A performance measure is needed.)<br />

Omniscient agents are those, that know the<br />

results of their actions in advance.<br />

Rational agents are in general not omniscient!


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 26/731<br />

1. Introduction 2. Intelligent Agents<br />

Question<br />

How is the right thing defined and what does it<br />

depend on?<br />

1 Performance measure (as objective as<br />

possible)<br />

2 Percept sequence: what has been observed<br />

3 Knowledge of the agent about the<br />

environment<br />

4 How the agent can act.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 27/731<br />

1. Introduction 2. Intelligent Agents<br />

Definition 1.7 (Ideal Rational Agent)<br />

An ideal rational agent chooses for each percept<br />

sequence exactly the action which maximises its<br />

performance measure (given knowledge about<br />

the environment).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 28/731<br />

1. Introduction 2. Intelligent Agents<br />

Agents can be described mathematically by a<br />

function<br />

set of percept sequences ↦→ set of actions.<br />

The internal structure of an agent can be<br />

described as<br />

Agent = Architecture + Program


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 29/731<br />

1. Introduction 2. Intelligent Agents<br />

Agents and their PAGE description:<br />

Agent Type Percepts Actions Goals Environment<br />

Medical diagnosis<br />

system<br />

Symptoms,<br />

findings, patient’s<br />

answers<br />

Questions, tests,<br />

treatments<br />

Healthy patient,<br />

minimize costs<br />

Patient, hospital<br />

Satellite image<br />

analysis system<br />

Pixels of varying<br />

intensity, color<br />

Print a<br />

categorization of<br />

scene<br />

Correct<br />

categorization<br />

Images from<br />

orbiting satellite<br />

Part-picking robot<br />

Pixels of varying<br />

intensity<br />

Pick up parts and<br />

sort into bins<br />

Place parts in<br />

correct bins<br />

Conveyor belt<br />

with parts<br />

Refinery controller<br />

Temperature,<br />

pressure readings<br />

Open, close<br />

valves; adjust<br />

temperature<br />

Maximize purity,<br />

yield, safety<br />

Refinery<br />

Interactive English<br />

tutor<br />

Typed words<br />

Print exercises,<br />

suggestions,<br />

corrections<br />

Maximize<br />

student’s score on<br />

test<br />

Set of students


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 30/731<br />

1. Introduction 2. Intelligent Agents<br />

Question:<br />

How do environment properties influence agent design?<br />

Definition 1.8 (Properties of the Environment)<br />

Accessible/Inaccessible: If not completely accessible, one needs<br />

internal states.<br />

Deterministic/Indeterministic: An inaccessible environment might<br />

seem indeterministic, even if it is not.<br />

Episodic/Nonepisodic: Percept-Action-Sequences are independent<br />

from each other. Closed episodes.<br />

Static/Dynamic: While the agent is thinking, the world is the<br />

same/changing. Semi-dynamic: The world does not<br />

change, but the performance measure.<br />

Discrete/Continous: Density of observations and actions. Relevant:<br />

Level of granularity.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 31/731<br />

1. Introduction 2. Intelligent Agents<br />

Environment Accessible Deterministic Episodic Static Discrete<br />

Chess with a clock Yes Yes No Semi Yes<br />

Chess without a clock Yes Yes No Yes Yes<br />

Poker No No No Yes Yes<br />

Backgammon Yes No No Yes Yes<br />

Taxi driving No No No No No<br />

Medical diagnosis system No No No No No<br />

Image-analysis system Yes Yes Yes Semi No<br />

Part-picking robot No No Yes No No<br />

Refinery controller No No No No No<br />

Interactive English tutor No No No No Yes


1. Introduction 2. Intelligent Agents<br />

xbiff,software demons are agents (not intelligent).<br />

Definition 1.9 (Intelligent Agent)<br />

An intelligent agent is an agent with the following<br />

properties:<br />

1 Autonomous: Operates without direct intervention of<br />

others, has some kind of control over its actions and<br />

internal state.<br />

2 Reactive: Reaction to changes in the environment at<br />

certain times to reach its goals.<br />

3 Pro-active: Taking the initiative, being goal-directed.<br />

4 Social: Interaction with others to reach the goals.<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 32/731


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 33/731<br />

1. Introduction 2. Intelligent Agents<br />

Pro-active alone is not sufficient (C-Programs):<br />

the environment can change during execution.<br />

Socialisation: coordination, communication,<br />

(negotiation) skills.<br />

Difficulty: right balance between pro-active<br />

and reactive!


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 34/731<br />

1. Introduction 2. Intelligent Agents<br />

Agents vs. Object Orientation<br />

Objects have<br />

1 a state (encapsulated): control over internal<br />

state<br />

2 message passing capabilities<br />

Java: private and public methods.<br />

Objects have control over their state, but not<br />

over their behaviour.<br />

An object can not prevent others to use its<br />

public methods.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 35/731<br />

1. Introduction 2. Intelligent Agents<br />

Agents call other agents and request them to<br />

execute actions.<br />

Objects do it for free, agents do it for<br />

money.<br />

No analoga to reactive, pro-active, social in<br />

OO.<br />

MAS are multi-threaded: each agent has a<br />

control thread. (In OO only the system as a<br />

whole possesses one.)


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 36/731<br />

1. Introduction 2. Intelligent Agents<br />

Agents vs. Expert <strong>Systems</strong><br />

Expert <strong>Systems</strong>: Buzzword in the 80ies,<br />

problem solving in knowledge-rich domains:<br />

MYCIN.<br />

More an assistant, than a stand-alone system.<br />

Only interaction with the user: disembodied.<br />

No cooperation with others.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 37/731<br />

1. Introduction 2. Intelligent Agents<br />

Agents as Intentional <strong>Systems</strong><br />

Intentions: Agents are endowed with mental<br />

states.<br />

Matthias took his umbrella because he believed<br />

it was going to rain.<br />

Kjeld attended the MAS course because he<br />

wanted to learn about agents.<br />

An intentional system describes entities whose<br />

behaviour can be predicted by the method of<br />

attributing beliefs, desires and rational acumen.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 38/731<br />

1. Introduction 2. Intelligent Agents<br />

1st order Int. Syst.: beliefs and desires, but no<br />

beliefs and desires about beliefs, desires (no<br />

nesting).<br />

intention vs. intension: Databases:<br />

extensional/intensional predicates.<br />

Can any automaton be described as an<br />

agent?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 39/731<br />

1. Introduction 3. Formal Description<br />

1.3 Formal Description


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 40/731<br />

1. Introduction 3. Formal Description<br />

A first mathematical description<br />

At first, we want to keep everything as simple as<br />

possible.<br />

Agents and environments<br />

An agent is situated in an environment and can<br />

perform actions<br />

A := {a 1 , . . . , a n }<br />

(set of actions)<br />

and change the state of the environment<br />

S := {s 1 , s 2 , . . . , s n }<br />

(set of states).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 41/731<br />

1. Introduction 3. Formal Description<br />

How does the environment (the state s) develop when an<br />

action a is executed?<br />

We describe this with a function<br />

env : S × A −→ 2 S .<br />

This includes non-deterministic environments.


1. Introduction 3. Formal Description<br />

How do we describe agents?<br />

We could take a function action : S −→ A.<br />

Agent<br />

Sensors<br />

Condition−action rules<br />

What the world<br />

is like now<br />

What action I<br />

should do now<br />

Environment<br />

Effectors<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 42/731


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 43/731<br />

1. Introduction 3. Formal Description<br />

Question:<br />

How can we describe an agent, now?<br />

Definition 1.10 (Purely Reactive Agent)<br />

An agent is called purely reactive, if its function<br />

is given by<br />

action : S −→ A.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 44/731<br />

1. Introduction 3. Formal Description<br />

This is too weak!<br />

Take the whole history (of the environment)<br />

into account: s 0 → a0 s 1 → a1 . . . s n → an . . ..<br />

The same should be done for env!


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 45/731<br />

1. Introduction 3. Formal Description<br />

This leads to agents that take the whole<br />

sequence of states into account, i.e.<br />

action : S ∗ −→ A.<br />

We also want to consider the actions performed<br />

by an agent. This requires the notion of a run<br />

(next slide).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 46/731<br />

1. Introduction 3. Formal Description<br />

We define the run of an agent in an environment<br />

as a sequence of interleaved states and actions:<br />

Definition 1.11 (Run r, R = R act ∪ R state )<br />

A run r over A and S is a finite sequence<br />

r : s 0 → a0 s 1 → a1 . . . s n → an . . .<br />

Such a sequence may end with a state s n or with<br />

an action a n : we denote by R act the set of runs<br />

ending with an action and by R state the set of<br />

runs ending with a state.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 47/731<br />

1. Introduction 3. Formal Description<br />

Definition 1.12 (Environment, 2. version)<br />

An environment Env is a triple 〈S, s 0 , τ〉<br />

consisting of<br />

1 the set S of states,<br />

2 the inital state s 0 ∈ S,<br />

3 a function τ : R act −→ 2 S , which describes<br />

how the environment changes when an<br />

action is performed (given the whole history).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 48/731<br />

1. Introduction 3. Formal Description<br />

Definition 1.13 (Agent a)<br />

An agent a is determined by a function<br />

action : R state −→ A,<br />

describing which action the agent performs,<br />

given its current history.<br />

Important:<br />

An agent system is then a pair a = 〈action, Env〉<br />

consisting of an agent and an environment.<br />

We denote by R(a, Env) the set of runs of agent<br />

a in environment Env.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 49/731<br />

1. Introduction 3. Formal Description<br />

Definition 1.14 (Characteristic Behaviour)<br />

The characteristic behaviour of an agent a in<br />

an environment Env is the set R of all possible<br />

runs r : s 0 → a0 s 1 → a1 . . . s n → an . . . with:<br />

1 for all n: a n = action(〈s 0 , a 0 . . . , a n−1 , s n 〉),<br />

2 for all n > 0:<br />

s n ∈ τ(s 0 , a 0 , s 1 , a 1 , . . . , s n−1 , a n−1 ).<br />

For deterministic τ, the relation “∈” can be<br />

replaced by “=”.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 50/731<br />

1. Introduction 3. Formal Description<br />

Important:<br />

The formalization of the characteristic behaviour<br />

is dependent of the concrete agent type. Later<br />

we will introduce further behaviours (and<br />

corresponding agent designs).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 51/731<br />

1. Introduction 3. Formal Description<br />

Equivalence<br />

Two agents a, b are called behaviourally<br />

equivalent wrt. environment Env, if<br />

R(a, Env) = R(b, Env).<br />

Two agents a, b are called behaviourally<br />

equivalent, if they are behaviourally equivalent<br />

wrt. all possible environments Env.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 52/731<br />

1. Introduction 3. Formal Description<br />

So far so good, but...<br />

What is the problem with all these agents and<br />

this framework in general?<br />

Problem<br />

All agents have perfect information about the<br />

environment!<br />

(Of course, it can also be seen as feature!)


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 53/731<br />

1. Introduction 3. Formal Description<br />

We need more realistic agents!<br />

Note<br />

In general, agents do not have complete<br />

information about the environment!<br />

We extend our framework by perceptions of an<br />

agent.<br />

Definition 1.15 (Actions A, Percepts P, States S)<br />

A := {a 1 , a 2 , . . . , a n } is the set of actions.<br />

P := {p 1 , p 2 , . . . , p m } is the set of percepts.<br />

S := {s 1 , s 2 , . . . , s l } is the set of states


1. Introduction 3. Formal Description<br />

Sensors don’t need to provide perfect<br />

information!<br />

Agent<br />

Sensors<br />

Condition−action rules<br />

What the world<br />

is like now<br />

What action I<br />

should do now<br />

Environment<br />

Effectors<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 54/731


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 55/731<br />

1. Introduction 3. Formal Description<br />

Question:<br />

How can agent programs be designed?<br />

There are four types of agent programs:<br />

Simple reflex agents<br />

Agents that keep track of the world<br />

Goal-based agents<br />

Utility-based agents


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 56/731<br />

1. Introduction 3. Formal Description<br />

A first realistic agent<br />

We consider a purely reactive agent and just<br />

replace states by perceptions.<br />

Definition 1.16 (Simple Reflex Agent)<br />

An agent is called simple reflex agent, if its<br />

function is given by<br />

action : P −→ A.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 57/731<br />

1. Introduction 3. Formal Description<br />

function SIMPLE-REFLEX-AGENT( percept) returns action<br />

static: rules, a set of condition-action rules<br />

state INTERPRET-INPUT( percept)<br />

rule RULE-MATCH(state, rules)<br />

action RULE-ACTION[rule]<br />

return action<br />

function REFLEX-AGENT-WITH-STATE( percept) returns action<br />

static: state, a description of the current world state<br />

rules, a set of condition-action rules<br />

state UPDATE-STATE(state, percept)<br />

rule RULE-MATCH(state, rules)<br />

action RULE-ACTION[rule]<br />

state UPDATE-STATE(state, action)<br />

return action


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 58/731<br />

1. Introduction 3. Formal Description<br />

As before, let us now consider sequences of<br />

percepts:<br />

Definition 1.17 (Standard Agent a)<br />

A standard agent a is given by a function<br />

action : P ∗ −→ A<br />

together with<br />

see : S −→ P.<br />

An agent is thus a pair 〈see, action〉.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 59/731<br />

1. Introduction 3. Formal Description<br />

Definition 1.18 (Indistinguishable)<br />

Two different states s, s ′ are indistinguishable for<br />

an agent a, if see(s) = see(s ′ ).<br />

The relation “indistinguishable” on S × S is an<br />

equivalence relation.<br />

What does | ∼ | = |S| mean?<br />

And what | ∼ | = 1?<br />

As mentioned before, the characteristic behavior<br />

has to match with the agent design!


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 60/731<br />

1. Introduction 3. Formal Description<br />

Definition 1.19 (Characteristic Behaviour)<br />

The characteristic behaviour of a standard agent<br />

〈see, action〉 in an environment Env is the set of all finite<br />

sequences<br />

where<br />

p 0 → a0 p 1 → a1 . . . p n → an . . .<br />

p 0 = see(s 0 ),<br />

a i = action(〈p 0 , . . . , p i 〉),<br />

p i = see(s i ), where s i ∈ τ(s 0 , a 0 , s 1 , a 1 , . . . , s i−1 , a i−1 ).<br />

Such a sequence, even if deterministic from the agent’s<br />

viewpoint, may cover different environmental behaviours<br />

(runs):<br />

s 0 → a0 s 1 → a1 . . . s n → an . . .


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 61/731<br />

1. Introduction 3. Formal Description<br />

Instead of using the whole history, resp. P ∗ , one<br />

can also use internal states I := {i 1 , i 2 , . . . i n }.<br />

Definition 1.20 (State-based Agent a state )<br />

A state-based agent a state is given by a function<br />

action : I −→ A together with<br />

see : S −→ P,<br />

and next : I × P −→ I.<br />

Here next(i, p) is the successor state of i if p is<br />

observed.


1. Introduction 3. Formal Description<br />

State<br />

Sensors<br />

How the world evolves<br />

What my actions do<br />

Condition−action rules<br />

What the world<br />

is like now<br />

What action I<br />

should do now<br />

Environment<br />

Agent<br />

Effectors<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 62/731


1. Introduction 3. Formal Description<br />

Definition 1.21 (Characteristic Behaviour)<br />

The characteristic behaviour of a state-based agent<br />

a state in an environment Env is the set of all finite<br />

sequences<br />

with<br />

(i 0 , p 0 ) → a0 (i 1 , p 1 ) → a1 . . . → an (i n , p n ), . . .<br />

1 for all n: a n = action(i n ),<br />

2 for all n: next(i n , p n ) = i n+1 ,<br />

Sequence covers the runs r : s 0 → a0 s 1 → a1 . . . where<br />

a j = action(i j ),<br />

s j ∈ τ(s 0 , a 0 , s 1 , a 1 , . . . , s j−1 , a j−1 ),<br />

p j = see(s j )<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 63/731


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 64/731<br />

1. Introduction 3. Formal Description<br />

Are state-based agents more expressive than<br />

standard agents? How to measure?<br />

Definition 1.22 (Environmental behavior of a state )<br />

The environmental behaviour of an agent a state<br />

is the set of possible runs covered by<br />

characteristic behaviour of the agent.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 65/731<br />

1. Introduction 3. Formal Description<br />

Theorem 1.23 (Equivalence)<br />

Standard agents and state-based agents are<br />

equivalent with respect to their environmental<br />

behaviour.<br />

More precisely: For each state-based agent a state<br />

and next storage function there exists a standard<br />

agent a which has the same environmental<br />

behaviour, and vice versa.


1. Introduction 3. Formal Description<br />

Goal based agents<br />

State<br />

Sensors<br />

How the world evolves<br />

What my actions do<br />

Goals<br />

What the world<br />

is like now<br />

What it will be like<br />

if I do action A<br />

What action I<br />

should do now<br />

Environment<br />

Agent<br />

Effectors<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 66/731


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 67/731<br />

1. Introduction 3. Formal Description<br />

Intention:<br />

We want to tell our agent what to do, without<br />

telling it how to do it!<br />

We need a utility measure.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 68/731<br />

1. Introduction 3. Formal Description<br />

How can we define a utility function?<br />

Take for example<br />

u : S ↦→ R<br />

Question:<br />

What is the problem with this definition?<br />

Better idea:<br />

u : R ↦→ R<br />

Take the set of runs R and not the set of states S.<br />

Food for thought: How to calculate the utility if<br />

the agent has incomplete information?


1. Introduction 3. Formal Description<br />

Agents with a utility measure<br />

State<br />

How the world evolves<br />

What my actions do<br />

Utility<br />

Sensors<br />

What the world<br />

is like now<br />

What it will be like<br />

if I do action A<br />

How happy I will be<br />

in such a state<br />

What action I<br />

should do now<br />

Environment<br />

Agent<br />

Effectors<br />

The utility measure can often be simulated<br />

through a set of goals.<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 69/731


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 70/731<br />

1. Introduction 3. Formal Description<br />

Example: Tileworld<br />

H<br />

H<br />

T T T<br />

T T T<br />

(a) (b) (c)<br />

H


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 71/731<br />

1. Introduction 3. Formal Description<br />

How can we define an optimal agent?<br />

Runs occur with some probability. So we have a<br />

probability distribution and can try to maximize<br />

the expectation:<br />

arg max a∈Agents<br />

∑<br />

r∈R(a,Env<br />

Env)<br />

Maximize expected utility.<br />

u(r) Prob(r | 〈a,Env<br />

Env〉)<br />

But how to implement it (if at all possible)?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 72/731<br />

1. Introduction 3. Formal Description<br />

We can restrict the set of agents, taking<br />

resources into account.<br />

Performance measures or utilities are often<br />

difficult to come up with.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 73/731<br />

1. Introduction 3. Formal Description<br />

The framework of Achievement/Maintenance<br />

Tasks.<br />

Achievement Task: Achieve state of affairs φ.<br />

Set of goal states. Blocksworld. Goal<br />

described by predicates φ: states<br />

satisfying φ.<br />

Maintenance Task: Maintain state of affairs ψ.<br />

Avoid certain bad states. A file<br />

should never be open for both reading<br />

and writing: failure states are specified.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 74/731<br />

1. Introduction 3. Formal Description<br />

Definition 1.24 (Task environments)<br />

A task environment is a pair 〈Env<br />

Env, Ψ〉) where<br />

Ψ : R(a,Env<br />

Env) −→ {0, 1} is a predicate over runs.<br />

Let<br />

R Ψ (a,Env<br />

Env) = {r ∈ R(a,Env<br />

Env)| Ψ(r)}.<br />

An agent a succeeds in 〈Env<br />

Env, Ψ〉), if<br />

R Ψ (a,Env<br />

Env) = R(a,Env<br />

Env).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 75/731<br />

1. Introduction 3. Formal Description<br />

An achievement task is given be a task<br />

environment 〈Env<br />

Env, Ψ〉), if there is some G ⊆ S<br />

such that<br />

for all r ∈ R(a,Env<br />

Env) : Ψ(r) iff ∃ s ∈ G : s ∈ r.<br />

A maintenance task is given be a task<br />

environment 〈Env<br />

Env, Ψ〉), if there is some B ⊆ S<br />

such that<br />

for all r ∈ R(a,Env<br />

Env) : Ψ(r) iff ∀ s ∈ B : s ∉ r.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 76/731<br />

1. Introduction 3. Formal Description<br />

procedure RUN-ENVIRONMENT(state, UPDATE-FN, agents, termination)<br />

inputs: state, the initial state of the environment<br />

UPDATE-FN, function to modify the environment<br />

agents, a set of agents<br />

termination, a predicate to test when we are done<br />

repeat<br />

for each agent in agents do<br />

PERCEPT[agent] GET-PERCEPT(agent, state)<br />

end<br />

for each agent in agents do<br />

ACTION[agent] PROGRAM[agent](PERCEPT[agent])<br />

end<br />

state UPDATE-FN(actions, agents, state)<br />

until termination(state)


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 77/731<br />

1. Introduction 3. Formal Description<br />

function RUN-EVAL-ENVIRONMENT(state, UPDATE-FN, agents,<br />

termination, PERFORMANCE-FN) returns scores<br />

local variables: scores, a vector the same size as agents, all 0<br />

repeat<br />

for each agent in agents do<br />

PERCEPT[agent] GET-PERCEPT(agent, state)<br />

end<br />

for each agent in agents do<br />

ACTION[agent] PROGRAM[agent](PERCEPT[agent])<br />

end<br />

state UPDATE-FN(actions, agents, state)<br />

scores PERFORMANCE-FN(scores, agents, state)<br />

until termination(state)<br />

return scores /* change */


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 78/731<br />

1. Introduction 3. Formal Description<br />

1 2<br />

3 4<br />

5 6<br />

7 8<br />

A<br />

B


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 79/731<br />

1. Introduction 4. References<br />

1.4 References


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 80/731<br />

1. Introduction 4. References<br />

[Bozzano et al.1999] Bozzano, M., G. Delzanno, M. Martelli,<br />

V. Mascardi, and F. Zini (1999).<br />

Multi-agent systems development as a software engineering<br />

enterprise.<br />

Springer LNCS 1551, 46–60.<br />

[Franklin and Graesser1997] Franklin, S. and A. Graesser (1997).<br />

Is it an Agent, or Just a Program?<br />

In J. P. Müller, M. Wooldridge, and N. R. Jennings (Eds.),<br />

Intelligent Agents III.<br />

Springer LNAI 1193.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 81/731<br />

1. Introduction 4. References<br />

[Iglesias et al.1999] Iglesias, C., M. Garrijo, and J. Gonzalez (1999).<br />

A survey of agent-oriented methodologies.<br />

In J. Müller, M. P. Singh, and A. S. Rao (Eds.), Proceedings of the<br />

5th International Workshop on Intelligent Agents V : Agent<br />

Theories, Architectures, and Languages (ATAL-98).<br />

Springer LNCS 1555, 317–330.<br />

[Russel and Norvig1995] Russel, S. and P. Norvig (1995).<br />

Artificial Intelligence — A Modern Approach.<br />

Prentice Hall.<br />

[Russell and Norvig2004] Russell, S. J. and P. Norvig (2004).<br />

Künstliche Intelligenz: Ein moderner Ansatz.<br />

Pearson.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 82/731<br />

1. Introduction 4. References<br />

[Subrahmanian et al.2000] Subrahmanian, V., P. Bonatti, J. Dix,<br />

T. Eiter, S. Kraus, F. Özcan, and R. Ross (2000).<br />

Heterogenous Active Agents.<br />

MIT Press.<br />

[Weiss1999] Weiss, G. (1999).<br />

Multi-Agent <strong>Systems</strong>.<br />

MIT Press.<br />

[Wooldridge2000] Wooldridge, M. (2000).<br />

Reasoning about Rational Agents.<br />

MIT Press.<br />

[Wooldridge2002] Wooldridge, M. (2002).<br />

An Introduction to MultiAgent <strong>Systems</strong>.<br />

John Wiley & Sons.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 83/731<br />

1. Introduction 4. References<br />

[Wooldridge and Jennings1995] Wooldridge, M. J. and N. R. Jennings<br />

(1995).<br />

Agent Theories, Architectures and Languages: A survey.<br />

In M. J. Wooldridge and N. R. Jennings (Eds.), Intelligent Agents.<br />

Springer, LNAI 890, 1–39.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 84/731<br />

2. Basic Architectures<br />

Chapter 2. Basic Architectures<br />

Basic Architectures<br />

2.1 Reactive Agents<br />

2.2 BDI-Architecture<br />

2.3 AOP<br />

2.4 Layered Architectures<br />

2.5 References


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 85/731<br />

2. Basic Architectures<br />

We are presenting, at an abstract level, the three<br />

main architectures:<br />

subsumption-,<br />

BDI/Agent oriented programming-,<br />

layered<br />

architectures. In the next chapter, we come<br />

back to the BDI approach and consider it in<br />

greater detail using a logic-based framework.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 86/731<br />

2. Basic Architectures 1. Reactive Agents<br />

2.1 Reactive Agents


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 87/731<br />

2. Basic Architectures 1. Reactive Agents<br />

Idea:<br />

Intelligent behaviour is Interaction of the<br />

agents with their environment.<br />

It emerges through splitting in simpler<br />

interactions.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 88/731<br />

2. Basic Architectures 1. Reactive Agents<br />

Subsumption-Architectures:<br />

Decision making is realized through<br />

goal-directed behaviours: each behaviour<br />

is an individual action.<br />

nonsymbolic implementation.<br />

Many behaviours can be applied<br />

concurrently. How to select between them?<br />

Implementation through<br />

Subsumption-Hierarchies, Layers.<br />

Upper layers represent abstract behaviour.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 89/731<br />

2. Basic Architectures 1. Reactive Agents<br />

Formal Model:<br />

see: as up to now, but close relation between<br />

observation and action: no transformation of the<br />

input.<br />

action: Set of behaviours and inhibition relation.<br />

Beh := {〈c, a〉 : c ⊆ P, a ∈ A}.<br />

〈c, a〉 “fires” if<br />

see(s) ∈ c (c stands for “condition”).<br />

≺ ⊆ Ag rules × Ag rules<br />

is called inhibition-relation, Ag rules ⊆ Beh.<br />

We require ≺ to be a total ordering.<br />

b 1 ≺b 2 means: b 1 inhibits b 2 ,<br />

b 1 has priority over b 2 .


2. Basic Architectures 1. Reactive Agents<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 90/731


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 91/731<br />

2. Basic Architectures 1. Reactive Agents<br />

Example 2.1 (Exploring a Planet)<br />

A distant planet (asteroid) is assumed to contain<br />

gold. Samples should be brought to a spaceship<br />

landed on the planet. It is not known where the<br />

gold is. Several autonomous vehicles are<br />

available. Due to the topography of the planet<br />

there is no connection between the vehicles.<br />

The spaceship sends off radio signals: gradient<br />

field.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 92/731<br />

2. Basic Architectures 1. Reactive Agents<br />

Low Level Behaviour:<br />

(1) If detect an obstacle then change direction.<br />

2. Layer:<br />

(2) If Samples on board and at base then drop<br />

off.<br />

(3) If Samples on board and not at base then<br />

follow gradient field.<br />

3. Layer:<br />

(4) If Samples found then pick them up.<br />

4. Layer:<br />

(5) If true then take a random walk.<br />

With the following ordering<br />

(1) ≺ (2) ≺ (3) ≺ (4) ≺ (5).<br />

Under which asumptions (on the distribution of the gold)<br />

does this work perfectly?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 93/731<br />

2. Basic Architectures 1. Reactive Agents<br />

Vehicles can communicate indirectly with<br />

each other:<br />

they put off, and<br />

pick up<br />

radiactive samples that can be sensed.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 94/731<br />

2. Basic Architectures 1. Reactive Agents<br />

Low Level Behaviour:<br />

(1) If detect an obstacle then change direction.<br />

2. Layer:<br />

(2) If Samples on board and at base then drop<br />

off.<br />

(3) If Samples on board and not at base then<br />

drop off two radioactive crumbs and follow<br />

gradient field.<br />

3. Layer:<br />

(4) If Samples found then pick them up.<br />

(5) If radioactive crumbs found then take one<br />

and follow the gradient field (away from the<br />

spaceship).<br />

4. Layer:<br />

(6) If true then take a random walk.<br />

With the ordering (1) ≺ (2) ≺ (3) ≺ (4) ≺ (5) ≺ (6).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 95/731<br />

2. Basic Architectures 1. Reactive Agents<br />

Pro: Simple, economic, efficient, robust, elegant.<br />

Contra:<br />

Without knowledge about the<br />

environment agents need to know about<br />

the own local environment.<br />

Decisions only based on local information.<br />

How about bringing in learning?<br />

Relation between agents, environment and<br />

behaviours is not clear.<br />

Agents with ≤ 10 behaviours are doable.<br />

But the more layers the more complicated<br />

to understand what is going on.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 96/731<br />

2. Basic Architectures 2. BDI-Architecture<br />

2.2 BDI-Architecture


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 97/731<br />

2. Basic Architectures 2. BDI-Architecture<br />

Belief, Desire, Intention.


2. Basic Architectures 2. BDI-Architecture<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 98/731


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 99/731<br />

2. Basic Architectures 2. BDI-Architecture<br />

Three main questions:<br />

Deliberation: How to deliberate?<br />

Planning: Once committed to something, how<br />

to reach the goal?<br />

Replanning: What if during execution of the<br />

plan, things are running out of control<br />

and the original plan fails?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 100/731<br />

2. Basic Architectures 2. BDI-Architecture<br />

Belief 1:<br />

Belief 2:<br />

Desire 1:<br />

Desire 2 (Int.):<br />

Desire 3:<br />

New Belief:<br />

New Belief:<br />

Desire 4:<br />

Desire 5 (Int.):<br />

Desire 6 (Int.):<br />

Making money is important.<br />

I like computing.<br />

Graduate in Computer Science.<br />

Pass the Vordiplom.<br />

Graduate in time, marks are unimportant.<br />

Money is not so important after all.<br />

Working scientifically is fun.<br />

Pursue an academic career.<br />

Make sure to graduate with honours.<br />

Study abroad.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 101/731<br />

2. Basic Architectures 2. BDI-Architecture<br />

Intentions are the most important thing.<br />

Beliefs and intentions generate desires.<br />

Desires can be inconsistent with each other.<br />

Intentions are recomputed based on the<br />

current intentions, desires and beliefs.<br />

Intentions should persist, normally.<br />

Beliefs are constantly updated and thus<br />

generate new desires.<br />

From time to time intentions need to be<br />

re-examined.


2. Basic Architectures 2. BDI-Architecture<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 102/731


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 103/731<br />

2. Basic Architectures 2. BDI-Architecture<br />

Deliberation has been split into two<br />

components:<br />

1 Generate options (desires).<br />

2 Filter the right intentions.<br />

(B, D, I) where B ⊆ Bel, D ⊆ Des, I ⊆ Int<br />

I can be represented as a stack (priorities are<br />

available)


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 104/731<br />

2. Basic Architectures 2. BDI-Architecture<br />

An agent has commitments both to<br />

ends: the wishes to bring about,<br />

means: the mechanism to achieve a certain<br />

state of affairs.<br />

Means-end reasoning.<br />

What is wrong with our current control loop?<br />

It is overcommitted to both means and ends.<br />

No way to replan if something goes wrong.


2. Basic Architectures 2. BDI-Architecture<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 105/731


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 106/731<br />

2. Basic Architectures 2. BDI-Architecture<br />

goal/<br />

intention/<br />

task<br />

state of<br />

environment<br />

possible actions<br />

planner<br />

plan to achieve goal


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 107/731<br />

2. Basic Architectures 2. BDI-Architecture<br />

What is a plan, planning algorithm?<br />

Definition 2.2 (Plan)<br />

A plan π is a list of primitive actions. They lead,<br />

by applying them successively, from the initial<br />

state to the goal state.<br />

Still overcommitted to intentions!


2. Basic Architectures 2. BDI-Architecture<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 108/731


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 109/731<br />

2. Basic Architectures 2. BDI-Architecture<br />

Still limited in the way the agent can reconsider<br />

its intentions


2. Basic Architectures 2. BDI-Architecture<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 110/731


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 111/731<br />

2. Basic Architectures 2. BDI-Architecture<br />

But reconsidering intentions is costly.<br />

Pro-active vs. reactive<br />

Extreme: stubborn agents, unsure agents.<br />

What is better? Depends on the environment.<br />

Let γ the rate of world change.<br />

1 γ small: stubbornness pays off.<br />

2 γ big: unsureness pays off.<br />

What to do?<br />

Meta-level control


2. Basic Architectures 2. BDI-Architecture<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 112/731


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 113/731<br />

2. Basic Architectures 3. AOP<br />

2.3 AOP


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 114/731<br />

2. Basic Architectures 3. AOP<br />

Shoham suggests the following three<br />

components of an Agent Oriented<br />

Programming system:<br />

A formal language with clear syntax for<br />

describing the mental state.<br />

A programming language for defining<br />

agents.<br />

A method of transforming legacy code into<br />

an agent.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 115/731<br />

2. Basic Architectures 3. AOP<br />

We have defined an agent as a mapping from its<br />

beliefs and state of the world into actions.<br />

Shoham: an agent has commitments. One such<br />

commitment can be to perform an action.<br />

No need for action selection. But the<br />

language specification must have a<br />

mechanism for adopting commitments or<br />

not.<br />

All rules must be created at compile time:<br />

huge amount of possible scenarios.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 116/731<br />

2. Basic Architectures 3. AOP<br />

Beliefs: Sentences in a point-based temporal<br />

framework: turn(I, left) t<br />

(instantaneous actions).<br />

go_swimming(I, CLZ) t : I believe<br />

now that I am going to swim in CLZ at<br />

time t.<br />

ontable(block_a) t ,<br />

B now<br />

I ontable(block_b) t .<br />

B 3 aB 4 b is_friend(a, b).<br />

No distinction between actions and<br />

facts.<br />

B now<br />

I


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 117/731<br />

2. Basic Architectures 3. AOP<br />

Obligations: (also called commitments) are the<br />

beliefs that one agent will create the<br />

truth of a statement (for another<br />

agent)<br />

OBL t I,you<br />

go_swimming(I, CLZ) t+1 ,<br />

(at time t, I am obligated to you to go<br />

swimming in CLZ at time t + 1).<br />

Does not need to be an action:<br />

OBL t (I,you<br />

you) in_lecture(you<br />

you) t+1 .<br />

A decision is an obligation to oneself:<br />

DEC t aφ := OBL t (a,a) φ.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 118/731<br />

2. Basic Architectures 3. AOP<br />

Capabilities: An agent is said to be capable of a<br />

statement if it has the ability to see that<br />

that statement hold at the specified<br />

time:<br />

CANI<br />

now in_lecture(you) t<br />

(I am capable of seeing to it that you<br />

are in a lecture at time t.)<br />

CAN 5 robotopen(door) t . But capabilities<br />

may change.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 119/731<br />

2. Basic Architectures 3. AOP<br />

The following properties are indispensable:<br />

Internal Consistency: Beliefs and desires should<br />

be consistent.<br />

Good Faith: An agent should not commit to a<br />

statement unless it believes it is<br />

capable of the statement.<br />

Introspection: Agents must be aware of their<br />

obligations:<br />

OBL t I,a bstatement −→ B t I OBL t I,a bstatement<br />

¬(OBL t I,a bstatement) −→ B t I not(OBL t I,a bstatement)<br />

Persistence of mental state: beliefs and<br />

obligations should persist by default.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 120/731<br />

2. Basic Architectures 3. AOP<br />

AGENT-0 is based on a quantified multi-modal<br />

logic, with direct reference to time. Three<br />

modalities: Beliefs, Commitments, Capabilities.<br />

Definition 2.3 (Cycle)<br />

AGENT-0 follows the following simple control<br />

loop when executing a program:<br />

At each time step<br />

1 gather incoming messages and update the<br />

mental state accordingly,<br />

2 execute commitments (using capabilities).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 121/731<br />

2. Basic Architectures 3. AOP<br />

initialize<br />

messages in<br />

beliefs<br />

update<br />

beliefs<br />

commitments<br />

update<br />

commitments<br />

abilities<br />

EXECUTE<br />

messages out<br />

internal actions


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 122/731<br />

2. Basic Architectures 3. AOP<br />

Definition 2.4 (Actions in AGENT-0)<br />

AGENT-0 distinguishes two types of actions:<br />

private and communicative actions. These<br />

actions can also be conditional actions.<br />

Private actions are not handled by the AOP<br />

interpreter. Only the user is notified that the<br />

action is to be executed. The syntax is:<br />

(DO p-action).


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 123/731<br />

2. Basic Architectures 3. AOP<br />

Communicative actions are used to deal with other<br />

agents. There are four classes:<br />

(INFORM<br />

(REQUEST<br />

(UNREQUEST<br />

(REFRAIN<br />

t a fact)<br />

t a action)<br />

t a action)<br />

a action)<br />

(t specifies the time the message is to take place, a is the<br />

agent that receives the message, and action is any action<br />

statement. An INFORM action sends the fact to agent a, a<br />

REQUEST notifies agent a that the requester would like<br />

the action to be realised. An UNREQUEST is the inverse of<br />

a REQUEST. A REFRAIN message asks that an action not<br />

be committed to by the receiving agent.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 124/731<br />

2. Basic Architectures 3. AOP<br />

Conditional actions are of the form<br />

IF mntlcond action.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 125/731<br />

2. Basic Architectures 3. AOP<br />

Definition 2.5 (AGENT-0 Programs)<br />

An agent in AGENT-0 consists of (1) a set of<br />

initial beliefs, (2) a set of capabilities, (3) a set of<br />

initial commitments, and (4) a set of<br />

commitment rules of the form<br />

(COMMITmsgcond mntlcond (agent<br />

agent, t, action)),<br />

“Commit to perform action for agent at time t<br />

(if msgcond holds of the new incoming<br />

messages, if mntlcond holds in the mental state,<br />

if the agent is currently capable of doing<br />

action.”


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 126/731<br />

2. Basic Architectures 3. AOP<br />

agent: this is the name of an agent;<br />

action: private and communicative actions as<br />

defined above. But only primitive<br />

actions are allowed. An action like Go<br />

to find the Gold and bring it home! is,<br />

most likely, not primitive. It involves<br />

finding a plan (sequence of primitive<br />

actions).


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 127/731<br />

2. Basic Architectures 3. AOP<br />

msgcond: a message condition is of the form<br />

(From Type Content) where From is an<br />

agent name, Type is a message type<br />

(REQUEST, etc), and Content matches<br />

the actual message ( (x REQUEST y)<br />

matches every request from every<br />

agent.<br />

mntlcond: this describes a condition about the<br />

own mental state of the agent, precise<br />

syntax is described below;


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 128/731<br />

2. Basic Architectures 3. AOP<br />

Definition 2.6 (Mental conditions mntlcond)<br />

Statements are built from simple atomic sentences:<br />

(t (rock west 65)) (“it is true at time t that there is a rock 65<br />

meters west”), (NOT (t (empty gasT ank))) (“it is not true<br />

at time t that the gas tank is empty”).<br />

Mental conditions take the form (B a fact) (“the agent a<br />

believes the fact”) or ((OBL I,a ) action) (“the agent I is<br />

committed to agent a to perform action”), or<br />

action t (“the agent I has the capability to perform<br />

action at time t”).<br />

CAN now<br />

I<br />

They can be connected conjunctively or disjunctively:<br />

(B x) (B y) (NOT (OBL I,a z) ∧<br />

(OBL I,b z)


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 129/731<br />

2. Basic Architectures 3. AOP<br />

Existent./universally quantified variables (∃x),<br />

(∀x) are allowed.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 130/731<br />

2. Basic Architectures 3. AOP<br />

Capabilities are stored in a database as pairs<br />

(private-action mntlcond)<br />

Why the additional mntlcond?<br />

What makes an agent do anything?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 131/731<br />

2. Basic Architectures 3. AOP<br />

PLACA<br />

Shortcomings of AGENT-0:<br />

only commitments to primitive actions,<br />

agents must know the primitive actions of<br />

the intended recipient,<br />

requesting agent must develop the plan to<br />

achieve its goal.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 132/731<br />

2. Basic Architectures 3. AOP<br />

Add two important things:<br />

1 consistent list of intentions,<br />

2 list of consistent plans.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 133/731<br />

2. Basic Architectures 3. AOP<br />

New syntactic structures added by PLACA:<br />

(INTEND x): Intend to make sentence x true<br />

(add to list).<br />

(ADOPT x): Adopt intention/plan x to<br />

intention/plan list.<br />

(DROP x): Drop the intention/plan x.<br />

(CAN-DO x), (CAN-ACHIEVE x),<br />

(PLAN-DO x), (PLAN-ACHIEVE x),<br />

(PLAN-NOT-DO x): Truth statements used in<br />

mental conditions. Plans are created by an<br />

external plan generator. System can<br />

dynamically alter non-succeeding plans.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 134/731<br />

2. Basic Architectures 3. AOP<br />

The Agent-K Extension<br />

Idea: Standardisation of message passing<br />

(KQML). Making it more practical and realistic.<br />

KQML (Knowledge Query & Manipulation<br />

Language): standard for specifying queries of<br />

expert system databases.<br />

KQML supports over 20 messaging types,<br />

AGENT-0 just 3.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 135/731<br />

2. Basic Architectures 3. AOP<br />

Two major changes:<br />

Outgoing messages: Replace INFORM,<br />

REQUEST, and UNREQUEST message actions<br />

with one KQML command that takes as<br />

arguments the message, the time, the KQML<br />

type.<br />

Incoming messages: converted into<br />

AGENT-0 types (basic AGENT-0 types suffice<br />

for encapsulation of all KQML types).<br />

It is allowed that several commitments can<br />

match a single message (in AGENT-0 only<br />

the first rule matching a message is selected).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 136/731<br />

2. Basic Architectures 3. AOP<br />

An example application of AGENT-0<br />

Agents: P a passenger, C an airline clerk (program), S<br />

C’s supervisor.<br />

Airline Reservation: By confirming a reservation, the airline<br />

commits to issue a boarding pass to the<br />

passenger in due time.<br />

January 2004:<br />

P to C: Please let me know about flights from<br />

Munich to Cologne on February 22nd.<br />

C to P: Flight # 123 departs on 8:15, flight # 233<br />

at 10:00, flight # 455 at noon, ...<br />

P to C: Please book me on # 123.<br />

C to P: Sorry, sold out.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 137/731<br />

2. Basic Architectures 3. AOP<br />

P to C: Then please try # 233.<br />

C to P: Confirmed, your reservation number is<br />

34544567.<br />

P to C: Please do also book me on # 455.<br />

C to P: This is in conflict with # 233: no double<br />

bookings are allowed.<br />

P to C: Please get permission for it, I am a VIP.<br />

C to S: I request permission for the following ...<br />

S to C: Permission denied.<br />

C to P: Sorry but I can’t get approval.<br />

February 2004:<br />

P to C: Hi, I am P, I have a reservation for # 233.<br />

C to P: Here is your boarding pass.


2. Basic Architectures 3. AOP<br />

Initial beliefs:<br />

1 Flight schedule: Database contains tuples of the form<br />

(time (flight(from, to, number)))<br />

2 Available seats:<br />

(time (rem_seats(time1, flightnum, seats )))<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 138/731


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 139/731<br />

2. Basic Architectures 3. AOP<br />

Capabilities:<br />

1. Issue boarding pass (bp) exactly one hour before departure.<br />

IF (B (time -1h present(pass)) ∧<br />

B (time flight(?from, ?to, flightnum)))<br />

DO (time -1h physical_issue_bp(pass, flightnum, time) )<br />

We define this statement as a macro<br />

issue_bp(pass, flight_num, time).<br />

2. Keep track of the remaining seats.<br />

DO<br />

(?time (update_rem_seats(?time1, ?flightnum, ?add_seats))<br />

B<br />

(?time<br />

(rem_seats(?time1, ?flight_num, ?curr_seats))<br />

∧<br />

?curr_seats ≥ ?add_seats )


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 140/731<br />

2. Basic Architectures 3. AOP<br />

Commitment rules:<br />

1. The airline commits to answering inquires about flight<br />

schedules.<br />

COMMIT<br />

(?pass<br />

REQUEST now (IF (B?p) INFORM ?time ?pass ?p)))<br />

true<br />

(?pass<br />

now+1 ((IF (B?p) INFORM ?time ?pass ?p)))


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 141/731<br />

2. Basic Architectures 3. AOP<br />

2. The airline commits to issue a boarding pass upon request<br />

from the customer.<br />

COMMIT<br />

(?cust<br />

REQUEST now issue_bp(?pass, ?flight, ?time)<br />

(B (?time (rem_seats(?flight, ?n)))<br />

∧ (?n > 0)<br />

∧ (¬ ((OBL?anyone<br />

?anyone) (issue_bp<br />

issue_bp(?pass, ?anyflight, ?time))))<br />

(myself<br />

, now+1, (DO update_rem_seats(?time, ?flight, −1))


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 142/731<br />

2. Basic Architectures 3. AOP<br />

Two more macros:<br />

2. Requests from customers need to be answered.<br />

(REQUEST ?time askee<br />

(IF (B q) (INFORM time+1 asker q)))<br />

If q is a variable, then we get all answers to the query q.<br />

query_which(?time, asker, askee, q)


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 143/731<br />

2. Basic Architectures 3. AOP<br />

2. Here we get a confirmation or disconfirmation of a fact<br />

q.<br />

(REQUEST ?time askee<br />

(IF (B q) (INFORM time+1 asker q)))<br />

(REQUEST ?time askee<br />

(IF (B ¬q) (INFORM time+1 asker ¬q)))<br />

query_whether(?time, asker, askee, q)


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 144/731<br />

2. Basic Architectures 3. AOP<br />

And here is the formalisation of the conversation<br />

above.<br />

agent action<br />

smith<br />

query_which(?20jan/1:00, smith, ba,<br />

22feb/?!time flight(Mün, Köln, ?!flightnum)<br />

ba INFORM 20jan/2:00 smith<br />

22feb/8:30 flight(Mün, Köln, #123)<br />

ba INFORM 20jan/3:00 smith<br />

22feb/10:00 flight(Mün, Köln, #233)<br />

ba INFORM 20jan/4:00 smith<br />

22feb/......<br />

smith REQUEST 20jan/5:00 ba<br />

issue_bp(smith, #123, 22feb/8:30)


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 145/731<br />

2. Basic Architectures 3. AOP<br />

agent action<br />

smith<br />

query_whether(20jan/6:00, smith, ba,<br />

COMMIT smith issue_bp(smith, #123, 22feb/8:30)<br />

ba INFORM 20jan/7:00 smith<br />

¬ COMMIT smith issue_bp(smith, #123, 22feb/8:30)<br />

smith REQUEST 20jan/8:00 ba<br />

issue_bp(smith, #233, 22feb/10:00)<br />

smith<br />

query_whether(20jan/9:00, smith, ba,<br />

COMMIT smith issue_bp(smith, #233, 22feb/10:00)<br />

ba INFORM 20jan/10:00 smith<br />

COMMIT smith issue_bp(smith, #233, 22feb/10:00)<br />

· · · · · ·


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 146/731<br />

2. Basic Architectures 3. AOP<br />

agent<br />

smith<br />

ba<br />

action<br />

INFORM 22feb/9:00 ba present(smith)<br />

DO 22feb/9:00<br />

issue_bp(smith, #233, 22feb/10:00)


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 147/731<br />

2. Basic Architectures 3. AOP<br />

PRS: Procedural Reasoning System<br />

data input from sensors<br />

ENVIRONMENT<br />

AGENT<br />

BELIEFS<br />

PLANS<br />

Interpreter<br />

DESIRES<br />

INTENTIONS<br />

action output


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 148/731<br />

2. Basic Architectures 3. AOP<br />

No planning from first principles, but plans<br />

are in a library (precompiled).<br />

Plans are constructed in advance from the<br />

agent programmer.<br />

Plans consist of<br />

a goal (postcondition),<br />

a context, (precondition),<br />

a body, (actions to be carried out).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 149/731<br />

2. Basic Architectures 3. AOP<br />

The body is not just a sequence of primitive<br />

actions. Also allowed are goals, disjunctions of<br />

goals, loops.<br />

Beliefs are represented as in Prolog.<br />

There is a top-Goal at the beginning, which is<br />

pushed on the intention stack.<br />

Agent searches through its plan library.<br />

Options (in the BDI framework): set of plans<br />

that achieve the goal and have their<br />

preconditions satisfied.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 150/731<br />

2. Basic Architectures 3. AOP<br />

How to deliberate (select between the potential<br />

plans)?<br />

1 Meta-level plans. Change agent’s intentions<br />

at runtime.<br />

2 Utilities for plans. Executing the best plan<br />

results in other goals pushed on the stack,<br />

this in turn results in more plans etc.


2. Basic Architectures 3. AOP<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 151/731


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 152/731<br />

2. Basic Architectures 3. AOP<br />

http://www.marcush.net/IRS/irs_downloads.html


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 153/731<br />

2. Basic Architectures 4. Layered Architectures<br />

2.4 Layered Architectures


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 154/731<br />

2. Basic Architectures 4. Layered Architectures<br />

At least 2 layers: reactive (event-driven),<br />

pro-active (goal directed).<br />

action<br />

output<br />

perceptual<br />

input<br />

Layer n<br />

Layer n<br />

Layer n<br />

... ... ...<br />

action<br />

Layer 2 output Layer 2<br />

Layer 2<br />

Layer 1<br />

Layer 1<br />

Layer 1<br />

perceptual<br />

input<br />

perceptual<br />

input<br />

action<br />

output<br />

(a) Horizontal layering<br />

(b) Vertical layering<br />

(One pass control)<br />

(c) Vertical layering<br />

(Two pass control)


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 155/731<br />

2. Basic Architectures 4. Layered Architectures<br />

Horizontal:<br />

Vertical:<br />

simple (n behaviours, n layers),<br />

overall behaviour might be<br />

inconsistent,<br />

Interaction between layers: m n (m<br />

= # actions per layer)<br />

Control-system is needed.<br />

Only m 2 (n − 1) interactions<br />

between layers.<br />

Not fault tolerant: If one layer fails,<br />

everything breaks down.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 156/731<br />

2. Basic Architectures 4. Layered Architectures<br />

Touring Machine<br />

Autonomous Vehicle, based on horizontally<br />

layered architecture.<br />

sensor<br />

input<br />

Modelling layer<br />

Perception subsystem<br />

Planning Layer<br />

Action subsystem<br />

Reactive layer<br />

action<br />

output<br />

Control subsystem


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 157/731<br />

2. Basic Architectures 4. Layered Architectures<br />

Reactive Layer: e.g. Obstacle avoidance<br />

Rule 1: Avoid curb<br />

if<br />

then<br />

is_in_front(curb, observer) and<br />

speed(observer) > 0 and<br />

seperation(curb, observer) < curb_threshold<br />

change_orientation(curb_avoidance_angle)<br />

Planning-Layer: Pro-active behaviour


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 158/731<br />

2. Basic Architectures 4. Layered Architectures<br />

Modelling Layer: updating of the world,<br />

beliefs, predicts conflicts between<br />

agents, changes planning-goals<br />

Control-subsystem: Decides about who is active.<br />

Certain observations should never<br />

reach certain layers. Control rules.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 159/731<br />

2. Basic Architectures 4. Layered Architectures<br />

Reactive rules only make reference to the<br />

current state (no reasoning).<br />

Right hand side contains actions, not just<br />

predicates.<br />

Planning layer does not do planning from<br />

first principles. It consults a library of plan<br />

skeletons, called schemas.<br />

Modelling layer considers other agents,<br />

predicts conflicts, generates new goals (for<br />

resolving conflicts). New goals are handed<br />

over to the planning layer.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 160/731<br />

2. Basic Architectures 4. Layered Architectures<br />

control rules can either<br />

suppress sensor information (between<br />

control rules and control layers), or<br />

censor action outputs from control layers.<br />

Censor Rule 1:<br />

if<br />

then<br />

entity(obstacle6) in perception buffer<br />

remove_sensory_record(layer_R, entity(obstacle6))<br />

Reactive layer never comes to know about<br />

obstacle6.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 161/731<br />

2. Basic Architectures 4. Layered Architectures<br />

InteRRaP<br />

Generic MAS, based on two pass vertically<br />

layered architecture.<br />

cooperation layer<br />

social knowledge<br />

plan layer<br />

planning knowledge<br />

behaviour layer<br />

world model<br />

world interface<br />

perceptual input<br />

action output


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 162/731<br />

2. Basic Architectures 4. Layered Architectures<br />

Similar to Touring (layers).<br />

Each layer has associated KB’s.<br />

Layers interact with each other: bottom-up<br />

activation and top-down execution.<br />

Each layer implements two functions:<br />

situation recognition and goal activation<br />

(mapping a KB and goals to a set of new goals),<br />

planning and scheduling (selection of plans to<br />

execute).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 163/731<br />

2. Basic Architectures 4. Layered Architectures<br />

Layered architectures do not have a clear<br />

semantics and the horizontal interaction is<br />

difficult.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 164/731<br />

2. Basic Architectures 4. Layered Architectures<br />

BDI dates back to [Bratman et al.1988].<br />

PRS (procedural reasoning system,<br />

[Georgeff and Lansky1987]) uses BDI.<br />

Applications: Space Shuttle (Diagnosis),<br />

Sydney Airport (air traffic control).<br />

BDI-Logics: [Rao and Georgeff1991,<br />

Rao and Georgeff1995a, Rao1995].


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 165/731<br />

2. Basic Architectures 5. References<br />

2.5 References


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 166/731<br />

2. Basic Architectures 5. References<br />

[Bozzano et al.1999] Bozzano, M., G. Delzanno,<br />

M. Martelli, V. Mascardi, and F. Zini (1999).<br />

Multi-agent systems development as a software<br />

engineering enterprise.<br />

Lecture Notes in Computer Science 1551, 46–60.<br />

[Bratman et al.1988] Bratman, M., D. Israel, and<br />

M. Pollack (1988).<br />

Plans and Resource-Bounded Practical Reasoning.<br />

Computational Intelligence 4(4), 349–355.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 167/731<br />

2. Basic Architectures 5. References<br />

[Brooks1986] Brooks, R. A. (1986).<br />

A robust layered control system for a mobile robot.<br />

IEEE Journal of Robotics and Automation RA-2, 14–23.<br />

[Brooks1991] Brooks, R. A. (1991).<br />

Integrated systems based on behaviors.<br />

SIGART Bulletin 2 4(2), 46–50.<br />

[Georgeff and Lansky1987] Georgeff, M. and A. Lansky<br />

(1987).<br />

Reactive Reasoning and Planning.<br />

In AAAI, Seattle, WA, pp. 677–682.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 168/731<br />

2. Basic Architectures 5. References<br />

[Georgeff et al.1999] Georgeff, M., B. Pell, M. Pollack,<br />

M. Tambe, and M. Wooldridge (1999).<br />

The belief-desire-intention model of agency.<br />

In J. Müller, M. P. Singh, and A. S. Rao (Eds.),<br />

Proceedings of the 5th International Workshop on<br />

Intelligent Agents V : Agent Theories, Architectures, and<br />

Languages (ATAL-98), Volume 1555, pp. 1–10.<br />

Springer-Verlag: Heidelberg, Germany.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 169/731<br />

2. Basic Architectures 5. References<br />

[Hindriks et al.1998] Hindriks, K. V., F. S. de Boer, H. Hoek,<br />

and J.-J. C. Meyer (1998).<br />

Formal semantics of the core of AGENT-0.<br />

In ECAI’98 Workshop on Practical Reasoning and<br />

Rationality, pp. 20–29.<br />

[Iglesias et al.1999] Iglesias, C., M. Garrijo, and<br />

J. Gonzalez (1999).<br />

A survey of agent-oriented methodologies.<br />

In J. Müller, M. P. Singh, and A. S. Rao (Eds.),<br />

Proceedings of the 5th International Workshop on<br />

Intelligent Agents V : Agent Theories, Architectures, and


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 170/731<br />

2. Basic Architectures 5. References<br />

Languages (ATAL-98), Volume 1555, pp. 317–330.<br />

Springer-Verlag: Heidelberg, Germany.<br />

[Mascardi et al.2004] Mascardi, V., M. Martelli, and<br />

S. Sterling (2004).<br />

Logic-based specification languages for intelligent<br />

software agents.<br />

Theory and Practice of Logic Programming,<br />

4(4)*429-494.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 171/731<br />

2. Basic Architectures 5. References<br />

[Rao1995] Rao, A. S. (1995).<br />

Decision Procedures for Propositional Linear-Time<br />

Belief-Desire-Intention Logics.<br />

In M. Wooldridge, J. Müller, and M. Tambe (Eds.),<br />

Intelligent Agents II – Proceedings of the 1995 Workshop<br />

on Agent Theories, Architectures and Languages (ATAL-95),<br />

Volume 890 of LNAI, pp. 1–39. Berlin, Germany:<br />

Springer-Verlag.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 172/731<br />

2. Basic Architectures 5. References<br />

[Rao and Georgeff1991] Rao, A. S. and M. Georgeff<br />

(1991).<br />

Modeling Rational Agents within a BDI-Architecture.<br />

In J. F. Allen, R. Fikes, and E. Sandewall (Eds.),<br />

Proceedings of the International Conference on Knowledge<br />

Representation and Reasoning, Cambridge, MA, pp.<br />

473–484. Morgan Kaufmann.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 173/731<br />

2. Basic Architectures 5. References<br />

[Rao and Georgeff1995a] Rao, A. S. and M. Georgeff<br />

(1995a, June).<br />

Formal models and decision procedures for multi-agent<br />

systems.<br />

Technical Report 61, Australian Artificial Intelligence<br />

Institute, Melbourne.<br />

[Rao and Georgeff1995b] Rao, A. S. and M. P. Georgeff<br />

(1995b).<br />

BDI-agents: from theory to practice.<br />

In Proceedings of the First Intl. Conference on <strong>Multiagent</strong><br />

<strong>Systems</strong>, San Francisco.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 174/731<br />

2. Basic Architectures 5. References<br />

[Shoham1993] Shoham, Y. (1993, March).<br />

Agent-oriented programming.<br />

Artificial Intelligence 60, 51–92.<br />

[Ue et al.1999] Ue, A., P. Edwards, and W. H. E. Davies<br />

(1999, October 23).<br />

Agent-K: An integration of AOP and KQML.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 175/731<br />

3. Decision Making (1)<br />

Chapter 3. Decision Making (1)<br />

Decision Making (1)<br />

3.1 Evaluation Criteria<br />

3.2 Non-coop Games<br />

3.3 (Im-) Perfect Information<br />

3.4 Repeated Games<br />

3.5 References


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 176/731<br />

3. Decision Making (1)<br />

Outline (1)<br />

We start by emphasising the difference between<br />

classical AI and Agent <strong>Systems</strong> and present<br />

several<br />

evaluation criteria for comparing protocols.<br />

We also<br />

introduce non-cooperative games and<br />

state the minmax theorem and Nash's<br />

theorem.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 177/731<br />

3. Decision Making (1)<br />

Outline (2)<br />

We end this chapter with<br />

imperfect information games, where agents<br />

do not have complete knowledge,<br />

repeated games, like bargaining<br />

mechanisms, which lead to interesting<br />

protocols for infinite games.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 178/731<br />

3. Decision Making (1)<br />

Classical DAI: System Designer fixes an<br />

Interaction-Protocol which is uniform<br />

for all agents. The designer also fixes<br />

a strategy for each agent.<br />

What is a the outcome, assuming that the<br />

protocol is followed and the agents follow the<br />

strategies?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 179/731<br />

3. Decision Making (1)<br />

MAI: Interaction-Protocol is given. Each<br />

agent determines its own strategy<br />

(maximising its own good, via a utility<br />

function, without looking at the global<br />

task).<br />

Global optimum<br />

What is the outcome, given a protocol that<br />

guarantees that each agent’s desired local<br />

strategy is the best one (and is therefore chosen<br />

by the agent)?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 180/731<br />

3. Decision Making (1) 1. Evaluation Criteria<br />

3.1 Evaluation Criteria


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 181/731<br />

3. Decision Making (1) 1. Evaluation Criteria<br />

We need to compare protocols. Each such protocol leads<br />

to a solution. So we determine how good these solutions<br />

are.<br />

Social Welfare: Sum of all utilities<br />

Pareto Efficiency: A solution x is Pareto-optimal, if<br />

there is no solution x ′ with:<br />

(1) ∃ agent ag : ut ag (x x ′ ) > ut ag (x)<br />

(2) ∀ agents ag ′ : ut ag ′(x′<br />

x ′ ) ≥ ut ag ′(x).<br />

Individual rational: if the payoff is higher than not<br />

participating at all.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 182/731<br />

3. Decision Making (1) 1. Evaluation Criteria<br />

Stability:<br />

Case 1: Strategy of an agent<br />

depends on the others.<br />

The profile SA ∗ = 〈S∗ 1 , S∗ 2 , . . . , S∗ |A| 〉 is<br />

called a Nash-equilibrium, iff ∀i : Si<br />

∗<br />

is the best strategy for agent i if<br />

all the others choose<br />

〈S1 ∗, S∗ 2 , . . . , S∗ i−1 , S∗ i+1 , . . . , S∗ |A| 〉.<br />

Case 2: Strategy of an agent does<br />

not depend on the others.<br />

Such strategies are called dominant.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 183/731<br />

3. Decision Making (1) 1. Evaluation Criteria<br />

Example 3.1 (Prisoners Dilemma, Type 1)<br />

Two prisoners are suspected of a crime (which they both<br />

committed). They can choose to (1) cooperate with each<br />

other (not confessing to the crime) or (2) defect (giving<br />

evidence that the other was involved). Both cooperating<br />

(not confessing) gives them a shorter prison term than<br />

both defecting. But if only one of them defects (the<br />

betrayer), the other gets maximal prison term. The<br />

betrayer then has maximal payoff.<br />

Prisoner 1<br />

cooperate<br />

defect<br />

Prisoner 2<br />

cooperate defect<br />

(3,3) (0,5)<br />

(5,0) (1,1)


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 184/731<br />

3. Decision Making (1) 1. Evaluation Criteria<br />

Social Welfare: Both cooperate,<br />

Pareto-Efficiency: All are Pareto optimal,<br />

except when both defect.<br />

Dominant Strategy: Both defect.<br />

Nash Equilibrium: Both defect.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 185/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

3.2 Non-coop Games


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 186/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

Prisoners dilemma revisited: c a d b<br />

Prisoner 1 cooperate<br />

defect<br />

Prisoner 2<br />

cooperate defect<br />

(a,a) (c,b)<br />

(b,c) (d,d)


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 187/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

Example 3.2 (Trivial mixed-motive game, Type 0)<br />

Player 1 C D<br />

Player 2<br />

C D<br />

(4, 4)<br />

(3, 2)<br />

(2, 3)<br />

(1, 1)


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 188/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

Example 3.3 (Battle of the Bismarck Sea)<br />

In 1943 the northern half of New Guinea was controlled by<br />

the Japanese, the southern half by the allies. The Japanese<br />

wanted to reinforce their troops. This could happen using<br />

two different routes: (1) north (rain and bad visibility) or<br />

(2) south (weather ok). Trip should take 3 days.<br />

The allies want to bomb the convoy as long as possible. If<br />

they search north, they can bomb 2 days (independently<br />

of the route taken by the Japanese). If they go south, they<br />

can bomb 3 days if the Japanese go south too, and only 1<br />

day, if the Japanese go north.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 189/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

Allies<br />

Search North<br />

Search South<br />

Japanese<br />

Sail North Sail South<br />

2 days 2 days<br />

1 day 3 days<br />

Allies: What is the largest of all row minima?<br />

Japanese: What is smallest of the column maxima?<br />

Battle of the Bismarck sea:<br />

largest row minimum = smallest column maximum.<br />

This is called a saddle point.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 190/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

Example 3.4 (Rochambeau Game)<br />

Also known as paper, rock and scissors: paper<br />

covers rock, rock smashes scissors, scissors cut<br />

paper.<br />

Max<br />

P<br />

S<br />

R<br />

Min<br />

P S R<br />

0 -1 1<br />

1 0 -1<br />

-1 1 0


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 191/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

Definition 3.5 (n-Person Normal Form Game)<br />

A finite n-person normal form game is a tuple<br />

〈N, A, O, ϱ, µ〉, where<br />

N = {1, . . . i, . . . , n} is a finite set of players.<br />

A = 〈A 1 , . . . , A i , . . . A n 〉 where A i is the set of actions<br />

available to player i. A vector a ∈ A is called action<br />

profile. The elements of A i are also called pure<br />

strategies.<br />

O is the set of outcomes.<br />

ϱ : A −→ O assigns each action profile an outcome.<br />

µ = 〈µ 1 , . . . µ i , . . . µ n 〉 where µ i : O −→ R is a<br />

real-valued utility (payoff) function for player i.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 192/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

Games can be represented graphically using an<br />

n-dimensional payoff matrix. Here is a generic picture<br />

for 2-player, 2-strategy games:<br />

Player 1 a1 1<br />

a 2 1<br />

Player 2<br />

a 1 2 a 2 2<br />

(µ 1 (a 1 1, a 1 2), µ 2 (a 1 1, a 1 2)<br />

(µ 1 (a 2 1, a 2 2), µ 2 (a 2 1, a 2 2)<br />

(µ 1 (a 1 1, a 1 2), µ 2 (a 1 1, a 2 2)<br />

(µ 1 (a 2 1, a 1 2), µ 2 (a 2 1, a 2 2)<br />

We often forget about ϱ (thus we are making no<br />

distinction between actions and outcomes). Thus we<br />

simply write µ 1 (a 1 1, a 1 2) instead of the more precise<br />

µ 1 (ϱ(〈a 1 1, a 1 2〉).


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 193/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

Definition 3.6 (Common Payoff Game)<br />

A common payoff game (team game) is a game<br />

in which for all action profiles a ∈ A 1 × . . . × A n<br />

and any two agents i, j the following holds:<br />

µ i (a) = µ j (a).<br />

In such games agents have no conflicting<br />

interests. Their graphical depiction is simpler<br />

than above (the second component is not<br />

needed).


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 194/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

The opposite of a team game is a<br />

Definition 3.7 (Constant Sum Game)<br />

A 2-player n-strategy normal form game is called<br />

constant sum game, if there exists a constant c<br />

such that for each strategy profile a ∈ A 1 × A 2 :<br />

µ 1 (a) + µ 2 (a) = c.<br />

We usually set wlog c = 0 (zero sum games).<br />

What we are really after is strategies. A pure<br />

strategy is one where one action is chosen and<br />

played. But does this always make sense?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 195/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

Example 3.8 (Battle of the Sexes, Type 2)<br />

Married couple looks for evening entertainment.<br />

They prefer to go out together, but have<br />

different views about what to do (say going to<br />

the theatre and eating in a gourmet restaurant).<br />

Husband Theatre<br />

Restaurant<br />

Wife<br />

Theatre Restaurant<br />

(4,3) (2,2)<br />

(1,1) (3,4)


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 196/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

Example 3.9 (Leader Game, Type 3)<br />

Two drivers attempt to enter a busy stream of<br />

traffic. When the cross traffic clears, each one<br />

has to decide whether to concede the right of<br />

way of the other (C) or drive into the gap (D). If<br />

both decide for C, they are delayed. If both<br />

decide for D there may be a collision.<br />

Driver 1 C D<br />

Driver 2<br />

C D<br />

(2,2)<br />

(4,3)<br />

(3,4)<br />

(1,1)


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 197/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

Example 3.10 (Fighters and Bombers)<br />

Consider fighter pilots in WW II. A good strategy to attack<br />

bombers is to swoop down from the sun: Hun-in-the-sun<br />

strategy. But the bomber pilots can put on their<br />

sunglasses and stare into the sun to watch the fighters. So<br />

another strategy is to attack them from below Ezak-Imak<br />

strategy: if they are not spotted, it is fine, if they are, it is<br />

fatal for them (they are much slower when climbing). The<br />

table contains the survival probabilities of the fighter<br />

pilot.<br />

Fighter Pilots<br />

Hun-in-the-Sun<br />

Ezak-Imak<br />

Bomber Crew<br />

Look Up Look Down<br />

0.95 1<br />

1<br />

0


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 198/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

Example 3.11 (Matching Pennies Game)<br />

Two players display one side of a penny (head or<br />

tails). Player 1 wins the penny if they display the<br />

same, player 2 wins otherwise.<br />

Player 1 Head<br />

Tails<br />

Player 2<br />

Head Tails<br />

(1, -1) (-1, 1)<br />

(-1, 1) (1, -1)


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 199/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

Definition 3.12 (Mixed Strategy for NF Games)<br />

Let 〈N, A, O, ϱ, u〉 be normal form game. For a set X let<br />

Π(X) be the set of all probability distributions over X.<br />

The set of mixed strategies for player i is the set<br />

S i = Π(A i ). The set of mixed strategy profiles is<br />

S 1 × . . . × S n .<br />

The support of a mixed strategy is the set of actions that<br />

are assigned non-zero probabilities.<br />

What is the payoff of such strategies? We have to take into<br />

account the probability with which an action is chosen.<br />

This leads to the expected utility µ expected .


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 200/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

Definition 3.13 (Expected Utility for player i)<br />

The expected utility for player i of the mixed<br />

strategy profile (s 1 , . . . , s n ) is defined as<br />

µ expected (s 1 , . . . , s n ) = ∑ n∏<br />

µ i (ϱ(a)) s j (a j ).<br />

a∈A<br />

j=1<br />

What is the optimal strategy (maximising the<br />

expected payoff) for an agent in an 2-agent<br />

setting?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 201/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

Definition 3.14 (Maxmin strategy)<br />

Given a game 〈{1, 2}, {A 1 , A 2 }, {µ 1 , µ 2 }〉, the maxmin<br />

strategy of player i is a mixed strategy that maximises the<br />

guaranteed payoff of player i, no matter what the other<br />

player −i does:<br />

argmax si<br />

min<br />

s −i<br />

µ expected<br />

i (s 1 , s 2 )<br />

The maxmin value for player i is<br />

max si min s−i µ expected<br />

i (s 1 , s 2 ).<br />

The minmax strategy for player i is<br />

argmin si<br />

max<br />

s −i<br />

µ expected<br />

−i (s 1 , s 2 )<br />

and its minmax value is min s−i max si µ expected<br />

−i (s 1 , s 2 ).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 202/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

Lemma 3.15<br />

In each finite normal form 2-person game (not<br />

necessarily constant sum), the maxmin value of<br />

one player is never strictly greater than the<br />

minmax value for the other.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 203/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

We illustrate the maxmin strategy using a<br />

2-person 3-strategy constant sum game:<br />

Player A A-I<br />

A-II<br />

Player B<br />

B-I B-II B-III<br />

0<br />

1<br />

5<br />

6<br />

1<br />

2<br />

We assume Player A’s optimal strategy is to play<br />

strategy<br />

A-I with probability x and<br />

A-II with probability 1 − x.<br />

In the following we want to determine x.<br />

1<br />

2<br />

3<br />

4


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 204/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

Thus Player A’s expected utility is as follows:<br />

1 when playing against B-I: 0x + 1(1 − x) = 1 − x,<br />

2 when playing against B-II: 5 6 x + 1 2 (1 − x) = 1 2 + 1 3 x,<br />

3 when playing against B-III: 1 2 x + 3 4 (1 − x) = 3 4 − 1 4 x.<br />

This can be illustrated with the following picture (see<br />

blackboard). Thus B-III does not play any role.<br />

Thus the maxmin point is determined by setting<br />

1 − x = 1 2 + 1 3 x,<br />

which gives x = 3 8 . The value of the game is 5 8 .<br />

The strategy for Player B is to choose B-I with probability 1 4<br />

and B-II with probability 3 4 .


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 205/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

More in accordance with the minmax strategy let us<br />

compute<br />

argmax si<br />

min<br />

s −i<br />

µ expected<br />

i (s 1 , s 2 )<br />

We assume Player A plays (as above) A-I with probability x<br />

and A-II with probability 1 − x (strategy s 1 . Similarly, Player<br />

B plays B-I with probability y and B-II with probability 1 − y<br />

(strategy s 2 ).<br />

We compute µ expected<br />

1 (s 1 , s 2 )<br />

thus<br />

0 · x · y + 5 6 x(1 − y) + 1 · (1 − x)y + 1 (1 − x)(1 − y)<br />

2<br />

µ expected<br />

1 (s 1 , s 2 ) = y((− 4 3 x) + 1 2 ) + 1 3 x + 1 2


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 206/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

According to the minmax strategy, we have to choose x<br />

such that the minimal values of the above term are<br />

maximal. For each value of x the above is a straight line<br />

with some gradient. Thus we get the maximum when the<br />

line does not slope at all!<br />

Thus x = 3 8 . A similar reasoning gives y = 1 4 .


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 207/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

Theorem 3.16 (von Neumann (1928))<br />

In any finite 2-person constant-sum game the following<br />

holds:<br />

1 The maxmin value for one player is equal to the minmax<br />

value for the other. The maxmin of player 1 is usually<br />

called value of the game.<br />

2 For each player, the set of maxmin strategies coincides<br />

with the set of minmax strategies.<br />

3 The maxmin strategies are optimal: if one player does<br />

not play a maxmin strategy, then its payoff (expected<br />

utility) goes down.<br />

What is the optimal strategy (maximising the expected<br />

payoff) for an agent in an n-agent setting?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 208/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

Figure 1: A saddle.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 209/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

Definition 3.17 (Best Response to a Strategy Profile)<br />

Given a strategy profile<br />

〈s 1 , s 2 , . . . , s i−1 , s i+1 , . . . , s n 〉,<br />

the best response of player i to it is any mixed<br />

strategy s ∗ i ∈ S i such that<br />

µ i (s ∗ i , 〈s 1 , s 2 , . . . , s i−1 , s i+1 , . . . , s n 〉) ≧<br />

µ i (s i , 〈s 1 , s 2 , . . . , s i−1 , s i+1 , . . . , s n 〉)<br />

for all strategies s i ∈ S i .<br />

Is the best response unique?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 210/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

Example 3.18 (Best responses sets for Rochambeau)<br />

How does the set of best responses look like?<br />

1 Player 2 plays the pure strategy P.<br />

2 Player 2 plays P with probability .5 and S with<br />

probability .5.<br />

3 Player 2 plays P with probability 1 3<br />

and S with<br />

probability 1 3 and R with probability 1 3 .<br />

Is a non-pure strategy in the best response set<br />

(say a strategy (s 1 , s 2 ) with probabilities 〈p, 1 − p〉,<br />

p ≠ 0), then so are all other mixed strategies with<br />

probabilities 〈p ′ , 1 − p ′ 〉 where p ≠ p ′ ≠ 0.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 211/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

Definition 3.19 (Nash-Equilibrium)<br />

A strategy profile 〈s ∗ 1, s ∗ 2, . . . , s ∗ n〉 is a Nash<br />

equilibrium if for any agent i, s ∗ i is the best<br />

response to 〈s ∗ 1, s ∗ 2, . . . , s ∗ i−1 , s∗ i+1 , . . . , s∗ n〉.<br />

What are the Nash equilibria in the Battle of<br />

sexes? What about the matching pennies?


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 212/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

Example 3.20 (Cuban Missile Crisis, Type 4)<br />

This relates to the well-known crisis in October<br />

1962.<br />

U. S.<br />

Blockade<br />

Air strike<br />

Withdrawal<br />

(3, 3)<br />

Compromise<br />

(4, 2)<br />

U.S. victory<br />

USSR<br />

Maintain<br />

(2, 4)<br />

USSR victory<br />

(1, 1)<br />

Nuclear War


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 213/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

Theorem 3.21 (Nash (1950))<br />

Every finite normal form game has a Nash<br />

equilibrium.<br />

Corollary 3.22 (Nash Eq. in constant-sum Games)<br />

In any finite normal form 2-person constant-sum<br />

game, the Nash equilibria are exactly all pairs<br />

〈s 1 , s 2 〉 of maxmin strategies (s 1 for player 1, s 2<br />

for player 2).<br />

All Nash equilibria have the same payoff<br />

(expected utility): the value of the game, that<br />

player 1 gets.


3. Decision Making (1) 2. Non-coop Games<br />

Proof<br />

We use Kakatuni’s theorem: Let X be a nonempty subset<br />

of n-dimensional Euclidean space, and f : X −→ 2 X . The<br />

following are sufficient conditions for f to have a fixed<br />

point (i.e. an x ∗ ∈ X with x ∗ ∈ f(x ∗ )):<br />

1 X is compact: any sequence in X has a limit in X.<br />

2 X is convex: x, y ∈ X, α ∈ [0, 1] ⇒ αx + (1 − α)y ∈ X.<br />

3 ∀x : f(x) is nonempty and convex.<br />

4 For any sequence of pairs (x i , x ∗ i ) such that x i , x ∗ i ∈ X<br />

and x ∗ i ∈ f(x i ), if lim i→∞ (x i , x ∗ i ) = (x, x ∗ ) then<br />

x ∗ ∈ f(x).<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 214/731


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 215/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

Let X consist of all mixed strategy profiles and let f be the<br />

best response set: f(〈s 1 , . . . , s n 〉) is the set of all best<br />

responses 〈s ′ 1, . . . , s ′ n〉 (where s ′ i is players i best response<br />

to 〈s 1 , . . . , s i−1 , s i+1 , . . . s n 〉).<br />

Why is that a subset of an n-dimensional Euclidean<br />

space?<br />

A mixed strategy over k actions (pure strategies) is a<br />

k − 1 dimensional simplex (namely the one satisfying<br />

∑ k<br />

i=1 p i = 1). Therefore X is the cartesian product of n<br />

simplices. X is compact and convex (why?).<br />

The function f satisfies the remaining properties listed<br />

above. Thus there is a fixed point and this fixed point is a<br />

Nash equilibrium.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 216/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

Theorem 3.23 (Brouwer’s Fixpoint Theorem)<br />

Let D be the unit Euclidean ball in R n and let f : D → D be a<br />

continuous mapping. Then there exists x ∈ D with f(x) = x.<br />

Proof<br />

Reduction to the C 1 -differentiable case: Let r : R n → R<br />

be the function<br />

r(x) = r(x 1 , x 2 , . . . , x n ) = √ x 2 1 + x 2 2 + · · · + x 2 n.<br />

Let φ : R n → R given by:<br />

φ(x) = a n (1/4r(x) 4 − 1/2r(x) 2 + 1/4)<br />

on D and equal to 0 in the complement of D,<br />

where the constant a n is chosen such that the<br />

integral of φ over R n equals 1.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 217/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

Let f : D → D be continuous. Let F : R n → D be the<br />

extension of f to R n , for which we have<br />

F (x) = f( x<br />

||x|| ) on Rn \ D.<br />

For k ∈ N, k ≠ 0, put f k (x) := ∫ R n k n φ(ky)F (x − y)dy.<br />

Show that the restriction of f k to D maps D into D. Show<br />

that the mappings F k are continuously differentiable and<br />

approximate in the topology of uniform convergence the<br />

mapping F . Show that if there exists a continuous<br />

mapping f : D → D without fixed points, then there will<br />

also exist a continuously differential mapping without<br />

fixed points. It follows, that it suffices to proof the<br />

Brouwer Fixpoint Theorem only for continuously<br />

differentiable mappings.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 218/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

Proof for C 1 -differentiable mappings: The proof is by<br />

contradiction.<br />

Assume, that the continuously differential mapping<br />

f : D → D has no fixed points. Let g : D → ∂D the<br />

mapping, such that for every point x ∈ D the points<br />

f(x), x, g(x) are in that order on a line of R n . The mapping<br />

g is also continuously differentiable and satisfies g(x) = x<br />

for x ∈ ∂D. We write g(x) = (g 1 (x), g 2 (x), . . . , g n (x)) and<br />

get (for x ∈ ∂D and i = 1 . . . n) g i (x 1 , x 2 , . . . , x n ) = x i . Note<br />

dg 1 ∧ dg 2 ∧ · · · ∧ dg n = 0 since g 2 1 + g 2 2 + · · · + g 2 n = 1. Then:<br />

0 ≠ ∫ D dx 1 ∧ dx 2 ∧ · · · ∧ dx n = ∫ ∂D x 1 ∧ dx 2 ∧ · · · ∧ dx n<br />

= ∫ ∂D g 1 ∧ dg 2 ∧ · · · ∧ dg n = ∫ D dg 1 ∧ dg 2 ∧ · · · ∧ dg n<br />

= ∫ D 0 = 0


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 219/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

It is obvious that there is not always a strategy<br />

that is strictly dominating all others (this is why<br />

the Nash equilibrium has been introduced).<br />

Reducing games<br />

However, often games can be reduced and the<br />

computation of the equilibrium simplified.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 220/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

Definition 3.24 (Dominating strategy)<br />

A strategy is strictly dominated for an agent, if<br />

there is some other strategy that strictly<br />

dominates it.<br />

Theorem 3.25 (Church-Rosser)<br />

Given a 2-person 〈n, m〉 strategy game. All<br />

strictly dominated columns, as well as all<br />

strictly dominated rows can be eliminated. This<br />

results in a finite series of reduced games. The final<br />

result does not depend on the order of the<br />

eliminations.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 221/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

Note that we eliminate only pure strategies.<br />

Such a strategy might be dominated by a mixed<br />

strategy.<br />

L C R<br />

U 〈3, 2〉 〈2, 1〉 〈3, 1〉<br />

M 〈1, 1〉 〈1, 1〉 〈2, 2〉<br />

D 〈0, 1〉 〈4, 2〉 〈0, 1〉<br />

1 Eliminate row M.<br />

2 Eliminate column R.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 222/731<br />

3. Decision Making (1) 2. Non-coop Games<br />

This leads to<br />

L C<br />

U 〈3, 2〉 〈2, 1〉<br />

D 〈0, 1〉 〈4, 2〉


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 223/731<br />

3. Decision Making (1) 3. (Im-) Perfect Information<br />

3.3 (Im-) Perfect Information


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 224/731<br />

3. Decision Making (1) 3. (Im-) Perfect Information<br />

We have previously introduced normal form games<br />

(Definition 3.5). This notion does not allow to deal with<br />

sequences of actions that are reactions to actions of the<br />

opponent.<br />

Extensive form (tree form) games<br />

Unlike games in normal form, those in extensive form do<br />

not assume that all moves between players are made<br />

simultaneously. This leads to a tree form, and allows to<br />

introduce strategies, that take into account the history of<br />

the game.<br />

We distinguish between perfect and imperfect<br />

information games. While the former assume that the<br />

players have complete knowledge about the game, the<br />

latter do not: a player might not know exactly which node<br />

it is in.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 225/731<br />

3. Decision Making (1) 3. (Im-) Perfect Information<br />

The following definition covers a game as a tree:<br />

Definition 3.26 (Extensive form Games, Perfect Inf.)<br />

A finite perfect information game in extensive form is a<br />

tuple G = 〈A, A, H, Z, α, ρ, σ, µ 1 , . . . , µ n 〉 where<br />

A is a set of n players, A is a set of actions<br />

H is a set of non-terminal nodes, Z a set of terminal<br />

nodes, H ∩ Z = ∅,<br />

α : H → A assigns to each node a set of actions,<br />

ρ : H → N assigns to each non-terminal node a player<br />

who chooses an action at that node,<br />

σ : H × A → H ∪ Z assigns to each (node,action) a<br />

successor node (h 1 ≠ h 2 implies σ(h 1 , a 1 ) ≠ σ(h 2 , a 2 )),<br />

µ i : Z → R are the utility functions.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 226/731<br />

3. Decision Making (1) 3. (Im-) Perfect Information<br />

Such games can be visualised as finite trees.<br />

Here is the famous “Sharing Game”.<br />

Figure 2: The Sharing game.


3. Decision Making (1) 3. (Im-) Perfect Information<br />

Here is another (generic) game.<br />

Figure 3: A generic game.<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 227/731


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 228/731<br />

3. Decision Making (1) 3. (Im-) Perfect Information<br />

Transforming extensive form games into<br />

normal form<br />

Note that the definitions of best response and<br />

Nash equilibria carry over to games in extensive<br />

form. Indeed we have:<br />

Lemma 3.27 (Extensive form ↩→ Normal form)<br />

Each game in extensive form can be transformed<br />

in normal form (such that the strategy spaces are<br />

the same).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 229/731<br />

3. Decision Making (1) 3. (Im-) Perfect Information<br />

Is there a converse of Lemma 3.27?<br />

We consider prisoner’s dilemma and try to<br />

model a game in extensive form with the same<br />

payoffs and strategy profiles.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 230/731<br />

3. Decision Making (1) 3. (Im-) Perfect Information<br />

In fact, it is not surprising that we do not<br />

succeed in the general case:<br />

Theorem 3.28 (Zermelo, 1913)<br />

Every perfect information game in extensive form<br />

has a pure strategy Nash equilibrium.<br />

We will later introduce imperfect information<br />

games (in extensive form): Slide 234.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 231/731<br />

3. Decision Making (1) 3. (Im-) Perfect Information<br />

Example 3.29 (Unintended Nash equilibria)<br />

We consider the following perfect information<br />

game in extensive form.<br />

Figure 4: Unintended Equilibrium.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 232/731<br />

3. Decision Making (1) 3. (Im-) Perfect Information<br />

This leads to the notion of subgame perfect Nash<br />

equilibria:<br />

Definition 3.30 (Subgame perfect Nash equilibria)<br />

Let G be a perfect information game in extensive form.<br />

Subgame: A subgame of G rooted at node h is the<br />

restriction of G to the descendants of h.<br />

SPE: The subgame perfect Nash equilibria of a<br />

perfect information game G in extensive form<br />

are those Nash equilibria of G, that are also<br />

Nash equilibria for all subgames G ′ of G.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 233/731<br />

3. Decision Making (1) 3. (Im-) Perfect Information<br />

Figure 5: The Centipede game.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 234/731<br />

3. Decision Making (1) 3. (Im-) Perfect Information<br />

Definition 3.31 (Extensive form Games, Imperfect Inf.)<br />

A finite imperfect information game in<br />

extensive form is a tuple<br />

G = 〈A, A, H, Z, α, ρ, σ, µ 1 , . . . , µ n , I 1 , . . . , I n 〉<br />

where<br />

〈A, A, H, Z, α, ρ, σ, µ 1 , . . . , µ n 〉 is a perfect<br />

information game in the sense of<br />

Definition 3.26 on Slide 225,<br />

I i are equivalence relations on<br />

{h ∈ H : ρ(h) = i} such that h, h ′ ∈ I i implies<br />

α(h) = α(h ′ ).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 235/731<br />

3. Decision Making (1) 3. (Im-) Perfect Information<br />

Figure 6: An imperfect game.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 236/731<br />

3. Decision Making (1) 3. (Im-) Perfect Information<br />

Definition 3.32 (Pure strategy in imperfect inf. games)<br />

Given an imperfect information game in<br />

extensive form, a pure strategy for player i is a<br />

vector 〈a 1 , . . . , a k , 〉 with a j ∈ α(I (i,j) ) where<br />

I (i,1) , . . . I (i,k) are the k equivalence classes for<br />

agent i.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 237/731<br />

3. Decision Making (1) 3. (Im-) Perfect Information<br />

Figure 7: Prisoner’s dilemma.<br />

There is a pure strategy Nash equilibrium.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 238/731<br />

3. Decision Making (1) 3. (Im-) Perfect Information<br />

NF game ↩→ Imperfect game<br />

Each game in normal form can be transformed<br />

into an imperfect information game in extensive<br />

form.<br />

Each imperfect information game in extensive<br />

form can be transformed into a game in normal<br />

form.<br />

This is obvious if we consider pure strategies.<br />

But what about mixed strategies?<br />

What is the set of mixed strategies for an<br />

imperfect game?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 239/731<br />

3. Decision Making (1) 3. (Im-) Perfect Information<br />

SPE: What about subperfect equilibria<br />

(analogue of Definition 3.30 on<br />

Slide 232 for imperfect games?<br />

First try: In each information set, we have a set<br />

of subgames (a forest). Why not<br />

asking that a strategy should be a best<br />

response in all subgames of that<br />

forest?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 240/731<br />

3. Decision Making (1) 3. (Im-) Perfect Information<br />

Figure 8: Subgames in Imperfect Games.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 241/731<br />

3. Decision Making (1) 3. (Im-) Perfect Information<br />

Nash equilibria: (L, U) and (R, D).<br />

In one subgame, U dominates D, in the other<br />

D dominates U.<br />

But (R, D) seems to be the unique choice:<br />

both players can put themselves into the<br />

others place and reason accordingly.<br />

Requiring that a strategy is best response<br />

to all subgames is too strong.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 242/731<br />

3. Decision Making (1) 3. (Im-) Perfect Information<br />

We are not giving the precise definitions but<br />

state the following result.<br />

Theorem 3.33 (Existence of Sequential Equilibria)<br />

Each imperfect information game in extensive form<br />

with perfect recall has a sequential equilibrium.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 243/731<br />

3. Decision Making (1) 4. Repeated Games<br />

3.4 Repeated Games


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 244/731<br />

3. Decision Making (1) 4. Repeated Games<br />

Often games are not just played once. They<br />

are repeated finitely often (until consensus is<br />

reached).<br />

Sometimes, infinitely repeated games can<br />

be used to define equilibria.<br />

In repeated games, it makes sense to make its<br />

choices dependent on the previous game (or<br />

the whole history).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 245/731<br />

3. Decision Making (1) 4. Repeated Games<br />

Figure 9: Iterated Prisoners Dilemma.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 246/731<br />

3. Decision Making (1) 4. Repeated Games<br />

Axiomatic Bargaining<br />

We assume two agents 1, 2 , each with a utility<br />

function µ i : E → R. If the agents do not agree<br />

on a result e the fallback e fallback is taken.<br />

Example 3.34 (Sharing 1 Pound)<br />

How to share 1 Pound? Let e fallback = 0.<br />

Agent 1 offers ρ (0 < ρ < 1). Agent 2 agrees!<br />

Such deals are individually rational and each<br />

one is in Nash-equilibrium!<br />

Therefore we need axioms!


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 247/731<br />

3. Decision Making (1) 4. Repeated Games<br />

Axioms on the global solution<br />

µ ∗ = 〈µ µ 1 (e ∗ ),µ µ 2 (e ∗ )〉.<br />

Invariance: Absolute values of the utility<br />

functions do not matter, only relative<br />

values.<br />

Symmetry: Changing the agents does not<br />

influence the solution.<br />

Irrelevant Alternatives: If E is made smaller but<br />

e ∗ still remains, then e ∗ remains the<br />

solution.<br />

Pareto: The players can not get a higher utility<br />

than µ ∗ = 〈µ µ 1 (e ∗ ),µ µ 2 (e ∗ )〉.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 248/731<br />

3. Decision Making (1) 4. Repeated Games<br />

Theorem 3.35 (Unique Solution)<br />

The four axioms above uniquely determine a<br />

solution. This solution is given by<br />

e ∗ = arg max e {(µ µ 1 (e) − µ 1 (e fallback )) × (µ µ 2 (e) − µ 2 (e fallback ))}.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 249/731<br />

3. Decision Making (1) 4. Repeated Games<br />

Strategic Bargaining<br />

No axioms: view it as a game!<br />

Example revisited: Sharing 1 Pound Sterling.<br />

Protocol with finitely many steps: The last<br />

offerer just offers ɛ. This should be accepted, so<br />

the last offerer gets 1 − ɛ.<br />

This is unsatisfiable.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 250/731<br />

3. Decision Making (1) 4. Repeated Games<br />

Ways out:<br />

1 Add a discountfactor δ: in round n, only the<br />

δ n−1 th part of the original value is available.<br />

2 Bargaining costs: bargaining is not for<br />

free—fees have to be paid.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 251/731<br />

3. Decision Making (1) 4. Repeated Games<br />

Finite Games: Suppose δ = 0.9. Then the<br />

outcome depends on # rounds.<br />

Round 1’s share 2’s share Total value Offerer<br />

. . .<br />

.<br />

.<br />

n − 3 0.819 0.181 0.9 n−4 2<br />

n − 2 0.91 0.09 0.9 n−3 1<br />

n − 1 0.9 0.1 0.9 n−2 2<br />

n 1 0 0.9 n−1 1<br />

Infinite Games: δ 1 factor for agent 1, δ 2<br />

factor for agent 2.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 252/731<br />

3. Decision Making (1) 4. Repeated Games<br />

Problem: Nash equilibria in sequential games<br />

might exist in the first stages, but not<br />

later.<br />

Solution: We consider subgame perfect Nash<br />

equilibria: Nash equilibria that remain<br />

Nash equilibria in every possible<br />

subgame.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 253/731<br />

3. Decision Making (1) 4. Repeated Games<br />

Theorem 3.36 (Unique solution for infinite games)<br />

In a discounted infinite round setting, there exists a<br />

unique subgame perfect Nash equilibrium:<br />

Agent 1 gets 1−δ 2<br />

1−δ 1 δ 2<br />

. Agent 2 gets the rest.<br />

Agreement is reached in the first round.<br />

Proof.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 254/731<br />

3. Decision Making (1) 4. Repeated Games<br />

Bargaining Costs<br />

Agent 1 pays c 1 , agent 2 pays c 2 .<br />

Protocol: After each round, the roles change<br />

and the fee is subtracted (c 1 from agent 1, c 2<br />

from agent 2). Therefore the game is finite.<br />

c 1 = c 2 : Any split is in subgame perfect<br />

Nash-equilibrium.<br />

c 1 < c 2 : Only one subgame perfect Nash<br />

equilibrium: Agent 1 gets all.<br />

c 1 > c 2 : Only one subgame perfect Nash<br />

equilibrium: Agent 1 gets c 2 , agent 2<br />

gets 1 − c 2 .


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 255/731<br />

3. Decision Making (1) 5. References<br />

3.5 References


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 256/731<br />

3. Decision Making (1) 5. References<br />

[FudTir] Fudenberg, D. and J. Tirole (1991).<br />

Game Theory.<br />

MIT Press.<br />

[Nash50] Nash, J. (1950).<br />

Equilibrium points in n-person games.<br />

Proceedings of the National Academy of Sciences of the<br />

United States of America 36, 48–49.<br />

[OsbRub] Osborne, M. and A. Rubinstein (1994).<br />

A Course in Game Theory.<br />

MIT Press.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 257/731<br />

3. Decision Making (1) 5. References<br />

[Rosenthal73] Rosenthal, R. (1973).<br />

A class of games possessing pure-strategy Nash<br />

equilibria.<br />

International Journal of Game Theory 2, 65–67.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 258/731<br />

4. Decision Making (2)<br />

Chapter 4. Decision Making (2)<br />

Decision Making (2)<br />

4.1 Voting<br />

4.2 Tactical Voting<br />

4.3 Auctions<br />

4.4 Market Mechanisms<br />

4.5 References


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 259/731<br />

4. Decision Making (2)<br />

Outline (1)<br />

We deal with voting systems and discuss<br />

Arrow's theorem in different settings.<br />

A problem we have to face is that agents are<br />

lying to get what they want:<br />

Tactical Voting is an important area in MAS.<br />

The Gibbard/Satterthwaite theorem is<br />

similar to Arrow’s theorem and deals with<br />

non-manipulable voting systems.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 260/731<br />

4. Decision Making (2)<br />

Outline (2)<br />

We end this section with<br />

a short overview on General Market<br />

Criteria, which play an important role in<br />

economics.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 261/731<br />

4. Decision Making (2) 1. Voting<br />

4.1 Voting


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 262/731<br />

4. Decision Making (2) 1. Voting<br />

Voting procedure<br />

Agents give input to a mechanism: the outcome<br />

is taken as a solution for the agents.<br />

Non-ranking voting: Each agent votes for<br />

exactly one candidate. The winner is<br />

the one with a majority of votes.<br />

Approval voting: Each agent can cast a vote for<br />

as many candidates as she wishes (at<br />

most one for each candidate).<br />

Ranking voting: Each agent expresses his full<br />

preference over the candidates.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 263/731<br />

4. Decision Making (2) 1. Voting<br />

Definition 4.1 (Condorcet- Condition, Set)<br />

The Condorcet condition is the following: If a candidate x<br />

is chosen, then for any other candidate y, it must be the<br />

case that at least half the voters prefer x to y.<br />

The Condorcet set is the set of candidates that meet the<br />

Condorcet condition.<br />

1 2 3<br />

w 1 A B C<br />

w 2 B C A<br />

w 3 C B A<br />

Figure 10: A Tie, but Condorcet helps.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 264/731<br />

4. Decision Making (2) 1. Voting<br />

1 2 3<br />

w 1 A B C<br />

w 2 B C A<br />

w 3 C A B<br />

Figure 11: Condorcet rules out all candidates.<br />

Comparing A and B: majority for A.<br />

Comparing A and C: majority for C.<br />

Comparing B and C: majority for B.<br />

Desired Preference ordering: A > B > C > A


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 265/731<br />

4. Decision Making (2) 1. Voting<br />

Lemma 4.2<br />

In approval voting, at least one of the winners is<br />

in the Condorcet set.<br />

Definition 4.3 (Borda Protocol)<br />

Suppose O is the number of candidates. Each<br />

agents gives his best candidate |O| points, the<br />

second best gets |O| − 1 points , etc. After all<br />

agents have voted, sum up, across all voters.<br />

The highest count wins.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 266/731<br />

4. Decision Making (2) 1. Voting<br />

Does Borda voting satisfy the Condorcet<br />

condition?<br />

Agent<br />

Preferences<br />

1 a ≻ b ≻ c ≻ d<br />

2 b ≻ c ≻ d ≻ a<br />

3 c ≻ d ≻ a ≻ b<br />

4 a ≻ b ≻ c ≻ d<br />

5 b ≻ c ≻ d ≻ a<br />

6 c ≻ d ≻ a ≻ b<br />

7 a ≻ b ≻ c ≻ d<br />

Borda count c wins: 20, b: 19, a: 18, d loses: 13<br />

Borda count<br />

without d<br />

a wins: 15, b: 14, c loses: 13<br />

Winner turns loser and loser turns winner.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 267/731<br />

4. Decision Making (2) 1. Voting<br />

Binary protocol: Pairwise comparison. Take any<br />

two candidates and determine the winner. The<br />

winner enters the next round, where it is<br />

compared with one of the remaining<br />

candidates.<br />

Which ordering should we use?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 268/731<br />

4. Decision Making (2) 1. Voting<br />

Figure 12: Four different orderings and four alternatives.<br />

Last ordering:<br />

d wins, but all agents prefer c over d.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 269/731<br />

4. Decision Making (2) 1. Voting<br />

Formal model for social choice<br />

We want to precisely define what a potential model for<br />

voting, given preferences over the set of candidates, could<br />

be. Given such a model, we want to investigate fair<br />

elections.<br />

Let A the set of agents, O the set of possible outcomes.<br />

(O could be A, a set of laws, or a set of candidates).<br />

Voting based on total orders Ord tot<br />

The voting of agent i is described by a binary relation<br />

≺ i ⊆ O × O,<br />

which we assume to be irreflexive, transitive and total:<br />

Ties are not allowed! We denote by Ord tot the set of all<br />

such binary relations.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 270/731<br />

4. Decision Making (2) 1. Voting<br />

Often, not all subsets of O are votable, only a subset<br />

V ⊆ 2 O \ {∅}. The simplest scenario is for<br />

V = {{o} : o ∈ O}.<br />

Each v ∈ V represents a possible “set of<br />

candidates”. The voting model then has to select<br />

some of the elements of v.<br />

Each agent votes independently of the others. But we<br />

also allow that only a subset is considered. Let<br />

therefore be<br />

|A|<br />

∏<br />

U ⊆<br />

Ord tot .<br />

i=1<br />

The set U represents the set of people (and their<br />

preferences over the candidates) participating at<br />

the election and casting their votes.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 271/731<br />

4. Decision Making (2) 1. Voting<br />

We are now defining what a selection process,<br />

an election mechanism really is.<br />

Definition 4.4 (Social choice: 2 versions)<br />

1 A social choice function is any function<br />

C ∗ : V × U → O; (v, 〈≺ 1 , . . . , ≺ |A| 〉) ↦→ o<br />

2 A social choice correspondence is any<br />

function<br />

W ∗ : V × U → 2 O ; (v, 〈≺ 1 , . . . , ≺ |A| 〉) ↦→ v ′


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 272/731<br />

4. Decision Making (2) 1. Voting<br />

What are fair conditions for an election process?<br />

Note that our preferences are total.<br />

Definition 4.5 (Unanimity, Monotonicity)<br />

A social choice C ∗ function satisfies unanimity, if for any<br />

profile l = (≺ 1 , . . . , ≺ |A| ), v ∈ V and outcome o ∈ v:<br />

If for all 1 ≤ i ≤ |A| : o = max ≺ i<br />

then C ∗ (v, l) = o<br />

A social choice C ∗ function satisfies monotonicity, if for<br />

any profile l = (≺ 1 , . . . , ≺ |A| ), v ∈ V and outcome<br />

o = C ∗ (v, l) ∈ v: if l ′ == (≺ ≺ ′ 1, . . . ,≺ ≺ ′ |A|) is a different profile<br />

such that for all o ′ and i<br />

o ′ ≺ i o implies o ′ ≺ ′ io<br />

then C ∗ (v, l ′ ) = o.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 273/731<br />

4. Decision Making (2) 1. Voting<br />

Finally we call C ∗ dictatorial, if there exists an<br />

agent i such that<br />

for all l = (≺ 1 , . . . , ≺ |A| ) :<br />

C ∗ (v, l) = max<br />

≺ i<br />

v.<br />

Theorem 4.6 (May (1952))<br />

If there are only two candidates, there is a social<br />

choice function which is not dictatorial but yet<br />

satisfies unanimity and monotonicity.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 274/731<br />

4. Decision Making (2) 1. Voting<br />

Theorem 4.7 (Muller-Satterthwaite (1977))<br />

If there are at least 3 candidates, then any social<br />

choice function satisfying unanimity and<br />

monotonicity must be dictatorial.<br />

What about majority voting?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 275/731<br />

4. Decision Making (2) 1. Voting<br />

A variant of the above theorem is for<br />

correspondences. In that case, we require<br />

correspondences to satisfy the following two<br />

conditions (sometimes called prime directive):<br />

1 W ∗ (v, 〈≺ 1 , . . . , ≺ |A| 〉) ≠ ∅ and<br />

2 W ∗ (v, 〈≺ 1 , . . . , ≺ |A| 〉) ⊆ v.<br />

Such a function simply selects a subset of v: the<br />

elected members of the list v.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 276/731<br />

4. Decision Making (2) 1. Voting<br />

≺ ′<br />

IIA: For all v ∈ V : if (∀i ∈ A : ≺ i | v = ≺ ′ i| v )<br />

then<br />

W ∗ (v, 〈≺ 1 , . . . , ≺ |A| 〉) = W ∗ (v, 〈≺ ≺ ′ 1, . . . ,≺ ≺ ′<br />

Unanimity: If o ∈ v and (∀i ∈ A : o ′ ≺ i o) then<br />

o ′ ∉ W ∗ (v, 〈≺ 1 , . . . , ≺ |A| 〉).<br />

Consistency: If {o, o ′ } ⊆ v and<br />

W ∗ (v, u) ∩ {o, o ′ } = {o} and {o, o ′ } ⊆ v ′ then<br />

o ′ ∉ W ∗ (v ′ , u)<br />

≺ ′ |A|〉)


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 277/731<br />

4. Decision Making (2) 1. Voting<br />

Theorem 4.8 (Social choice correspondence)<br />

Any social choice correspondence satisfying<br />

independence of irrelevant alternatives, unanimity<br />

and consistency must be dictatorial.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 278/731<br />

4. Decision Making (2) 1. Voting<br />

We are now relaxing our assumptions<br />

considerably (and thereby strengthening<br />

Arrow’s theorem).<br />

Voting based on partial orders<br />

The voting of agent i is described by a binary<br />

relation<br />

≺ i ⊆ O × O,<br />

which we assume to be irreflexive, transitive<br />

and antisymmetric: Ties are now allowed! We<br />

denote by Ord par the set of all such binary<br />

relations.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 279/731<br />

4. Decision Making (2) 1. Voting<br />

Definition 4.9 (Social welfare function)<br />

A social welfare function is any function<br />

≺ ∗<br />

f ∗ : U → Ord par ; (≺ 1 , . . . , ≺ |A| ) ↦→ ≺ ∗<br />

For each V ⊆ 2 O \ {∅} the function f ∗ w.r.t. U induces a<br />

choice function C 〈≺1 ,...,≺ |A| 〉 as follows:<br />

{ V −→ V<br />

C 〈≺1 ,...,≺ |A| 〉 = def<br />

v ↦→ C 〈≺1 ,...,≺ |A| 〉(v) = max ≺ ∗<br />

max ≺ ∗ | V<br />

to ≺ ∗ | V .<br />

≺ ∗ | V<br />

v is the set of all maximal elements in v according<br />

Each tuple u = (≺ 1 , . . . , ≺ |A| ) determines the election for<br />

all possible v ∈ V .<br />

v


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 280/731<br />

4. Decision Making (2) 1. Voting<br />

What are desirable properties for f ∗ ?<br />

Pareto-Efficiency: for all o, o ′ ∈ O: (∀i ∈ A : o≺ i o ′ )<br />

implies o≺ ≺ ∗ o ′ .<br />

Independence of Irrelevant Alternatives: for all<br />

o, o ′ ∈ O:<br />

(∀i ∈ A : o ≺ i o ′ iff o≺ ≺ ′ i o ′ ) ⇒ (o≺ ≺ ∗ o ′ iff o≺ ′ ∗<br />

≺ ′∗ o ′ ) .<br />

Note that this implies in particular<br />

(∀i ∈ A : ≺ i | v = ≺ ′ i| v )<br />

⇒<br />

∀o, o ′ ∈ v, ∀v ′ ∈ V s.t. v ⊆ v ′ : (o≺ ≺ ∗ | v ′ o ′ iff o≺ ′ ∗<br />

≺ ′∗ | v ′ o ′ )<br />

Majority Vote<br />

The simple majority vote protocol does not satisfy the<br />

Independence of irrelevant alternatives.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 281/731<br />

4. Decision Making (2) 1. Voting<br />

We consider 7 voters (A = {w 1 , w 2 , . . . , w 7 }) and O = {a, b, c, d},<br />

V = {{a, b, c, d}, {a, b, c}}. The columns in the following table<br />

represent two different preference orderings of the voters: one is<br />

given in black, the second in red.<br />

≺ 1 (≺ 1) ≺ 2 (≺ 2) ≺ 3 (≺ 3) ≺ 4 (≺ 4) ≺ 5 (≺ 5) ≺ 6 (≺ 6) ≺ 7 (≺ 7)<br />

a 1 (2) 1 (2) 1 (1) 1 (1) 2 (2) 2 (2) 2 (2)<br />

b 2 (3) 2 (3) 2 (2) 2 (2) 1 (1) 1 (1) 1 (1)<br />

c 3 (4) 3 (4) 3 (3) 3 (3) 3 (3) 3 (3) 3 (3)<br />

d 4 (1) 4 (1) 4 (4) 4 (4) 4 (4) 4 (4) 4 (4)<br />

≺ ∗<br />

Let ≺ ∗ be the solution generated by the ≺ i and ≺ ∗ the solution<br />

generated by the ≺ i . Then we have for i = 1, . . . , 7: b ≺ i a iff b ≺ i a,<br />

but b≺ ≺ ∗ a and a≺ ≺ ∗ b. The latter holds because on the whole set O, for<br />

≺ ∗ a gets selected 4 times and b only 3 times, while for ≺ ∗ a gets<br />

selected only 2 times but b gets still selected 3 times. The former holds<br />

because we even have ≺ i | {a,b,c} = ≺ i | {a,b,c} .<br />

The introduction of the irrelevant (concerning the relative ordering of<br />

a and b) alternative d changes everything: the original majority of a is<br />

split and drops below one of the less preferred alternatives (b).<br />

≺ ∗


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 282/731<br />

4. Decision Making (2) 1. Voting<br />

Before turning to Arrow’s theorem, we state the<br />

following surprising fact.<br />

Lemma 4.10<br />

Let o ∈ O and suppose every agent i puts o either<br />

on top (greatest element wrt. ≺ i ) or to the bottom<br />

(smallest element wrt. ≺ i ).<br />

Then o is either the greatest or the smallest element<br />

of ≺ ∗ .


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 283/731<br />

4. Decision Making (2) 1. Voting<br />

Proof.<br />

Suppose not, i.e there is a a, b ∈ O (a ≠ o, b ≠ o) such that<br />

a≺ ≺ ∗ o≺ ≺ ∗ b and thus a≺ ≺ ∗ b.<br />

Where are a, b located in the rankings ≺ i ?<br />

≺ ′<br />

We construct rankings ≺ ′ i by moving a above b (if not yet)<br />

without disturbing the preferences between o, a and<br />

between o, b. By IIA, this modification does not change<br />

the ranking between o, a and between o, b for ≺ ∗ , thus<br />

a≺ ≺ ∗ b still holds.<br />

≺ ′<br />

But the new profile satisfies b≺ ≺ ′ ia for all agents i, therefore,<br />

by unanimity, b≺ ≺ ∗ a a contradiction.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 284/731<br />

4. Decision Making (2) 1. Voting<br />

Theorem 4.11 (Arrow (1951))<br />

If the social welfare function f ∗ is (1) pareto efficient and (2)<br />

independent from irrelevant alternatives, then there always<br />

exists a dictator: for all U ⊆ ∏ |A|<br />

Ordpar<br />

∃i ∈ A : ∀o, o ′ ∈ O : o≺ i o ′<br />

To be more precise: for all U ⊆ ∏ |A|<br />

i=1 Ord<br />

iff o≺ ≺ ∗ o ′ .<br />

Ord<br />

i=1 Ordpar<br />

∃i ∈ A : ∀〈≺ 1 , . . . , ≺ |A| 〉 ∈ U :<br />

∀o, o ′ ∈ O, o≺ i o ′ iff o f ∗ (〈≺ 1 , . . . , ≺ |A| 〉) o ′ .


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 285/731<br />

4. Decision Making (2) 1. Voting<br />

Proof (of Arrows theorem).<br />

The proof is the third proof given by John<br />

Geanakoplos (1996) and based on the following<br />

Lemma 4.12 (Strict Neutrality)<br />

Consider two pairs of alternatives a, b and α, β.<br />

Suppose each voter strictly prefers a to b or b to<br />

a, i.e. for all i: a≺ ≺ i b or b≺ ≺ i a<br />

Suppose further that each voter has the same<br />

preference for α, β as she has for a, b.<br />

Then either a≺ ≺ ∗ b and α ≺ ∗ β or b≺ ≺ ∗ a and β ≺ ∗ α.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 286/731<br />

4. Decision Making (2) 1. Voting<br />

Proof (of the lemma).<br />

Because |A| ≥ 3, the pair (a, b) is distinct from<br />

(α, β). We assume wlog that b≼ ≼ ∗ a. We are now<br />

constructing a different profile 〈≺ ′ 1, . . . , ≺ ′ |A| 〉<br />

obtained as follows (for all i):<br />

If a ≠ α, then we change ≺ i by moving α just<br />

above a.<br />

If b ≠ β, then we change ≺ i by moving β just<br />

below b.<br />

This can be done by maintaining the old<br />

preferences between α and β (as preferences<br />

between a and b are strict).


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 287/731<br />

4. Decision Making (2) 1. Voting<br />

≺ ′∗<br />

By unanimity, we have a≺ ≺ ′∗ α (for α ≠ a) and<br />

β≺ ≺ ′∗ b (for β ≠ b). Using transitivity, we get<br />

β ≺ ′∗ α. By IIA, we also get β ≺ ∗ α (because<br />

α≺ ≺ ′ iβ iff α≺ i β).<br />

By independence of irrelevant alternatives, we<br />

can change the roles of (a, b) with (α, β) and get<br />

b≺ ≺ ∗ a (note that there is no equality sign ≼ ∗ ).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 288/731<br />

4. Decision Making (2) 1. Voting<br />

The proof of Arrows theorem is by considering<br />

two alternatives a, b and the profile where a≺ ≺ i b<br />

for all agents i. By unanimity, a≺ ≺ ∗ b. Note that<br />

this reasoning is true for all rankings with the<br />

same relative preference between a and b.<br />

We now consider a sequence of profiles<br />

〈≺ i 1, . . . , ≺ i |A|<br />

〉 (from i = 0, . . . , |A|, starting with<br />

the one described above (i = 0)), where in step<br />

i, we let all agents numbered ≤ i change its<br />

profile by moving a above b (leaving all other<br />

rankings untouched).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 289/731<br />

4. Decision Making (2) 1. Voting<br />

There must be one step, let’s call it n ∗ , where<br />

a≺ ≺ n∗ − 1 b but b≺ ≺ n∗ a (because of unanimity and<br />

strict neutrality). (Here we denote by ≺ n∗ − 1 the<br />

ordering obtained from 〈≺ n∗ − 1<br />

1 , . . . , ≺ n∗ − 1<br />

|A|<br />

〉 and,<br />

similarly, for ≺ n∗ ).<br />

Note again that this reasoning is true not just for<br />

one profile 〈≺ i 1, . . . , ≺ i |A|<br />

〉, but for all such<br />

profiles with the same relative ranking of a and<br />

b.<br />

We claim that n ∗ is a dictator.<br />

n ∗


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 290/731<br />

4. Decision Making (2) 1. Voting<br />

Take any pair of alternatives α, β and assume<br />

wlog β ≺ n ∗ α.<br />

Take c ∉ {α, β} and consider the new profile<br />

〈≺ ′ 1, . . . , ≺ ′ |A|<br />

〉 obtained as follows from<br />

〈≺ n∗<br />

1 , . . . , ≺ n∗<br />

|A| 〉:<br />

for 1 ≤ i n ∗ : we put c on top of each ≺ i .<br />

for n ∗ : we put c in between α and β.<br />

n ∗<br />

for n ∗ i ≤ |A|: we put c to the bottom of<br />

each ≺ i .<br />

We are changing the profile 〈≺ n∗<br />

1 , . . . , ≺ n∗<br />

|A| 〉 by<br />

moving c around in a very particular way.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 291/731<br />

4. Decision Making (2) 1. Voting<br />

We apply strict neutrality to the pair (c, β) and<br />

(b, a). Because both pairs have the same relative<br />

ranking in 〈≺ ′ 1, . . . , ≺ ′ |A|<br />

〉, we have β≺n∗<br />

≺ n∗ c.<br />

We also apply strict neutrality to the pair (α, c)<br />

and (a, b). Because both pairs have the same<br />

relative ranking in 〈≺ ′ 1, . . . , ≺ ′ |A|<br />

〉, we have c≺n∗<br />

≺ n∗ α.<br />

By transitivity: β≺ ≺ n∗ α.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 292/731<br />

4. Decision Making (2) 1. Voting<br />

Ways out (of Arrow's theorem):<br />

1 Choice function is not always defined.<br />

2 Independence of alternatives is dropped.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 293/731<br />

4. Decision Making (2) 1. Voting<br />

Coomb's method: Each voter ranks all candidates in linear<br />

order. If there is no candidate ranked first by a<br />

majority of all voters, the candidate which is<br />

ranked last (by a majority) is eliminated. The<br />

last remaining candidate wins.<br />

d'Hondt's method: Each voter cast his votes. Seats are<br />

V<br />

allocated according to the quotient (V the<br />

s+1<br />

number of votes received, s the number of<br />

seats already allocated).<br />

Proportional Approving voting: Each voter gives points 1,<br />

1<br />

, 1, . . . , 1 for his candidates (he can choose as<br />

2 3 n<br />

many or few as she likes). The winning<br />

candidates are those, where the sum of all<br />

points is maximal (across all voters).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 294/731<br />

4. Decision Making (2) 2. Tactical Voting<br />

4.2 Tactical Voting


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 295/731<br />

4. Decision Making (2) 2. Tactical Voting<br />

Lying and manipulation<br />

What if agents vote tactically? I.e. they know the<br />

voting design and do not vote truthfully, but such<br />

that their preferred choice is elected after all?<br />

Is it possible to come up with an implementation of a<br />

social choice function (or correspondence) that can<br />

not be manipulated?


Suppose Ray hates playing basketball but knows that his<br />

fellows do like it. How can he vote to avoid ending up<br />

playing basketball?<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 296/731<br />

4. Decision Making (2) 2. Tactical Voting<br />

Example 4.13 (Babysitting, Shoham)<br />

You are babysitting 4 kids (Will, Liam, Vic and Ray). They<br />

can chose among (a: going to the video arcade, b:<br />

playing baseball, c: going for a leisurely car ride). The kids<br />

give their true preferences as follows:<br />

Will Liam Vic Ray<br />

1 b b a c<br />

2 a a c a<br />

3 c c b b<br />

You announce to use majority voting, breaking ties<br />

alphabetically.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 297/731<br />

4. Decision Making (2) 2. Tactical Voting<br />

Definition 4.14 (Mechanism)<br />

A mechanism wrt. a set of agents A and a set of outcomes<br />

O is a pair 〈Act, M〉 where<br />

1 Act = A 1 × . . . × A |A| , where A i is the set of actions<br />

available to agent i.<br />

2 M : Act → Π(O), where Π(O) is the set of all<br />

probability distributions over the set of outcomes.<br />

This is a very general definition: it allows arbitrary actions.<br />

What about our babysitter example?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 298/731<br />

4. Decision Making (2) 2. Tactical Voting<br />

What is the relation between a mechanism and a<br />

game?<br />

Let µ = 〈µ 1 , . . . µ i , . . . µ n 〉 where µ i : O −→ R is a real-valued<br />

utility (payoff) function for player i (see Definition 3.5).<br />

Mechanisms and games<br />

If µ is a utility profile and 〈Act, M〉 is a mechanism wrt. A<br />

and O, then 〈N, A, O, M, µ〉 is a |A|-person normal form<br />

game.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 299/731<br />

4. Decision Making (2) 2. Tactical Voting<br />

What is the difference between a social choice function<br />

and a mechanism?<br />

Social choice function is often considered to be<br />

truthful: it is based on the real preferences.<br />

A mechanism is an implementation (or not!) of a social<br />

choice function.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 300/731<br />

4. Decision Making (2) 2. Tactical Voting<br />

Definition 4.15 (Mechanism as an Implementation)<br />

Let A and O be fixed. Let a social choice function C ∗ be<br />

given.<br />

We say that a mechanism 〈Act, M〉 implements the<br />

function C ∗ in dominant strategies, if for all utility profiles<br />

µ the game 〈N, A, O, M, µ〉 has an equilibrium in dominant<br />

strategies and for any equilibrium 〈s ∗ 1, s ∗ 2, . . . , s ∗ n〉 we have:<br />

M(〈s ∗ 1, s ∗ 2, . . . , s ∗ n〉) = C ∗ (µ)


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 301/731<br />

4. Decision Making (2) 2. Tactical Voting<br />

What about our example? Is there a mechanism<br />

implementing our social choice function in dominant<br />

strategies?<br />

Lying<br />

There are situations, where one does not want to reveal its<br />

true preferences. Lying might pay off: not only to get the<br />

desired result, but also to ensure that critical information is<br />

not disclosed.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 302/731<br />

4. Decision Making (2) 2. Tactical Voting<br />

Often, mechanisms are used that are much more<br />

restricted.<br />

Definition 4.16 (Direct Mechanism)<br />

A direct mechanism wrt. a set of agents A and a set of<br />

outcomes O is a mechanism 〈Act, M〉 with<br />

A i = {µ i : µ i are utility functions }.<br />

But: agents may lie and not reveal their true utilities.<br />

Truthful or strategy-proof mechanism<br />

A mechanism is truthful (later also called strategy-proof)<br />

in dominant strategies, if for any utility profile, in the<br />

resulting game it is a dominant strategy for each agent to<br />

announce its true utility function.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 303/731<br />

4. Decision Making (2) 2. Tactical Voting<br />

Theorem 4.17 (Revelation)<br />

If there exists an implementation of a social choice rule in<br />

dominant strategies, then there is also a direct and<br />

truthful mechanism implementing the same function.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 304/731<br />

4. Decision Making (2) 2. Tactical Voting<br />

Relaxing our assumptions<br />

We assume that the preferences of our agents satisfy<br />

irreflexivity, transitivity and antisymmetry: again, ties<br />

are allowed. For a preference ≺ we define<br />

top(≺) := {o ∈ O : there is no o ′ with o≺o ′ }<br />

We also define a ⊲⊳ ≺ b iff a and b are incomparable wrt. ≺.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 305/731<br />

4. Decision Making (2) 2. Tactical Voting<br />

We call a social correspondence strategy-proof, if it is<br />

best for each agent to choose its preferences truthfully:<br />

deviating does not pay off.<br />

Gibbard/Satterthwaite<br />

If a social correspondence is strategy-proof and each<br />

outcome is in principle votable, then there is a dictator.<br />

The original theorem was based on total orders. The<br />

stronger version here is due to Pini/Rossi/Venable/Walsh<br />

(AAMAS 2006).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 306/731<br />

4. Decision Making (2) 2. Tactical Voting<br />

What do we mean by each outcome is in principle<br />

votable? This condition is also called citizen sovereignty:<br />

Definition 4.18 (Citizen Sovereignty)<br />

A social correspondence<br />

W ∗ : Ord par → 2 O ; 〈≺ 1 , . . . , ≺ |A| 〉 ↦→ v ′<br />

satisfies citizen sovereignty (or is onto) if for any v ′ ⊂ O<br />

there is a 〈≺ 1 , . . . , ≺ |A| 〉 ∈ Ord par such that<br />

W ∗ (〈≺ 1 , . . . , ≺ |A| 〉) = v ′


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 307/731<br />

4. Decision Making (2) 2. Tactical Voting<br />

Intuitively, strategy-proof means that the social<br />

correspondence is non-manipulable: there is no tactic<br />

voting (disclosing his true preferences) to ensure the<br />

desired result.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 308/731<br />

4. Decision Making (2) 2. Tactical Voting<br />

Definition 4.19 (Strategy-proof social correspondence)<br />

A social correspondence<br />

W ∗ : Ord par → 2 O ; 〈≺ 1 , . . . , ≺ |A| 〉 ↦→ v ′<br />

is called strategy-proof, if the following two conditions<br />

hold for every agent i, for any two profiles<br />

p = 〈≺ 1 , . . . , ≺ i , . . . , ≺ |A| 〉 and p ′ = 〈≺ 1 , . . . , ≺ ′ i, . . . , ≺ |A| 〉<br />

that only differ in agent i’s preference:<br />

1 ∀a ∈ W ∗ (p) \ W ∗ (p ′ ), ∀b ∈ W ∗ (p ′ ):<br />

if a ⊲⊳ ≺i b then a ⊲⊳ ≺ ′ i b or a≺′ ib, and<br />

if a≺ ib then a≺ ′ ib.<br />

2 ∀a ∈ W ∗ (p) \ W ∗ (p ′ ), ∃b ∈ W ∗ (p ′ ) such that:<br />

if b≺ ia then a ⊲⊳ ≺ ′ i b or a≺′ ib, and<br />

if a ⊲⊳ ≺i b then a≺ ′ ib.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 309/731<br />

4. Decision Making (2) 2. Tactical Voting<br />

Here are two examples for social correspondences.<br />

1 Let W ∗ 1 : Ord par → 2 O ;<br />

|A|<br />

⋃<br />

W ∗ 1 (〈≺ 1 , . . . , ≺ |A| 〉) := top(≺ i )<br />

i=1<br />

2 Let W ∗ 2 : Ord par → 2 O ;<br />

W ∗ 2 (〈≺ 1 , . . . , ≺ |A| 〉) := top(≺ pareto )<br />

where a≺ pareto b iff a≺ i b for all 1 ≤ i ≤ |A|, otherwise<br />

a, b are incomparable.<br />

Exercise<br />

Are these correspondences strategy-proof? Prove or give<br />

counterexamples.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 310/731<br />

4. Decision Making (2) 2. Tactical Voting<br />

To formulate our version of the Gibbard-Satterthwaite<br />

Theorem, we need to introduce the notion of a weak<br />

dictator.<br />

Definition 4.20 (Weak dictator)<br />

An agent i is called a weak dictator for the social<br />

correspondence W ∗ , if for all profiles 〈≺ 1 , . . . , ≺ |A| 〉 the<br />

following holds:<br />

W ∗ (〈≺ 1 , . . . , ≺ |A| 〉) ∩ top(≺ i ) ≠ ∅


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 311/731<br />

4. Decision Making (2) 2. Tactical Voting<br />

Exercise<br />

A strong dictator is one where for all profiles<br />

〈≺ 1 , . . . , ≺ |A| 〉 the following holds:<br />

W ∗ (〈≺ 1 , . . . , ≺ |A| 〉) = top(≺ i ).<br />

Can you think of a definition in between strong and weak<br />

dictator?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 312/731<br />

4. Decision Making (2) 2. Tactical Voting<br />

Theorem 4.21 (Gibbard/Satterthwaite, partial order)<br />

Let |O| ≥ 3, |A| ≥ 2 and let W ∗ be any social<br />

correspondence based on partial orderings<br />

W ∗ : Ord par → 2 O<br />

If W ∗ is strategy-proof and satisfies citizen-sovereignty (W ∗<br />

is onto), then there always exists a weak dictator.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 313/731<br />

4. Decision Making (2) 3. Auctions<br />

4.3 Auctions


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 314/731<br />

4. Decision Making (2) 3. Auctions<br />

While voting binds all agents, auctions are<br />

always deals between 2.<br />

Types of auctions:<br />

first-price open cry: (English auction), as usual.<br />

first-price sealed bid: one bids without<br />

knowing the other bids.<br />

dutch auction: (descending auction) the seller<br />

lowers the price until it is taken.<br />

second-price sealed bid: (Vickrey auction)<br />

Highest bidder wins, but the price is<br />

the second highest bid!


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 315/731<br />

4. Decision Making (2) 3. Auctions<br />

Three different auction settings:<br />

private value: Value depends only on the<br />

bidder (cake).<br />

common value: Value depends only on other<br />

bidders (treasury bills).<br />

correlated value: Partly on own’s values, partly<br />

on others.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 316/731<br />

4. Decision Making (2) 3. Auctions<br />

What is the best strategy in Vickrey auctions?<br />

Theorem 4.22 (Private-value Vickrey auctions)<br />

The dominant strategy of a bidder in a<br />

Private-value Vickrey auction is to bid the true<br />

valuation.<br />

Therefore it is equivalent to English auctions.<br />

Vickrey auctions are used to<br />

allocate computation resources in operating<br />

systems,<br />

allocate bandwidth in computer networks,<br />

control building heating.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 317/731<br />

4. Decision Making (2) 3. Auctions<br />

Are first-price auctions better for the<br />

auctioneer than second-prize auctions?<br />

Theorem 4.23 (Expected Revenue)<br />

All 4 types of protocols produce the same expected<br />

revenue to the auctioneer (assuming (1) private<br />

value auctions, (2) values are independently<br />

distributed and (3) bidders are risk-neutral).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 318/731<br />

4. Decision Making (2) 3. Auctions<br />

Why are second price auctions not so popular<br />

among humans?<br />

1 Lying auctioneer.<br />

2 When the results are published,<br />

subcontractors know the true valuations<br />

and what they saved. So they might want<br />

to share the profit.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 319/731<br />

4. Decision Making (2) 3. Auctions<br />

Inefficient Allocation<br />

Auctioning heterogenous, interdependent<br />

items.<br />

Example 4.24 (Task Allocation)<br />

Two delivery tasks t 1 , t 2 . Two agents.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 320/731<br />

4. Decision Making (2) 3. Auctions<br />

The global optimal solution is not reached by<br />

auctioning independently and truthful<br />

bidding.<br />

t 1 goes to agent 2 (for a price of 2) and t 2 goes to<br />

agent 1 (for a price of 1.5).<br />

Even if agent 2 considers (when bidding for t 2 )<br />

that she already got t 1 (so she bids<br />

cost({t 1 , t 2 }) − cost({t 1 }) = 2.5 − 1.5 = 1) she<br />

will get it only with a probability of 0.5.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 321/731<br />

4. Decision Making (2) 3. Auctions<br />

What about full lookahead? blackboard.<br />

Therefore:<br />

It pays off for agent 1 to bid more for t 1 (up to<br />

1.5 more than truthful bidding).<br />

It does not pay off for agent 2, because agent<br />

2 does not make a profit at t 2 anyway.<br />

Agent 1 bids 0.5 for t 1 (instead of 2), agent<br />

2 bids 1.5. Therefore agent 1 gets it for 1.5.<br />

Agent 1 also gets t 2 for 1.5.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 322/731<br />

4. Decision Making (2) 3. Auctions<br />

Lying at Vickrey<br />

Does it make sense to countersperculate at<br />

private value Vickrey auctions?<br />

Vickrey auctions were invented to avoid<br />

counterspeculation.<br />

But what if the private value for a bidder is<br />

uncertain?<br />

The bidder might be able to determine it, but<br />

she needs to invest c.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 323/731<br />

4. Decision Making (2) 3. Auctions<br />

Example 4.25 (Incentive to counterspeculate)<br />

Suppose bidder 1 does not know the (private-)<br />

value v 1 of the item to be auctioned. To<br />

determine it, she needs to invest cost. We also<br />

assume that v 1 is uniformly distributed:<br />

v 1 ∈ [0, 1].<br />

For bidder 2, the private value v 2 of the item is<br />

fixed: 0 ≤ v 2 < 1 2<br />

. So his dominant strategy is to<br />

bid v 2 .<br />

Should bidder 1 try to invest cost to<br />

determine his private value? How does this<br />

depend on knowing v 2 ?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 324/731<br />

4. Decision Making (2) 3. Auctions<br />

blackboard.<br />

Answer: Bidder 1 should invest cost if and only if<br />

v 2 v2 ≥ (2cost) 1 2 .


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 325/731<br />

4. Decision Making (2) 4. Market Mechanisms<br />

4.4 Market Mechanisms


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 326/731<br />

4. Decision Making (2) 4. Market Mechanisms<br />

A theory for efficiently allocating goods and<br />

resources among agents, based on market<br />

prices.<br />

Goods: Given n > 0 goods g (coffee, mirror sites,<br />

parameters of an airplane design). We assume<br />

g ≠ g ′ but within g everything is<br />

indistinguishable.<br />

Prices: The market has prices p = [p 1 , p 2 , ..., p n ] ∈ R n :<br />

p i is the price of the good i.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 327/731<br />

4. Decision Making (2) 4. Market Mechanisms<br />

Consumers: Consumer i has µ i (x) encoding its<br />

preferences over consumption bundles<br />

x i = [x i1 , ..., x in ] t , where x ig ∈ R + is consumer<br />

i’s allocation of good g. Each consumer also<br />

has an initial endowment e i = [e i1 , ..., e in ] t ∈ R.<br />

Producers: Use some commodities to produce others:<br />

y j = [y j1 , ..., y jn ] t , where y jg ∈ R is the amount<br />

of good g that producer j produces. Y j is a set<br />

of such vectors y.<br />

Profit of producer j: p × y j , where y j ∈ Y j .<br />

Profits: The profits are divided among the consumers<br />

(given predetermined proportions ∆ ij ): ∆ ij is<br />

the fraction of producer j that consumer i<br />

owns (stocks). Profits are divided according to<br />

∆ ij .<br />

µ i


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 328/731<br />

4. Decision Making (2) 4. Market Mechanisms<br />

Definition 4.26 (General Equilibrium)<br />

(p ∗ , x ∗ , y ∗ ) is in general equilibrium, if the<br />

following holds:<br />

I. The markets are in equilibrium:<br />

∑<br />

x ∗ i = ∑ e i + ∑ yj<br />

∗<br />

i<br />

i j<br />

II. Consumer i maximises preferences<br />

according the prices<br />

x ∗ i = arg max {xi ∈R R n + | cond i } µ i (x i )<br />

where cond i stands for<br />

p ∗ × x i ≤ p ∗ × e i + ∑ j ∆ ijp ∗ × y j .


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 329/731<br />

4. Decision Making (2) 4. Market Mechanisms<br />

III. Producer j maximises profit wrt. the<br />

market<br />

yi ∗ = arg max {yj ∈Y Y j }p ∗ × y j


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 330/731<br />

4. Decision Making (2) 4. Market Mechanisms<br />

Theorem 4.27 (Pareto Efficiency)<br />

Each general equilibrium is pareto efficient.<br />

Theorem 4.28 (Coalition Stability)<br />

Each general equilibrium with no producers is<br />

coalition-stable: no subgroup can increase their<br />

utilities by deviating from the equilibrium and<br />

building their own market.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 331/731<br />

4. Decision Making (2) 4. Market Mechanisms<br />

Theorem 4.29 (Existence of an Equilibrium)<br />

Let the sets Y j<br />

µ i<br />

Y j be closed, convex and bounded<br />

above. Let µ i be continuous, strictly convex and<br />

strongly monotone. Assume further that at least<br />

one bundle x i is producible with only positive<br />

entries x il .<br />

Under these assumptions a general equilibrium<br />

exists.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 332/731<br />

4. Decision Making (2) 4. Market Mechanisms<br />

Meaning of the assumptions<br />

Formal definitions: blackboard.<br />

Convexity of Y j : Economies of scale in<br />

production do not satisfy it.<br />

Continuity of the µ i : Not satisfied in bandwidth<br />

allocation for video conferences.<br />

Strictly convex: Not satisfied if preference<br />

increases when she gets more of this<br />

good (drugs, alcohol, dulce de leche).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 333/731<br />

4. Decision Making (2) 4. Market Mechanisms<br />

In general, there exist more than one<br />

equilibrium.<br />

Theorem 4.30 (Uniqueness)<br />

If the society-wide demand for each good is<br />

non-decreasing in the prices of the other goods,<br />

then a unique equilibrium exists.<br />

Positive example: increasing price of meat<br />

forces people to eat potatoes (pasta).<br />

Negative example: increasing price of bread<br />

implies that the butter consumption decreases.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 334/731<br />

4. Decision Making (2) 5. References<br />

4.5 References


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 335/731<br />

4. Decision Making (2) 5. References<br />

[Geana96] Geanakoplos, J. (1996, April).<br />

Three brief proofs of arrow’s impossibility theorem.<br />

Cowles Foundation Discussion Papers 1123R3,<br />

Cowles Foundation, Yale University.<br />

available at<br />

http://ideas.repec.org/p/cwl/cwldpp/1123r3.html.<br />

[sand-99] Sandholm, T. W. (1997).<br />

Chapter 5: Distributed Rational Decision Making.<br />

In G. Weiss (Ed.), <strong>Multiagent</strong> <strong>Systems</strong>. Cambridge,<br />

MA: MIT Press.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 336/731<br />

5. Nets and coalitions<br />

Chapter 5. Nets and coalitions<br />

Nets and coalitions<br />

5.1 General Contract Nets<br />

5.2 Four Types of Nets<br />

5.3 Coalition Formation<br />

5.4 Payoff Division<br />

5.5 References


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 337/731<br />

5. Nets and coalitions<br />

We define the task allocation problem in precise terms<br />

and present different types of contracts between agents.<br />

We show that no IR-contract leads to the global<br />

optimum, even if all types are allowed.<br />

We then consider abstract coalition formation for<br />

characteristic function games (CFG) and introduce<br />

several algorithms for searching the coalition structure<br />

graph. We introduce the core of a CFG and end with the<br />

Shapley value for payoff division.<br />

This chapter is based mainly on work done by Tuomas<br />

Sandholm.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 338/731<br />

5. Nets and coalitions 1. General Contract Nets<br />

5.1 General Contract Nets


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 339/731<br />

5. Nets and coalitions 1. General Contract Nets<br />

How to distribute tasks?<br />

Global Market Mechanisms. Implementations<br />

use a single centralised mediator.<br />

Announce, bid, award -cycle. Distributed<br />

Negotiation.<br />

We need the following:<br />

1 Define a task allocation problem in precise<br />

terms.<br />

2 Define a formal model for making bidding<br />

and awarding decisions.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 340/731<br />

5. Nets and coalitions 1. General Contract Nets<br />

Definition 5.1 (Task-Allocation Problem)<br />

A task allocation problem is given by<br />

1 a set of tasks T ,<br />

2 a set of agents A,<br />

3 a cost function cost i : 2 T −→ R ∪ {∞}<br />

(stating the costs that agent i incurs by<br />

handling some tasks), and<br />

4 the initial allocation of tasks<br />

〈T init<br />

1 , . . . , T init<br />

|A| 〉,<br />

where T = ⋃ i∈A T init<br />

i<br />

, T init<br />

i<br />

∩ T init<br />

j<br />

= ∅ for i ≠ j.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 341/731<br />

5. Nets and coalitions 1. General Contract Nets<br />

Definition 5.2 (Accepting Contracts, Allocating Tasks)<br />

A contractee q accepts a contract if it gets paid more than<br />

the marginal cost of handling the tasks of the contract<br />

MC add (T contract |T q ) = def cost q (T contract ∪ T q )<br />

−cost q (T q ).<br />

A contractor r is willing to allocate the tasks T contract from<br />

its current task set T r to a contractee, if it has to pay less<br />

than it saves by handling them itself:<br />

MC remove (T contract |T r ) = def cost r (T r )<br />

−cost r (T r − T contract ).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 342/731<br />

5. Nets and coalitions 1. General Contract Nets<br />

Definition 5.3 (The Protocol)<br />

Agents suggest contracts to others and make<br />

their decisions according to the above MC add<br />

and MC remove sets.<br />

Agents can be both contractors and contractees.<br />

Tasks can be recontracted.<br />

The protocol is domain independent.<br />

Can only improve at each step: Hill-climbing<br />

in the space of all task allocations.<br />

Maximum is social welfare: − ∑ i∈A cost i(T i ).<br />

Anytime algorithm!


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 343/731<br />

5. Nets and coalitions 1. General Contract Nets<br />

Figure 13: TSP as Task Allocation Problem.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 344/731<br />

5. Nets and coalitions 2. Four Types of Nets<br />

5.2 Four Types of Nets


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 345/731<br />

5. Nets and coalitions 2. Four Types of Nets<br />

Definition 5.4 (O-, C-, S-, M- Contracts)<br />

A contract is called of type<br />

O (Original): only one task is moved: 〈T i,j , ρ i,j 〉,<br />

|T i,j | = 1.<br />

C (Cluster): a set of tasks is moved: 〈T i,j , ρ i,j 〉,<br />

|T i,j | 1.<br />

S (Swap): if a pair of agents swaps a pair of tasks:<br />

〈T i,j , T j,i , ρ i,j , ρ j,i 〉, |T i,j | = |T j,i | = 1.<br />

M (Multi): if more than two agents are involved<br />

in an atomic exchange of tasks: 〈T, ρ〉,<br />

both are |A| × |A| matrices. At least 3<br />

elements are non-empty, |T i,j | ≤ 1.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 346/731<br />

5. Nets and coalitions 2. Four Types of Nets<br />

Lemma 5.5 (O-Path reaches Global Optimum)<br />

A path of O-contracts always exists from any task allocation<br />

to the optimal one. The length of the shortest such path is at<br />

most |T |.<br />

Does that solve our problem? (Lookahead)<br />

Definition 5.6 (Task Allocation Graph)<br />

The task allocation graph has as vertices all possible task<br />

allocations (i.e. |A| |T | ) and directed edges from one vertex<br />

to another if there is a possible contract leading from one<br />

to the other.<br />

For O-contracts, searching the graph using<br />

breadth-first search takes how much time?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 347/731<br />

5. Nets and coalitions 2. Four Types of Nets<br />

Lemma 5.7 (Allocation graph for O contracts is sparse)<br />

We assume that there are at least 2 agents and 2<br />

tasks. We consider the task allocation graph for O<br />

contracts. Then the fraction<br />

number of edges<br />

number of edges in the fully connected graph<br />

converges to 0 both for |T | → ∞ as well as<br />

|A| → ∞


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 348/731<br />

5. Nets and coalitions 2. Four Types of Nets<br />

Lemma 5.8 (IR-Path may not reach Global Optimum)<br />

There are instances where no path of IR O<br />

contracts exists from the initial allocation to the<br />

optimal one. The length of the shortest IR path (if<br />

it exists) may be greater than |T |.<br />

But the shortest IR path is never greater than<br />

|A| |T | − (|A| − 1)|T |.<br />

Problem: local maxima.<br />

A contract may be individually rational but the<br />

task allocation is not globally optimal.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 349/731<br />

5. Nets and coalitions 2. Four Types of Nets<br />

Lemma 5.9 (No Path)<br />

There are instances where no path of C-contracts<br />

(IR or not) exists from the initial allocation to the<br />

optimal one.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 350/731<br />

5. Nets and coalitions 2. Four Types of Nets<br />

A task allocation is called k-optimal if no<br />

beneficial C-contract with clusters of k tasks can<br />

be made between any two agents.<br />

Let m n. Does<br />

m optimality imply n optimality;<br />

n optimality imply m optimality?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 351/731<br />

5. Nets and coalitions 2. Four Types of Nets<br />

Lemma 5.10 (No Path)<br />

There are instances where no path of<br />

S-contracts (IR or not) exists from the initial<br />

allocation to the optimal one.<br />

Lemma 5.11 (No Path)<br />

There are instances where no path of<br />

M-contracts (IR or not) exists from the initial<br />

allocation to the optimal one.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 352/731<br />

5. Nets and coalitions 2. Four Types of Nets<br />

Lemma 5.12 (Reachable allocations for S contracts)<br />

We assume that there are at least 2 agents and 2 tasks. We<br />

consider the task allocation graph for S contracts. Given any<br />

vertex v the fraction<br />

number of vertices reachable from v<br />

number of all vertices<br />

converges to 0 both for |T | → ∞ as well as for |A| → ∞.<br />

Proof.<br />

S contracts preserve the number of tasks of each agent. So<br />

any vertex has certain allocations t 1 , . . . , t |A| for the agents.<br />

How many allocations determined by this sequence are<br />

there? There are exactly |T |! many. This is to be divided by<br />

|A| |T | .


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 353/731<br />

5. Nets and coalitions 2. Four Types of Nets<br />

Theorem 5.13 (Each Avoids Local Optima of the Others)<br />

For each of the 4 types there exist task allocations<br />

where no IR contract with the remaining 3<br />

types is possible, but an IR contract with the<br />

fourth type is.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 354/731<br />

5. Nets and coalitions 2. Four Types of Nets<br />

Proof.<br />

Consider O contracts (as fourth type). One task<br />

and 2 agents: T 1 = {t 1 }, T 2 = ∅.<br />

c 1 (∅) = 0, c 1 ({t 1 }) = 2, c 2 (∅) = 0, c 2 ({t 1 }) = 1. The<br />

O contract of moving t 1 would decrease global<br />

cost by 1. No C-, S-, or M-contract is possible.<br />

To show the same for C or S contracts, two<br />

agents and two tasks suffice.<br />

For M-contracts 3 agents and 3 tasks are<br />

needed.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 355/731<br />

5. Nets and coalitions 2. Four Types of Nets<br />

Theorem 5.14 (O-, C-, S-, M- Global Optima)<br />

There are instances of the task allocation problem<br />

where no IR sequence from the initial task<br />

allocation to the optimal one exists using O-,<br />

C-, S-, and M- contracts.<br />

Proof.<br />

Construct cost functions such that the deal<br />

where agent 1 gives one task to agent 2 and agent<br />

2 gives 2 tasks to agent 1 is the only one<br />

increasing welfare. This deal is not possible with<br />

O-, C-, S-, or M-contracts.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 356/731<br />

5. Nets and coalitions 2. Four Types of Nets<br />

Corollary 5.15 (O-, C-, S-, M- Global Optima)<br />

There are instances of the task allocation problem<br />

where no IR sequence from the initial task<br />

allocation to the optimal one exists using any pair<br />

or triple of O-, C-, S-, or M- contracts.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 357/731<br />

5. Nets and coalitions 2. Four Types of Nets<br />

Definition 5.16 (OCSM Nets)<br />

A OCSM-contract is a pair 〈T , ρ〉 of |A| × |A|<br />

matrices. An element T i,j stands for the set of<br />

tasks that agent i gives to agent j. ρ i,j is the<br />

amount that i pays to j.<br />

How many OCSM contracts are there?<br />

How much space is needed to represent<br />

one?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 358/731<br />

5. Nets and coalitions 2. Four Types of Nets<br />

Theorem 5.17 (OCSM-Nets Suffice)<br />

Let |A| and |T | be finite. If a protocol allows<br />

OCSM-contracts, any hill-climbing algorithm<br />

finds the globally optimal task allocation in a<br />

finite number of steps without backtracking.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 359/731<br />

5. Nets and coalitions 2. Four Types of Nets<br />

Proof.<br />

An OCSM contract can move from any task<br />

allocation to any other (in one step). So moving<br />

to the optimum is IR. Any hill-climbing algorithm<br />

strictly improves welfare. As there are only<br />

finitely many allocations, the theorem<br />

follows.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 360/731<br />

5. Nets and coalitions 2. Four Types of Nets<br />

Theorem 5.18 (OCSM-Nets are Necessary)<br />

If a protocol does not allow a certain OCSM<br />

contract, then there are instances of the task<br />

allocation problem where no IR-sequence exists<br />

from the initial allocation to the optimal one.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 361/731<br />

5. Nets and coalitions 2. Four Types of Nets<br />

Proof.<br />

If one OCSM contract is not allowed, then the<br />

task allocation graph contains two vertices<br />

without an edge. We let the initial and the<br />

optimal allocation be these two vertices. We<br />

construct it in such a way, that all adjacent<br />

vertices to the vertex with the initial allocation<br />

have lower social welfare. So there is no way out<br />

of the initial allocation.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 362/731<br />

5. Nets and coalitions 2. Four Types of Nets<br />

[AnderssonS98] consider the multiagent version<br />

of the TSP problem and apply different sorts of<br />

contracts to it.<br />

Several salesmen visit several cities on the unit<br />

square. Each city must be visited by exactly one<br />

salesman. They all have to return home and<br />

want to minimise their travel costs.<br />

salesman = agent, task = city


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 363/731<br />

5. Nets and coalitions 2. Four Types of Nets<br />

Experiments with up to 8 agents and 8 tasks. Initial<br />

allocation randomly chosen.<br />

Ratio bound (welfare of obtained local optimum<br />

divided by global optimum) and mean ratio bound<br />

(over 1000 TSP instances) were computed (all for fixed<br />

number of agents and tasks). Global optimum was<br />

computed using IDA ∗ .<br />

A protocol consisting of 5 intervals is considered. In<br />

each interval, a particular contract type was<br />

considered (and all possible contracts with that type):<br />

1024 different sequences.<br />

In each interval a particular order for the agents and<br />

the tasks is used. First all contracts involving agent 1.<br />

Then all involving agent 2 etc. Thus it makes sense to<br />

have subsequent intervals with the same contract type.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 364/731<br />

5. Nets and coalitions 2. Four Types of Nets<br />

Table 1: The best Contract sequences.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 365/731<br />

5. Nets and coalitions 2. Four Types of Nets<br />

Table 2: Best, average and worst Contracts.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 366/731<br />

5. Nets and coalitions 2. Four Types of Nets<br />

Figure 14: Ratio bounds (second graph is zoomed in).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 367/731<br />

5. Nets and coalitions 2. Four Types of Nets<br />

Figure 15: Ratio bounds for the 4 best and single type sequences.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 368/731<br />

5. Nets and coalitions 2. Four Types of Nets<br />

Figure 16: Contracts performed and tried.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 369/731<br />

5. Nets and coalitions 2. Four Types of Nets<br />

1 Best protocol is 3.1% off the optimum.<br />

2 12 best protocols are between 3% and 4% off<br />

the optimum.<br />

3 Single type contracts do not behave well.<br />

4 More contracts are tried and performed in<br />

the second interval (compared with the first).<br />

5 The more mixture between contract types,<br />

the higher the social welfare.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 370/731<br />

5. Nets and coalitions 3. Coalition Formation<br />

5.3 Coalition Formation


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 371/731<br />

5. Nets and coalitions 3. Coalition Formation<br />

Idea: Consider a protocol (to build<br />

coalitions) as a game and consider<br />

Nash-equilibrium.<br />

Problem: Nash-Eq is too weak!<br />

Definition 5.19 (Strong Nash Equilibrium)<br />

A profile is in strong Nash-Eq if there is no<br />

subgroup that can deviate by changing<br />

strategies jointly in a manner that increases the<br />

payoff of all its members, given that<br />

nonmembers stick to their original choice.<br />

This is often too strong and does not exist.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 372/731<br />

5. Nets and coalitions 3. Coalition Formation<br />

Definition 5.20 (Characteristic Function Game (CFG))<br />

In a CFG the value of a coalition S is given by a<br />

characteristic function v S .<br />

Thus it is independent of the nonmembers.<br />

But<br />

1 Positive Externalities: Overlapping goals.<br />

Nonmembers perform actions and move the<br />

world closer to the coalition’s goal state.<br />

2 Negative Externalities: Shared resources.<br />

Nonmembers may use the resources so that<br />

not enough is left.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 373/731<br />

5. Nets and coalitions 3. Coalition Formation<br />

Definition 5.21 (Coalition Formation in CFG’s)<br />

Coalition Formation in CFG’s consists of:<br />

Forming CS: formation of coalitions such that<br />

within each coalition agents coordinate<br />

their activities. This partitioning is<br />

called coalition structure CS.<br />

Solving Optimisation Problem: For each<br />

coalition the tasks and resources of the<br />

agents have to be pooled. Maximise<br />

monetary value.<br />

Payoff Division: Divide the value of the<br />

generated solution among agents.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 374/731<br />

5. Nets and coalitions 3. Coalition Formation<br />

Definition 5.22 (Super-additive Games)<br />

A game is called super-additive, if<br />

v S∪T ≥ v S + v T ,<br />

where S, T ⊆ A and S ∩ T = ∅.<br />

Lemma 5.23<br />

Coalition formation for super-additive games is<br />

trivial.<br />

Conjecture<br />

All games are super-additive.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 375/731<br />

5. Nets and coalitions 3. Coalition Formation<br />

The conjecture is wrong, because the coalition<br />

process is not for free:<br />

communication costs, penalties, time limits.<br />

Definition 5.24 (Sub-additive Games)<br />

A game is called sub-additive, if<br />

v S∪T v S + v T ,<br />

where S, T ⊆ A and S ∩ T = ∅.<br />

Coalition formation for sub-additive games is<br />

trivial.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 376/731<br />

5. Nets and coalitions 3. Coalition Formation<br />

Example 5.25 (Treasure of Sierra Madre Game)<br />

There are n people finding a treasure of many<br />

gold pieces in the Sierra Madre. Each piece can<br />

be carried by two people, not by a single person.<br />

Example 5.26 (3-player majority Game)<br />

There are 3 people that need to agree on<br />

something. If they all agree, there is a payoff of<br />

1. If just 2 agree, they get a payoff of α<br />

(0 ≤ α ≤ 1). The third player gets nothing.<br />

How do the v S look like?


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 377/731<br />

5. Nets and coalitions 3. Coalition Formation<br />

Definition 5.27 (Payoff Vector, Core of a game)<br />

A payoff vector for a CFG is a tuple 〈x 1 , . . . , x n 〉<br />

such that x i ≥ 0 and ∑ n<br />

i=1 x i = v A .<br />

The core of a CFG is the set of all payoff vectors<br />

such that the following holds:<br />

∀S ⊆ A : ∑ i∈S<br />

x i ≥ v S<br />

Thus the core corresponds to the strong Nash<br />

equilibrium mentioned in the beginning.<br />

What about the core in the above two<br />

examples?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 378/731<br />

5. Nets and coalitions 3. Coalition Formation<br />

Maximise the social welfare of the agents A by<br />

finding a coalition structure<br />

CS ∗ = arg max CS<br />

where<br />

Val(CS<br />

CS) := ∑ v S .<br />

S∈CS<br />

CS),<br />

CS∈part(A) Val(CS<br />

How many coalition structures are there?


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 379/731<br />

5. Nets and coalitions 3. Coalition Formation<br />

A lot: Ω(|A| |A|<br />

2 ). Enumerating is feasible for |A| < 15.<br />

Figure 17: Number of Coalition (Structures).


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 380/731<br />

5. Nets and coalitions 3. Coalition Formation<br />

How can we approximate Val(CS<br />

CS)?<br />

Choose set N (a subset of all partitions of A) and<br />

pick the best coalition seen so far:<br />

CSN ∗ = arg max CS∈N Val(CS<br />

CS).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 381/731<br />

5. Nets and coalitions 3. Coalition Formation<br />

Figure 18: Coalition Structure Graph.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 382/731<br />

5. Nets and coalitions 3. Coalition Formation<br />

We want our approximation as good as possible.<br />

We want to find a small k and a small N such<br />

that<br />

Val(CS<br />

∗ )<br />

Val(CS<br />

∗ N ) ≤ k.<br />

k is the bound (best value would be 1) and N is<br />

the part of the graph that we have to search<br />

exhaustively.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 383/731<br />

5. Nets and coalitions 3. Coalition Formation<br />

We consider 3 search algorithms:<br />

MERGE: Breadth-first search from the top.<br />

SPLIT: Breadth first from the bottom.<br />

Coalition-Structure-Search (CSS1): First the<br />

bottom 2 levels are searched, then a<br />

breadth-first search from the top.<br />

MERGE might not even get a bound, without looking at<br />

all coalitions.<br />

SPLIT gets a good bound (k = |A|) after searching the<br />

bottom 2 levels (see below). But then it can get slow.<br />

CSS1 combines the good features of MERGE and SPLIT.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 384/731<br />

5. Nets and coalitions 3. Coalition Formation<br />

Theorem 5.28 (Minimal Search to get a bound)<br />

To bound k, it suffices to search the lowest two<br />

levels of the CS-graph. Using this search, the<br />

bound k = |A| can be taken. This bound is tight<br />

and the number of nodes searched is 2 |A|−1 .<br />

No other search algorithm can establish the<br />

bound k while searching through less than<br />

2 |A|−1 nodes.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 385/731<br />

5. Nets and coalitions 3. Coalition Formation<br />

Proof.<br />

There are at most |A| coalitions included in CS ∗ .<br />

Thus<br />

Val(CS<br />

∗ ) ≤ |A| max<br />

S<br />

v S ≤ |A| max Val(CS<br />

CS) = |A|Val(CS<br />

N ∗ )<br />

CS∈N<br />

Number of coalitions at the second lowest level:<br />

2 A − 2.<br />

Number of coalition structures at the second<br />

lowest level: 1 2 (2A − 2) = 2 A−1 − 1.<br />

Thus the number of nodes visited is: 2 A−1 .


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 386/731<br />

5. Nets and coalitions 3. Coalition Formation<br />

What exactly does the last theorem mean? Let<br />

n min be the smallest size of N such that a bound<br />

k can be established.<br />

Positive result:<br />

|A| −→ ∞.<br />

n min<br />

partitions of A<br />

approaches 0 for<br />

Negative result: To determine a bound k, one<br />

needs to search through exponentially<br />

many coalition structures.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 387/731<br />

5. Nets and coalitions 3. Coalition Formation<br />

Algorithm (CS<br />

CS-Search-1)<br />

The algorithm comes in 3 steps:<br />

1 Search the bottom two levels of the<br />

CS-graph.<br />

2 Do a breadth-first search from the top of the<br />

graph.<br />

3 Return the CSwith the highest value.<br />

This is an anytime algorithm.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 388/731<br />

5. Nets and coalitions 3. Coalition Formation<br />

Theorem 5.29 (CS<br />

CS-Search-1 up to Layer l)<br />

With the algorithm CS-Search-1 we get the<br />

following bound for k after searching through<br />

layer l:<br />

{<br />

⌈ |A|<br />

h<br />

⌉ if |A| ≡ h − 1 mod h and |A| ≡ l mod 2,<br />

⌊ |A|<br />

h ⌋ otherwise.<br />

where h = def ⌊ |A|−l<br />

2<br />

⌋ + 2.<br />

Thus, for l = |A| (check the top node), k<br />

switches from |A| to |A|<br />

2 .


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 389/731<br />

5. Nets and coalitions 3. Coalition Formation<br />

Experiments<br />

6-10 agents, values were assigned to each<br />

coalition using the following alternatives<br />

1 values were uniformly distributed between 0<br />

and 1;<br />

2 values were uniformly distributed between 0<br />

and |A|;<br />

3 values were super additive;<br />

4 values were sub additive.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 390/731<br />

5. Nets and coalitions 3. Coalition Formation<br />

Figure 19: MERGE.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 391/731<br />

5. Nets and coalitions 3. Coalition Formation<br />

Figure 20: SPLIT.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 392/731<br />

5. Nets and coalitions 3. Coalition Formation<br />

Figure 21: CS-Search-1.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 393/731<br />

5. Nets and coalitions 3. Coalition Formation<br />

Figure 22: Subadditive Values.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 394/731<br />

5. Nets and coalitions 3. Coalition Formation<br />

Figure 23: Superadditive Values.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 395/731<br />

5. Nets and coalitions 3. Coalition Formation<br />

Figure 24: Coalition values chosen uniformly from [0, 1].


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 396/731<br />

5. Nets and coalitions 3. Coalition Formation<br />

Figure 25: Coalition values chosen uniformly from [0, |S|].


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 397/731<br />

5. Nets and coalitions 3. Coalition Formation<br />

Figure 26: Comparing CS-Search-1 with SPLIT.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 398/731<br />

5. Nets and coalitions 3. Coalition Formation<br />

1 Is CS-Search-1 the best anytime algorithm?<br />

2 The search for best k for n ′ > n is perhaps not<br />

the same search to get best k for n.<br />

3 CS-Search-1 does not use any information<br />

while searching. Perhaps k can be made<br />

smaller by not only considering Val(CS<br />

CS) but<br />

also v S in the searched CS ′ .


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 399/731<br />

5. Nets and coalitions 4. Payoff Division<br />

5.4 Payoff Division


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 400/731<br />

5. Nets and coalitions 4. Payoff Division<br />

We assume now that games are superadditive,<br />

therefore the grand coalition will be formed.<br />

The payoff division should be fair between the<br />

agents, otherwise they leave the coalition.<br />

Definition 5.30 (Dummies, Interchangeable)<br />

Agent i is called a dummy, if<br />

for all coalitions S with i ∉ S: v S∪{i} − v S = v {i} .<br />

Agents i and j are called interchangeable, if<br />

for all coalitions S with i ∈ S and j ∉ S: v S\{i}∪{j} = v S


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 401/731<br />

5. Nets and coalitions 4. Payoff Division<br />

Three axioms:<br />

Symmetry: If i and j are interchangeable, then<br />

x i = x j .<br />

Dummies: For all dummies i: x i = v {i} .<br />

Additivity: For any two games v, w:<br />

x v⊕w<br />

i<br />

= x v i + x w i ,<br />

where v ⊕ w denotes the game defined<br />

by (v v ⊕ w) S = v S + w S .


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 402/731<br />

5. Nets and coalitions 4. Payoff Division<br />

Theorem 5.31 (Shapley-Value)<br />

There is only one payoff division satisfying the above three<br />

axioms. It is called the Shapley value of agent i and is<br />

defined by<br />

x i = 1<br />

|A|!<br />

∑<br />

(|A| − |S| − 1)!|S|!(v S∪{i} − v S )<br />

S⊆A<br />

(|A| − S)! is the number of all possible joining orders of the<br />

agents (to form a coalition).<br />

(v S∪{i} − v S ) is i’s marginal contribution when added to set S.<br />

There are |S|! ways for S to be built before i’s joining. There are<br />

(|A| − |S| − 1)! ways for the remaining agents to form S (after i).<br />

The Shapley value sums up the marginal contributions of agent i<br />

averaged over all joining orders.<br />

An expected gain can be computed by taking a random joining<br />

order and computing the Shapley value.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 403/731<br />

5. Nets and coalitions 5. References<br />

5.5 References


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 404/731<br />

5. Nets and coalitions 5. References<br />

[AnderssonS98] Andersson, M. and T. Sandholm (1998).<br />

Sequencing of contract types for anytime task<br />

reallocation.<br />

In AMET, pp. 54–69.<br />

[AnderssonS98] Andersson, M. and T. Sandholm (2000).<br />

Contract type sequencing for reallocative<br />

negotiation.<br />

In ICDCS, pp. 154–160.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 405/731<br />

5. Nets and coalitions 5. References<br />

[SandholmLAST98] Sandholm, T., K. Larson,<br />

M. Andersson, O. Shehory, and F. Tohmé (1998).<br />

Anytime coalition structure generation with worst<br />

case guarantees.<br />

In AAAI/IAAI, pp. 46–53.<br />

[SandholmLAST99] Sandholm, T., K. Larson,<br />

M. Andersson, O. Shehory, and F. Tohmé (1999).<br />

Coalition structure generation with worst case<br />

guarantees.<br />

Artif. Intell. 111(1-2), 209–238.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 406/731<br />

6. Propositional Logic<br />

Chapter 6. Propositional Logic<br />

Propositional Logic<br />

6.1 Why Logic?<br />

6.2 Sentential Logic<br />

6.3 Sudoku<br />

6.4 Calculi for SL<br />

6.5 Wumpus in SL


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 407/731<br />

6. Propositional Logic<br />

We make the case for using formal logic as a<br />

representation formalism for reasoning about the<br />

world.<br />

We present classical propositional logic to introduce<br />

the standard language and formalism.<br />

The semantics of propositional logic is the basis of all<br />

other logics. It can be used to model many things: we<br />

show its versatility by modeling Sudoku-puzzles.<br />

We also describe two calculi for this logic and consider<br />

briefly correctness and completeness issues.<br />

We illustrate how to use propositional logic with the<br />

well-known Wumpus world.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 408/731<br />

6. Propositional Logic 1. Why Logic?<br />

6.1 Why Logic?


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 409/731<br />

6. Propositional Logic 1. Why Logic?<br />

Why logic at all?<br />

framework for thinking about systems<br />

makes one realise many assumptions<br />

. . . and then we can:<br />

investigate them, accept or reject them<br />

relax some of them and still use a part of the<br />

formal and conceptual machinery


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 410/731<br />

6. Propositional Logic 1. Why Logic?<br />

Why logic at all?<br />

verification: check specification against<br />

implementation<br />

executable specification<br />

planning as model checking


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 411/731<br />

6. Propositional Logic 1. Why Logic?<br />

Symbolic AI: Symbolic representation,<br />

e.g. sentential or first order logic.<br />

Agent as a theorem prover.<br />

Traditional: Theory about agents.<br />

Implementation as stepwise process<br />

(Software Engineering) over many<br />

abstractions.<br />

Symbolic AI: View the theory itself as<br />

executable specification.<br />

Internal state: Knowledge Base (KB),<br />

often simply called D (database).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 412/731<br />

6. Propositional Logic 1. Why Logic?<br />

Our running example for propositional logic is The<br />

Wumpus-World.


¤<br />

¢<br />

£<br />

¡<br />

¡<br />

¢<br />

¤<br />

£<br />

¡<br />

£<br />

¤<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 413/731<br />

¤<br />

£<br />

¡<br />

¢<br />

¢<br />

£<br />

¡<br />

¡<br />

¢<br />

¡<br />

6. Propositional Logic 1. Why Logic?<br />

1,4 2,4 3,4 4,4<br />

1,3 2,3 3,3 4,3<br />

1,2 2,2 3,2 4,2<br />

OK<br />

1,1 2,1 3,1 4,1<br />

A<br />

OK<br />

OK<br />

¥<br />

(a)<br />

1,4 2,4 3,4 4,4<br />

1,3 2,3 3,3 4,3<br />

W!<br />

1,2<br />

A<br />

2,2 3,2 4,2<br />

S<br />

OK OK<br />

1,1 2,1 3,1 4,1<br />

B P!<br />

£<br />

V V<br />

OK OK<br />

¥<br />

(a)<br />

A = Agent<br />

B = Breeze<br />

G = Glitter, Gold<br />

OK = Safe square<br />

P = Pit<br />

S = Stench<br />

V = Visited<br />

W = Wumpus<br />

¢<br />

A = Agent<br />

B = Breeze<br />

G = Glitter, Gold<br />

OK = Safe square<br />

P = Pit<br />

S = Stench<br />

V = Visited<br />

W = Wumpus<br />

1,4 2,4 3,4 4,4<br />

1,3 2,3 3,3 4,3<br />

1,2 2,2 3,2 4,2<br />

P?<br />

OK<br />

1,1 2,1 3,1 4,1<br />

A P?<br />

¤<br />

V B<br />

OK OK<br />

¥<br />

(b)<br />

1,4 2,4 3,4 4,4<br />

P?<br />

1,3<br />

W!<br />

2,3<br />

A<br />

3,3<br />

P?<br />

4,3<br />

S G<br />

B<br />

1,2 2,2 3,2 4,2<br />

S<br />

£<br />

V V<br />

OK OK<br />

1,1 2,1 3,1 4,1<br />

B P!<br />

£<br />

V V<br />

OK OK<br />

(b)


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 414/731<br />

6. Propositional Logic 2. Sentential Logic<br />

6.2 Sentential Logic


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 415/731<br />

6. Propositional Logic 2. Sentential Logic<br />

Definition 6.1 (Sent. Logic L SL , Language L ⊆ L SL )<br />

The language L SL of propositional (or sentential) logic<br />

consists of<br />

□ and ⊤: falsum and verum,<br />

p, q, r, x 1 , x 2 , . . . x n , . . .: a countable set AT of<br />

SL-constants,<br />

¬, ∧, ∨, →: the sentential connectives (¬ is unary, all<br />

others are binary operators),<br />

(, ): the parantheses to help readability.<br />

Generally we consider only a finite set of SL-constants.<br />

They define a language L ⊆ L SL . The set of L-formulae<br />

F ml L is defined inductively.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 416/731<br />

6. Propositional Logic 2. Sentential Logic<br />

Definition 6.2 (Semantics, Valuation, Model)<br />

A valuation v for a language L ⊆ L SL is a mapping from<br />

the set of SL-constants defined through L and {⊤, □} into<br />

the set {true, false} with v(□) = false, v(⊤) = true.<br />

Each valuation v can be uniquely extended to a<br />

function ¯v : F ml L → {true, false} so that:<br />

{<br />

true, if ¯v(p) = false,<br />

¯v(¬p) =<br />

false, if ¯v(p) = true.<br />

{<br />

true, if ¯v(ϕ) = true and ¯v(γ) = true,<br />

¯v(ϕ ∧ γ) =<br />

false, else<br />

{<br />

true, if ¯v(ϕ) = true or ¯v(γ) = true,<br />

¯v(ϕ ∨ γ) =<br />

false, else


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 417/731<br />

6. Propositional Logic 2. Sentential Logic<br />

Definition (continued)<br />

¯v(ϕ → γ) =<br />

{<br />

true, if ¯v(ϕ) = false or (¯v(ϕ) = true and ¯v(γ) = true),<br />

false, else<br />

Thus each valuation v uniquely defines a ¯v. We call ¯v<br />

L-structure or model A v . From now in we will speak of<br />

models and valuations.<br />

A model determines for each formula if it is true or false.<br />

The process of mapping a set of L-formulae into<br />

{true, false} is called semantics.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 418/731<br />

6. Propositional Logic 2. Sentential Logic<br />

Definition 6.3 (Validity of a Formula, Tautology)<br />

1 A formula ϕ ∈ F ml L holds under the<br />

valuation v if ¯v(ϕ) = true. We also write<br />

¯v |= ϕ or simply v |= ϕ.<br />

2 A theory is a set of formulae: T ⊆ F ml L . v<br />

satisfies T if ¯v(ϕ) = true for all ϕ ⊆ T . We<br />

write v |= T .<br />

3 A L-formula ϕ is called L-tautology if for all<br />

possible valuations (models) v in L v |= ϕ<br />

holds.<br />

From now on we suppress the language L, because it is<br />

obvious from context. Nevertheless it needs to be carefully<br />

defined.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 419/731<br />

6. Propositional Logic 2. Sentential Logic<br />

Definition 6.4 (Consequence Set Cn(T ))<br />

A formula ϕ results from T if for all models v<br />

with v |= T also v |= ϕ holds. We write: T |= ϕ.<br />

We call<br />

Cn L (T ) = def {ϕ ∈ F ml L : T |= ϕ},<br />

or simply Cn(T ), the semantic consequence<br />

operator.


6. Propositional Logic 2. Sentential Logic<br />

Lemma 6.5 (Properties of Cn(T ))<br />

The semantic consequence operator has the following<br />

properties:<br />

1 T -expansion: T ⊆ Cn(T ),<br />

2 Monotony: T ⊆ T ′ ⇒ Cn(T ) ⊆ Cn(T ′ ),<br />

3 Closure: Cn(Cn(T )) = Cn(T ).<br />

Lemma 6.6 (ϕ ∉ Cn(T))<br />

ϕ ∉ Cn(T ) if and only if there is a model v with v |=<br />

T and ¯v(ϕ) = false.<br />

rof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 420/731


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 421/731<br />

6. Propositional Logic 2. Sentential Logic<br />

Definition 6.7 (MOD(T), Cn(U))<br />

If T ⊆ F ml L then we denote with MOD(T ) the set of all<br />

L-structures A which are models of T :<br />

MOD(T ) = def {A : A |= T }.<br />

If U is a set of models, we consider all those sentences,<br />

which are valid in all models of U. We call this set Cn(U):<br />

Cn(U) = def {ϕ ∈ F ml L : ∀v ∈ U : ¯v(ϕ) = true}.<br />

MOD is obviously dual to Cn:<br />

Cn(MOD(T )) = Cn(T ), MOD(Cn(T )) = MOD(T ).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 422/731<br />

6. Propositional Logic 2. Sentential Logic<br />

Definition 6.8 (Completeness of a Theory T )<br />

T is called complete if for each formula ϕ ∈ F ml: T |= ϕ or<br />

T |= ¬ϕ holds.<br />

Attention:<br />

Do not mix up this last condition with the property of a<br />

valuation (model) v: each model is complete in the<br />

above sense.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 423/731<br />

6. Propositional Logic 2. Sentential Logic<br />

Definition 6.9 (Consistency of a Theory)<br />

T is called consistent if there is a valuation (model) v with<br />

¯v(ϕ) = true for all ϕ ∈ T .<br />

Lemma 6.10 (Ex Falso Quodlibet)<br />

T is consistent if and only if Cn(T ) ≠ F ml L .


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 424/731<br />

6. Propositional Logic 3. Sudoku<br />

6.3 Sudoku


6. Propositional Logic 3. Sudoku<br />

Since some time, Sudoku puzzles are becoming<br />

quite famous.<br />

Table 3: A simple Sudoku (S 1)<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 425/731


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 426/731<br />

6. Propositional Logic 3. Sudoku<br />

Can they be solved with sentential logic?<br />

Idea: Given a Sudoku-Puzzle S, construct a<br />

language L Sudoku and a theory T S ⊆ F ml LSudoku<br />

such that<br />

MOD(T S ) = Solutions of the puzzle S<br />

Solution<br />

In fact, we construct a theory T Sudoku and for<br />

each (partial) instance of a 9 × 9 puzzle S a<br />

particular theory T S such that<br />

MOD(T Sudoku ∪ T S ) = {S : S is a solution of S}


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 427/731<br />

6. Propositional Logic 3. Sudoku<br />

We introduce the following language L Sudoku :<br />

1 eins i,j , 1 ≤ i, j ≤ 9,<br />

2 zwei i,j , 1 ≤ i, j ≤ 9,<br />

3 drei i,j , 1 ≤ i, j ≤ 9,<br />

4 vier i,j , 1 ≤ i, j ≤ 9,<br />

5 fuenf i,j , 1 ≤ i, j ≤ 9,<br />

6 sechs i,j , 1 ≤ i, j ≤ 9,<br />

7 sieben i,j , 1 ≤ i, j ≤ 9,<br />

8 acht i,j , 1 ≤ i, j ≤ 9,<br />

9 neun i,j , 1 ≤ i, j ≤ 9.<br />

This completes the language, the syntax.<br />

How many symbols are these?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 428/731<br />

6. Propositional Logic 3. Sudoku<br />

We distinguished between the puzzle S and a<br />

solution S of it.<br />

What is a model (or valuation) in the sense of<br />

Definition 6.2?<br />

Table 4: How to construct a model S?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 429/731<br />

6. Propositional Logic 3. Sudoku<br />

We have to give our symbols a meaning: the<br />

semantics!<br />

eins i,j means i, j contains a 1<br />

zwei i,j means i, j contains a 2<br />

.<br />

neun i,j means i, j contains a 9<br />

To be precise: given a 9 × 9 square that is<br />

completely filled in, we define our valuation v as<br />

follows (for all 1 ≤ i, j ≤ 9).<br />

{ true, if 1 is at position (i, j),<br />

v(eins i,j ) =<br />

false, else .


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 430/731<br />

6. Propositional Logic 3. Sudoku<br />

{ true, if 2 is at position (i, j),<br />

v(zwei i,j ) =<br />

false, else .<br />

{ true, if 3 is at position (i, j),<br />

v(drei i,j ) =<br />

false, else .<br />

{ true, if 4 is at position (i, j),<br />

v(vier i,j ) =<br />

false, else .<br />

usw.<br />

{ true, if 9 is at position (i, j),<br />

v(neun i,j ) =<br />

false, else .<br />

Therefore any 9 × 9 square can be seen as a<br />

model or valuation with respect to the language<br />

L Sudoku .


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 431/731<br />

6. Propositional Logic 3. Sudoku<br />

How does T S look like?<br />

T S = { eins 1,4 , eins 5,8 , eins 6,6 ,<br />

zwei 2,2 , zwei 4,8 ,<br />

drei 6,8 , drei 8,3 , drei 9,4 ,<br />

vier 1,7 , vier 2,5 , vier 3,1 , vier 4,3 , vier 8,2 , vier 9,8 ,<br />

}<br />

.<br />

neun 3,4 , neun 5,2 , neun 6,9 ,


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 432/731<br />

6. Propositional Logic 3. Sudoku<br />

How should the theory T Sudoku look like (s.t.<br />

models of T Sudoku ∪ T S correspond to solutions of the<br />

puzzle)?<br />

First square: T 1<br />

1 eins 1,1 ∨ . . . ∨ eins 3,3<br />

2 zwei 1,1 ∨ . . . ∨ zwei 3,3<br />

3 drei 1,1 ∨ . . . ∨ drei 3,3<br />

4 vier 1,1 ∨ . . . ∨ vier 3,3<br />

5 fuenf 1,1 ∨ . . . ∨ fuenf 3,3<br />

6 sechs 1,1 ∨ . . . ∨ sechs 3,3<br />

7 sieben 1,1 ∨ . . . ∨ sieben 3,3<br />

8 acht 1,1 ∨ . . . ∨ acht 3,3<br />

9 neun 1,1 ∨ . . . ∨ neun 3,3


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 433/731<br />

6. Propositional Logic 3. Sudoku<br />

The formulae on the last slide are saying, that<br />

1 The number 1 must appear somewhere in the<br />

first square.<br />

2 The number 2 must appear somewhere in the<br />

first square.<br />

3 The number 3 must appear somewhere in the<br />

first square.<br />

4 etc<br />

Does that mean, that each number 1, . . . , 9<br />

occurs exactly once in the first square?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 434/731<br />

6. Propositional Logic 3. Sudoku<br />

No! We have to say, that each number occurs<br />

only once:<br />

T ′ 1:<br />

1 ¬(eins i,j ∧ zwei i,j ), 1 ≤ i, j ≤ 3,<br />

2 ¬(eins i,j ∧ drei i,j ), 1 ≤ i, j ≤ 3,<br />

3 ¬(eins i,j ∧ vier i,j ), 1 ≤ i, j ≤ 3,<br />

4 etc<br />

5 ¬(zwei i,j ∧ drei i,j ), 1 ≤ i, j ≤ 3,<br />

6 ¬(zwei i,j ∧ vier i,j ), 1 ≤ i, j ≤ 3,<br />

7 ¬(zwei i,j ∧ fuenf i,j ), 1 ≤ i, j ≤ 3,<br />

8 etc<br />

How many formulae are these?


6. Propositional Logic 3. Sudoku<br />

Second square: T 2<br />

1 eins 1,4 ∨ . . . ∨ eins 3,6<br />

2 zwei 1,4 ∨ . . . ∨ zwei 3,6<br />

3 drei 1,4 ∨ . . . ∨ drei 3,6<br />

4 vier 1,4 ∨ . . . ∨ vier 3,6<br />

5 fuenf 1,4 ∨ . . . ∨ fuenf 3,6<br />

6 sechs 1,4 ∨ . . . ∨ sechs 3,6<br />

7 sieben 1,4 ∨ . . . ∨ sieben 3,6<br />

8 acht 1,4 ∨ . . . ∨ acht 3,6<br />

9 neun 1,4 ∨ . . . ∨ neun 3,6<br />

And all the other formulae from the previous<br />

slides (adapted to this case): T ′ 2<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 435/731


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 436/731<br />

6. Propositional Logic 3. Sudoku<br />

The same has to be done for all 9 squares.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 437/731<br />

6. Propositional Logic 3. Sudoku<br />

What is still missing:<br />

Rows: Each row should contain exactly the<br />

numbers from 1 to 9 (no number<br />

twice).<br />

Columns: Each column should contain exactly<br />

the numbers from 1 to 9 (no number<br />

twice).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 438/731<br />

6. Propositional Logic 3. Sudoku<br />

First Row: T Row 1<br />

1 eins 1,1 ∨ eins 1,2 ∨ . . . ∨ eins 1,9<br />

2 zwei 1,1 ∨ zwei 1,2 ∨ . . . ∨ zwei 1,9<br />

3 drei 1,1 ∨ drei 1,2 ∨ . . . ∨ drei 1,9<br />

4 vier 1,1 ∨ vier 1,2 ∨ . . . ∨ vier 1,9<br />

5 fuenf 1,1 ∨ fuenf 1,2 ∨ . . . ∨ fuenf 1,9<br />

6 sechs 1,1 ∨ sechs 1,2 ∨ . . . ∨ sechs 1,9<br />

7 sieben 1,1 ∨ sieben 1,2 ∨ . . . ∨ sieben 1,9<br />

8 acht 1,1 ∨ acht 1,2 ∨ . . . ∨ acht 1,9<br />

9 neun 1,1 ∨ neun 1,2 ∨ . . . ∨ neun 1,9


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 439/731<br />

6. Propositional Logic 3. Sudoku<br />

Analogously for all other rows, eg.<br />

Ninth Row: T Row 9<br />

1 eins 9,1 ∨ eins 9,2 ∨ . . . ∨ eins 9,9<br />

2 zwei 9,1 ∨ zwei 9,2 ∨ . . . ∨ zwei 9,9<br />

3 drei 9,1 ∨ drei 9,2 ∨ . . . ∨ drei 9,9<br />

4 vier 9,1 ∨ vier 9,2 ∨ . . . ∨ vier 9,9<br />

5 fuenf 9,1 ∨ fuenf 9,2 ∨ . . . ∨ fuenf 9,9<br />

6 sechs 9,1 ∨ sechs 9,2 ∨ . . . ∨ sechs 9,9<br />

7 sieben 9,1 ∨ sieben 9,2 ∨ . . . ∨ sieben 9,9<br />

8 acht 9,1 ∨ acht 9,2 ∨ . . . ∨ acht 9,9<br />

9 neun 9,1 ∨ neun 9,2 ∨ . . . ∨ neun 9,9<br />

Is that sufficient? What if a row contains<br />

several 1's?


6. Propositional Logic 3. Sudoku<br />

First Column: T Column 1<br />

1 eins 1,1 ∨ eins 2,1 ∨ . . . ∨ eins 9,1<br />

2 zwei 1,1 ∨ zwei 2,1 ∨ . . . ∨ zwei 9,1<br />

3 drei 1,1 ∨ drei 2,1 ∨ . . . ∨ drei 9,1<br />

4 vier 1,1 ∨ vier 2,1 ∨ . . . ∨ vier 9,1<br />

5 fuenf 1,1 ∨ fuenf 2,1 ∨ . . . ∨ fuenf 9,1<br />

6 sechs 1,1 ∨ sechs 2,1 ∨ . . . ∨ sechs 9,1<br />

7 sieben 1,1 ∨ sieben 2,1 ∨ . . . ∨ sieben 9,1<br />

8 acht 1,1 ∨ acht 2,1 ∨ . . . ∨ acht 9,1<br />

9 neun 1,1 ∨ neun 2,1 ∨ . . . ∨ neun 9,1<br />

Analogously for all other columns.<br />

Is that sufficient? What if a column contains<br />

several 1's?<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 440/731


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 441/731<br />

6. Propositional Logic 3. Sudoku<br />

All put together:<br />

T Sudoku = T 1 ∪ T ′ 1 ∪ . . . ∪ T 9 ∪ T ′ 9<br />

T Row 1 ∪ . . . ∪ T Row 9<br />

T Column 1 ∪ . . . ∪ T Column 9


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 442/731<br />

6. Propositional Logic 3. Sudoku<br />

Here is a more difficult one.<br />

Table 5: A difficult Sudoku S schwer


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 443/731<br />

6. Propositional Logic 3. Sudoku<br />

The above formulation is strictly formulated<br />

in propositional logic.<br />

Theorem provers, even if they consider only<br />

propositional theories, often use predicates,<br />

variables etc.<br />

smodels uses a predicate logic formulation,<br />

including variables. But as there are no<br />

function symbols, such an input can be seen<br />

as a compact representation.<br />

It allows to use a few rules as a shorthand for<br />

thousands of rules using propositional<br />

constants.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 444/731<br />

6. Propositional Logic 3. Sudoku<br />

For example smodels uses the following<br />

constructs:<br />

1 row(0..8) is a shorthand for row(0),<br />

row(1), ..., row(8).<br />

2 val(1..9) is a shorthand for val(1),<br />

val(2), ..., val(9).<br />

3 The constants 1, ..., 9 will be treated as<br />

numbers (so there are operations available to<br />

add, subtract or divide them).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 445/731<br />

6. Propositional Logic 3. Sudoku<br />

1 Statements in smodels are written as<br />

head :- body<br />

This corresponds to an implication<br />

body → head.<br />

2 An important feature in smodels is that all<br />

atoms that do not occur in any head, are<br />

automatically false.<br />

For example the theory<br />

p(X, Y, 5) :- row(X), col(Y)<br />

means that the whole grid is filled with 5’s<br />

and only with 5's: eg. ¬p(X, Y, 1) is true for all<br />

X, Y , as well as ¬p(X, Y, 2) etc.


6. Propositional Logic 3. Sudoku<br />

More constructs in smodels<br />

1 1 { p(X,Y,A) : val(A) } 1<br />

:- row(X), col(Y)<br />

this makes sure that in all entries of the grid,<br />

exactly one number (val()) is contained.<br />

2 1 { p(X,Y,A) : row(X) : col(Y)<br />

: eq(div(X,3), div(R,3))<br />

: eq(div(Y,3), div(C,3) } 1<br />

:- val(A), row(R), col(C)<br />

this rule ensures that in each of the 9 squares<br />

each number from 1 to 9 occurs only once.<br />

3 More detailed info is on the web-page of this<br />

lecture.<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 446/731


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 447/731<br />

6. Propositional Logic 4. Calculi for SL<br />

6.4 Calculi for SL


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 448/731<br />

6. Propositional Logic 4. Calculi for SL<br />

Definition 6.11 (Axiom, Inference Rule)<br />

Axioms in SL are the following formulae:<br />

1 φ → ⊤, □ → φ, ¬⊤ → □, □ → ¬⊤,<br />

2 (φ ∧ ψ) → φ, (φ ∧ ψ) → ψ,<br />

3 φ → (φ ∨ ψ), ψ → (φ ∨ ψ),<br />

4 ¬¬φ → φ, (φ → ψ) → ((φ → ¬ψ) → ¬φ),<br />

5 φ → (ψ → φ), φ → (ψ → (φ ∧ ψ)).<br />

Note that φ, ψ stand for arbitrarily complex<br />

formulae (not just constants).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 449/731<br />

6. Propositional Logic 4. Calculi for SL<br />

Definition (continued)<br />

The only inference rule in SL is modus ponens:<br />

MP : F ml × F ml → F ml : (ϕ, ϕ → ψ) ↦→ ψ.<br />

or short<br />

(MP) ϕ, ϕ → ψ .<br />

ψ<br />

(ϕ, ψ are arbitrary complex formulae).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 450/731<br />

6. Propositional Logic 4. Calculi for SL<br />

Definition 6.12 (Proof)<br />

A proof of a formula ϕ from a theory T ⊆ F ml L<br />

is a sequence ϕ 1 , . . . , ϕ n of formulae such that<br />

ϕ n = ϕ and for all i with 1 ≤ i ≤ n one of the<br />

following conditions holds:<br />

ϕ i is substitution instance of an axiom,<br />

ϕ i ∈ T ,<br />

there is ϕ l , ϕ k = (ϕ l → ϕ i ) with l, k < i. Then<br />

ϕ i is the result of the application of modus<br />

ponens on the predecessor-formulae of ϕ i .<br />

We write: T ⊢ ϕ (ϕ can be derived from T ).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 451/731<br />

6. Propositional Logic 4. Calculi for SL<br />

We show that:<br />

1 ⊢ ⊤,<br />

2 ⊢ ¬□<br />

3 A ⊢ A ∨ B,<br />

4 ⊢ A ∨ ¬A,<br />

5 the rule<br />

A → ϕ, ¬A → ψ<br />

(R)<br />

ϕ ∨ ψ<br />

can be derived.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 452/731<br />

6. Propositional Logic 4. Calculi for SL<br />

Theorem 6.13 (Completeness)<br />

A formula follows semantically from a theory T if<br />

and only if it can be derived:<br />

T |= ϕ if and only if T ⊢ ϕ<br />

Theorem 6.14 (Compactness)<br />

A formula semantically follows from a theory T if<br />

and only if it already follows from a finite subset<br />

of T :<br />

Cn(T ) = ⋃ {Cn(T ′ ) : T ′ ⊆ T, T ′ finite}.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 453/731<br />

6. Propositional Logic 4. Calculi for SL<br />

Although the axioms from above and modus ponens<br />

suffice it is reasonable to consider more general systems.<br />

Therefore we introduce the following term:<br />

Definition 6.15 (Rule System MP + D)<br />

Let D be a set of general inference rules, e.g. mappings,<br />

which assign a formula ψ to a finite set of formulae<br />

ϕ 1 , ϕ 2 , . . . , ϕ n . We write<br />

ϕ 1 , ϕ 2 , . . . , ϕ n<br />

.<br />

ψ<br />

MP + D is the rule systems which emerges from adding<br />

the rules in D to modus ponens. For W ⊆ F ml be<br />

Cn D (W )<br />

in the following the set of all formulae ϕ, which can be<br />

derived from W and the inference rules from MP+D.


6. Propositional Logic 4. Calculi for SL<br />

We bear in mind that Cn(W ) is defined semantically but<br />

Cn D (W ) is defined syntactically (using the notion of<br />

proof). Both sets are equal according to the<br />

completeness-theorem in the special case D = ∅.<br />

Lemma 6.16 (Properties of Cn D )<br />

D be a set of general inference rules and W ⊆ F ml. Then:<br />

1 Cn(W ) ⊆ Cn D (W ).<br />

2 Cn D (Cn D (W )) = Cn D (W ).<br />

3 Cn D (W ) is the smallest set which is closed in respect to<br />

D and contains W .<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 454/731


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 455/731<br />

6. Propositional Logic 4. Calculi for SL<br />

Question:<br />

What is the difference between an inference rule ϕ and the<br />

ψ<br />

implication ϕ → ψ?<br />

Assume we have a set T of formulae and we choose two<br />

constants p, q ∈ L. We could either consider<br />

(1) T together with MP and { p q }<br />

or<br />

(2) T ∪ {p → q} together with MP


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 456/731<br />

6. Propositional Logic 4. Calculi for SL<br />

1. Case: Cn { p q } (T ),<br />

2. Case: Cn(T ∪ {p → q}).<br />

If T = {¬q}, then we have in (2):<br />

¬p ∈ Cn(T ∪ {p → q}), but not in (1).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 457/731<br />

6. Propositional Logic 4. Calculi for SL<br />

It is well-known, that any formula φ can be<br />

written as a conjunction of disjunctions<br />

n∧ ∨m i<br />

i=1 j=1<br />

φ i,j<br />

The φ i,j are just constants or negated constants.<br />

The n disjunctions ∨ m i<br />

j=1 φ i,j are called clauses of<br />

φ.<br />

Normalform<br />

Instead of working on arbitrary formulae, it is<br />

sometimes easier to work on finite sets of<br />

clauses.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 458/731<br />

6. Propositional Logic 4. Calculi for SL<br />

A resolution calculus for SL<br />

Given be a set M of clauses of the form<br />

A ∨ ¬B ∨ C ∨ . . . ∨ ¬E<br />

Such a clause is also written as the set<br />

{A, ¬B, C, . . . , ¬E}.<br />

We define the following inference rule:<br />

Definition 6.17 (SL resolution)<br />

Deduce the clause C 1 ∪ C 2 from C 1 ∪ {A} and C 2 ∪ {¬A}.<br />

Question:<br />

Is this calculus correct and complete?


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 459/731<br />

6. Propositional Logic 4. Calculi for SL<br />

Answer:<br />

No!<br />

But every problem of the kind “T |= φ” is equivalent to<br />

“T ∪ {¬φ} is unsatisfiable”<br />

or rather to<br />

T ∪ {¬φ} ⊢ □<br />

(⊢ stands for the calculus introduced above).<br />

Theorem 6.18 (Completeness of Resolution Refutation)<br />

If M is an unsatisfiable set of clauses then the empty clause<br />

□ can be derived from M using only the resolution rule.<br />

We also say that resolution is refutation complete.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 460/731<br />

6. Propositional Logic 5. Wumpus in SL<br />

6.5 Wumpus in SL


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 461/731<br />

6. Propositional Logic 5. Wumpus in SL<br />

4<br />

Stench<br />

Breeze<br />

PIT<br />

3<br />

Breeze<br />

Stench<br />

PIT<br />

Breeze<br />

Gold<br />

2<br />

Stench<br />

Breeze<br />

1<br />

Breeze<br />

PIT<br />

Breeze<br />

START<br />

1 2 3 4


¡<br />

¢<br />

¤<br />

£<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 462/731<br />

¢<br />

¡<br />

¢<br />

6. Propositional Logic 5. Wumpus in SL<br />

1,4 2,4 3,4 4,4<br />

1,3 2,3 3,3 4,3<br />

1,2 2,2 3,2 4,2<br />

OK<br />

1,1 2,1 3,1 4,1<br />

A<br />

OK<br />

OK<br />

¥<br />

(a)<br />

A = Agent<br />

B = Breeze<br />

G = Glitter, Gold<br />

OK = Safe square<br />

P = Pit<br />

S = Stench<br />

V = Visited<br />

W = Wumpus<br />

1,4 2,4 3,4 4,4<br />

1,3 2,3 3,3 4,3<br />

1,2 2,2 3,2 4,2<br />

P?<br />

OK<br />

1,1 2,1 3,1 4,1<br />

A P?<br />

¤<br />

V B<br />

OK OK<br />

¥<br />

(b)


¤<br />

¢<br />

£<br />

¡<br />

¡<br />

£<br />

¤<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 463/731<br />

¤<br />

£<br />

¡<br />

¢<br />

£<br />

¡<br />

¡<br />

6. Propositional Logic 5. Wumpus in SL<br />

1,4 2,4 3,4 4,4<br />

1,3 2,3 3,3 4,3<br />

W!<br />

1,2 2,2 3,2 4,2<br />

A<br />

S<br />

OK<br />

OK<br />

1,1 2,1 3,1 4,1<br />

B P!<br />

£<br />

V V<br />

OK OK<br />

¥<br />

(a)<br />

¢<br />

A = Agent<br />

B = Breeze<br />

G = Glitter, Gold<br />

OK = Safe square<br />

P = Pit<br />

S = Stench<br />

V = Visited<br />

W = Wumpus<br />

1,4 2,4 3,4 4,4<br />

P?<br />

1,3<br />

W!<br />

2,3<br />

A<br />

3,3<br />

P?<br />

4,3<br />

S G<br />

B<br />

1,2 2,2 3,2 4,2<br />

S<br />

£<br />

V V<br />

OK OK<br />

1,1 2,1 3,1 4,1<br />

B P!<br />

£<br />

V V<br />

OK OK<br />

(b)


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 464/731<br />

6. Propositional Logic 5. Wumpus in SL<br />

Language definition:<br />

S i,j stench<br />

B i,j breeze<br />

P it i,j is a pit<br />

Gl i,j glitters<br />

contains Wumpus<br />

W i,j<br />

General knowledge:<br />

¬S 1,1 −→ (¬W 1,1 ∧ ¬W 1,2 ∧ ¬W 2,1 )<br />

¬S 2,1 −→ (¬W 1,1 ∧ ¬W 2,1 ∧ ¬W 2,2 ∧ ¬W 3,1 )<br />

¬S 1,2 −→ (¬W 1,1 ∧ ¬W 1,2 ∧ ¬W 2,2 ∧ ¬W 1,3 )<br />

S 1,2 −→ (W 1,3 ∨ W 1,2 ∨ W 2,2 ∨ W 1,1 )


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 465/731<br />

6. Propositional Logic 5. Wumpus in SL<br />

Knowledge after the 3rd move:<br />

¬S 1,1 ∧ ¬S 2,1 ∧ S 1,2 ∧ ¬B 1,1 ∧ ¬B 2,1 ∧ ¬B 1,2<br />

Question:<br />

Can we deduce that the wumpus is located at (1,3)?<br />

Answer:<br />

Yes. Either via resolution or using our Hilbert-calculus.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 466/731<br />

6. Propositional Logic 5. Wumpus in SL<br />

Programming versus knowledge engineering<br />

programming<br />

choose language<br />

write program<br />

write compiler<br />

run program<br />

knowledge engineering<br />

choose logic<br />

define knowledge base<br />

implement calculus<br />

derive new facts


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 467/731<br />

7. Modal Logic<br />

Chapter 7. Modal Logic<br />

Modal Logic<br />

7.1 Reasoning about Knowledge<br />

7.2 Kripke Semantics<br />

7.3 Axioms for Modal Logics<br />

7.4 Normative Reasoning<br />

7.5 References


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 468/731<br />

7. Modal Logic<br />

We are extending propositional logic by modality<br />

operators. They can express beliefs and knowledge.<br />

We introduce the semantics of modal logics, based on<br />

Kripke-structures.<br />

Finally we consider variants of modal logics<br />

representing obligations and permissions.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 469/731<br />

7. Modal Logic<br />

Modal logic is an extension of classical logic by<br />

new connectives □ and ♦: necessity and<br />

possibility.<br />

“□p is true” means p is necessarily true, i.e.<br />

true in every possible scenario,<br />

“♦p is true” means p is possibly true, i.e.<br />

true in at least one possible scenario.<br />

Obviously, independently of the precise<br />

definition, the following holds<br />

♦p ↔ ¬□¬p


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 470/731<br />

7. Modal Logic<br />

Various modal logics:<br />

knowledge → epistemic logic,<br />

beliefs → doxastic logic,<br />

obligations → deontic logic,<br />

actions → dynamic logic,<br />

time → temporal logic,<br />

and combinations of the above:<br />

most famous multimodal logics:<br />

BDI logics of beliefs, desires, intentions (and<br />

time).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 471/731<br />

7. Modal Logic<br />

Most of it can be translated to classical logic;<br />

. . . but it looks horribly UGLY there;<br />

. . . and in most cases it’s not automatizable<br />

any more.<br />

Remember Frege’s notation of predicate logic:


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 472/731<br />

7. Modal Logic<br />

But:<br />

MSPASS is a theorem prover implementing<br />

many modal logics,<br />

also description logics, relational calculus, etc<br />

built upon SPASS, a resolution prover for<br />

first-order logic with equality,<br />

check out http:<br />

//www.cs.man.ac.uk/~schmidt/mspass/.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 473/731<br />

7. Modal Logic 1. Reasoning about Knowledge<br />

7.1 Reasoning about Knowledge


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 474/731<br />

7. Modal Logic 1. Reasoning about Knowledge<br />

Example 7.1 (Muddy children – Shoham’s version)<br />

A group of n children enters the house after having played<br />

in the mud outside. They are greeted by their father, who<br />

notices that k of them have mud on their foreheads (no kid<br />

can see whether she herself has a muddy forehead, but<br />

they can see all other foreheads).<br />

Can the kids determine by pure thinking wether they<br />

have a muddy forehead?<br />

The father announces: At least one of you has mud on<br />

her forehead.<br />

He also says If you know (can prove) that your forehead is<br />

muddy, then raise your hands now.<br />

Nothing happens. The father keeps repeating the<br />

question.<br />

After exactly k rounds, all the children with muddy<br />

foreheads raise their hands.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 475/731<br />

7. Modal Logic 1. Reasoning about Knowledge<br />

How is that possible? The announcement of the<br />

father does not reveal anything, or does-it?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 476/731<br />

7. Modal Logic 1. Reasoning about Knowledge<br />

Definition 7.2 (Partition Model)<br />

An n-agent partition model over a language L is a tuple<br />

(W, I 1 , . . . , I n ), where<br />

W: is a set of possible worlds, i.e. a set of<br />

L-structures (each L sentence φ is either true<br />

in each of w ∈ W or not).<br />

I i : each I i is a partition of W:<br />

I i = {W i1 , W i2 , . . . , W ir } with W ij ∩ W ik = ∅ for<br />

j ≠ k and ⋃ 1≤j≤r W i j<br />

= W.<br />

We also use the notation (w ∈ W)<br />

I i (w) := {w ′ : w ∈ W ij and w ′ ∈ W ij }<br />

all worlds in the partition containing world w,<br />

according to agent i’s view of the universe.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 477/731<br />

7. Modal Logic 1. Reasoning about Knowledge<br />

The worlds in W can be propositional valuations<br />

or even first-order structures. In this lecture, we<br />

will mainly consider the propositional version.<br />

The language L in our example consists just of<br />

the propositional constants mud 1 , . . . , mud n .<br />

How can we formalise the notion of one agent<br />

knowing something? And reason about what<br />

agents know and draw conclusions?


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 478/731<br />

7. Modal Logic 1. Reasoning about Knowledge<br />

We introduce new operators K i with the intuitive<br />

meaning K i φ “agent i knows that φ holds”. We<br />

can now formulate statements in a language<br />

L(K 1 , . . . , K n ) containing these operators.<br />

It remains to define a precise semantics for this<br />

notion.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 479/731<br />

7. Modal Logic 1. Reasoning about Knowledge<br />

Definition 7.3 (Semantics for partition models)<br />

Let an n-agent partition model<br />

A = (W, I 1 , . . . , I n ) over a language L be given.<br />

Then we define the relation |= for L(K 1 , . . . , K n )<br />

formulae as follows:<br />

for φ ∈ L: A, w |= φ if and only if w |= φ,<br />

A, w |= K i φ if and only if for all worlds w ′ , if<br />

w ′ ∈ I i (w) then A, w ′ |= φ.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 480/731<br />

7. Modal Logic 1. Reasoning about Knowledge<br />

Muddy children revisited (blackboard).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 481/731<br />

7. Modal Logic 2. Kripke Semantics<br />

7.2 Kripke Semantics


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 482/731<br />

7. Modal Logic 2. Kripke Semantics<br />

A slight generalisation of partition models leads<br />

to modal logic.<br />

How can one look at a partition? It is like a set of<br />

equivalence classes: for agent i, all worlds in<br />

one partition are equivalent. They are all<br />

possible scenarios.<br />

So let’s generalise and introduce a binary<br />

relation R on all worlds: w 1 Rw 2 meaning that<br />

world w 2 can be accessed (is reachable) from<br />

world w 1 .


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 483/731<br />

7. Modal Logic 2. Kripke Semantics<br />

An Example<br />

s<br />

q 0<br />

x=0<br />

q 2<br />

q 1<br />

x=2<br />

x=1<br />

c<br />

x . = 1 → K s x . = 1<br />

x . = 2 → ¬K s x . = 2<br />

x . = 2 → K s ¬x . = 1<br />

x . = 2 → K c K s ¬x . = 1<br />

x . = 2 → ¬K s K c K s ¬x . = 1


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 484/731<br />

7. Modal Logic 2. Kripke Semantics<br />

Definition 7.4 (Modal Logic with n modalities)<br />

The language L modaln of modal logic with n<br />

modal operators □ 1 , . . . , □ n is the smallest set<br />

containing the propositional constants of L, and<br />

with formulae φ, ψ also the formulae<br />

□ i φ, ¬φ, φ ∧ ψ. We treat ∨, →, ↔, ♦ as macros<br />

(defined as usual).<br />

Note that the □ operators can be nested:<br />

(□ 1 □ 2 □ 1 p) ∨ □ 3 ¬p


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 485/731<br />

7. Modal Logic 2. Kripke Semantics<br />

Definition 7.5 (Semantics of Modal Logic)<br />

The truth of a L modal1 -formula is evaluated relative to a world w and a<br />

Kripke structure 〈W, R〉, where W is a set of (propositional) models<br />

(possible worlds) and R is a binary relation on them, the accessibility<br />

relation.<br />

The relation |= is defined as follows:<br />

〈W, R〉 |= w p if p is primitive and w |= p,<br />

〈W, R〉 |= w φ ∧ ψ if 〈W, R〉 |= w φ and 〈W, R〉 |= w ψ.<br />

〈W, R〉 |= w ¬φ if not 〈W, R〉 |= w φ<br />

〈W, R〉 |= w □φ if for any w ′ ∈ W with wRw ′ : 〈W, R〉 |= w ′ φ


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 486/731<br />

7. Modal Logic 3. Axioms for Modal Logics<br />

7.3 Axioms for Modal Logics


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 487/731<br />

7. Modal Logic 3. Axioms for Modal Logics<br />

As in classical logic, one can ask about a<br />

complete axiom system. Is there a calculus that<br />

allows to derive all sentences true in all Kripke<br />

models?<br />

Definition 7.6 (System K)<br />

The system K is an extension of the propositional<br />

calculus by the axiom<br />

Axiom K (□φ ∧ □(φ → ψ)) → □ψ<br />

and the inference rule<br />

ϕ<br />

(Necessitation)<br />

□ϕ .


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 488/731<br />

7. Modal Logic 3. Axioms for Modal Logics<br />

Theorem 7.7 (Soundness/completeness of System K)<br />

System K is sound and complete with respect to<br />

arbitrary Kripke models.<br />

If we allow n modalities, the theorem as well as<br />

the definitions extend in an obvious way. The<br />

calculus is then called System K n to account for<br />

the n modalities.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 489/731<br />

7. Modal Logic 3. Axioms for Modal Logics<br />

Note that we have not assumed any<br />

properties of the accessibility relation R: it is<br />

just any binary relation.<br />

How does our partition model fit in this<br />

framework?<br />

A partition is nothing else than an<br />

equivalence relation!<br />

Assuming that R is an equivalence relation,<br />

what additional statements (axioms) are true<br />

in all Kripke models?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 490/731<br />

7. Modal Logic 3. Axioms for Modal Logics<br />

To which axioms do the following properties<br />

lead?<br />

Reflexivity: xRx for all x.<br />

Transitivity: xRy and yRz implies xRz for all<br />

x, y, z.<br />

Euclidean: xRy and xRz implies yRz for all for<br />

all x, y, z.<br />

Serial: For all x there is a y with xRy.<br />

Symmetry: For all x and y: xRy implies yRx.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 491/731<br />

7. Modal Logic 3. Axioms for Modal Logics<br />

Lemma 7.8<br />

A binary relation is an equivalence relation if and<br />

only if it is reflexive, transitive and euclidean.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 492/731<br />

7. Modal Logic 3. Axioms for Modal Logics<br />

Definition 7.9 (Extending K by Axioms D, T, 4,5)<br />

The system K is often extended by (a subset of)<br />

the following axioms:<br />

K (K i φ ∧ K i (φ → ψ)) → K i ψ<br />

D ¬K i (ϕ ∧ ¬ϕ)<br />

T K i ϕ → ϕ<br />

4 K i ϕ → K i K i ϕ<br />

5 ¬K i ϕ → K i ¬K i ϕ<br />

called as above by historical reasons. The system<br />

consisting of KT45 is also called S5.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 493/731<br />

7. Modal Logic 3. Axioms for Modal Logics<br />

Theorem 7.10 (Sound/complete Subsystems of KDT45)<br />

Let X be any subset of {D, T, 4, 5, ϕ → K i ¬K i ¬ϕ} and let<br />

X be any subset of<br />

{serial, reflexive, transitive, euclidean, symmetry}<br />

corresponding to X.<br />

Then K ∪ X is sound and complete with respect to Kripke<br />

models the accessibility relation of which satisfies X .<br />

Corollary 7.11 (Sound-, completeness of KT45 (S5))<br />

System KT45 is sound and complete with respect to Kripke<br />

models the accessibility relation of which is reflexive,<br />

transitive and euclidean.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 494/731<br />

7. Modal Logic 3. Axioms for Modal Logics<br />

Exercise: Show that<br />

1 The axiom D follows from KT45.<br />

2 Show that KD45 is not equivalent to K45:<br />

axiom D does not follow from K45.<br />

3 Show that ¬K i ¬ϕ does not follow from<br />

KDT45.<br />

4 Show that K i ϕ → ϕ is not a tautology in K.<br />

5 Show that K i ϕ → K i K i ϕ is not a tautology in<br />

K+K i ϕ → ϕ.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 495/731<br />

7. Modal Logic 3. Axioms for Modal Logics<br />

Up to now we were thinking of K i ϕ (the box<br />

operator □ i ) as agent i knows that ϕ. What if<br />

we interpret the operator as belief?<br />

Under such an interpretation axiom T has to be<br />

dropped. But all other axioms make sense.<br />

Axiom system KD45 is called the standard<br />

logic of beliefs. Axiom K is called logical<br />

omniscience, axiom D is called consistency,<br />

axiom 4 (resp. axiom 5) is called positive<br />

(resp. negative) introspection.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 496/731<br />

7. Modal Logic 4. Normative Reasoning<br />

7.4 Normative Reasoning


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 497/731<br />

7. Modal Logic 4. Normative Reasoning<br />

Deontic Logic is concerned with normative law<br />

and normative reasoning in law. The operators<br />

used denote obligation, permission,<br />

prohibition etc.<br />

We describe two systems: system OS<br />

([vonWright51]) and KD ([aqvist84]).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 498/731<br />

7. Modal Logic 4. Normative Reasoning<br />

Definition 7.12 (System OS)<br />

The system OS is based on two modalities<br />

(deontic operators): O, meaning obligation,<br />

and P meaning permission. It is an extension of<br />

the propositional calculus by the axioms<br />

OS1 Op ↔ ¬P¬p<br />

OS2 Pp ∨ P¬p<br />

OS3 P(p ∨ q) ↔ Pp ∨ Pq<br />

and the inference rule<br />

ϕ ↔ ψ<br />

(OS4)<br />

Pϕ ↔ Pψ .


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 499/731<br />

7. Modal Logic 4. Normative Reasoning<br />

It can be shown that this system can be seen as a<br />

modal logic with O as primitive modality. But<br />

then, because of necessitation, one has to accept<br />

the derivable sentence<br />

(O⊤) O(p ∨ ¬p)<br />

(stating the existence of an empty normative<br />

system): von Wright originally rejected this as an<br />

axiom.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 500/731<br />

7. Modal Logic 4. Normative Reasoning<br />

The KD System<br />

The KD System is a von Wright-type system<br />

including the F (forbidden) operator and<br />

consisting of the following additional axioms<br />

and rules (again the classical axioms and modus<br />

ponens are included).<br />

(KD1) O(p → q) → (Op → Oq)<br />

(KD2) Op → Pp<br />

(KD3) Pp ≡ ¬O¬p<br />

(KD4) Fp ≡ ¬Pp<br />

(KD5) O-necessitation:<br />

p<br />

Op


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 501/731<br />

7. Modal Logic 4. Normative Reasoning<br />

Axiom (KD1) is the so called K-axiom; (KD2) is<br />

the D-axiom, stating that obligatory implies<br />

permitted; (KD3) states that permission is the<br />

dual of obligation and (KD4) says that forbidden<br />

is not permitted. (KD1) holds for any modal<br />

necessity operator.<br />

O is the basic operator (all others are definable<br />

with it). The axioms reflect the idea that<br />

something is obligated if it holds in all perfect<br />

(ideal) worlds (relative to the world where one<br />

is).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 502/731<br />

7. Modal Logic 5. References<br />

7.5 References


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 503/731<br />

7. Modal Logic 5. References<br />

[aqvist84] Åqvist, L. (1984).<br />

Deontic logic.<br />

In D. M. Gabbay and F. Guenther (Eds.), Handbook of<br />

Philosophical Logic, Vol II, pp. 605–714. Reidel.<br />

[Alur et al. 2002] R. Alur, T. A. Henzinger, and<br />

O. Kupferman.<br />

Alternating-time Temporal Logic.<br />

Journal of the ACM, 49:672–713, 2002.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 504/731<br />

7. Modal Logic 5. References<br />

[Broersen et al., 2001a] Broersen, J., Dastani, M., Huang,<br />

Z., and van der Torre, L. (2001a).<br />

The BOID architecture: conflicts between beliefs,<br />

obligations, intentions and desires.<br />

In Müller, J., Andre, E., Sen, S., and Frasson, C.,<br />

editors, Proceedings of the Fifth International<br />

Conference on Autonomous Agents, pages 9–16. ACM<br />

Press.<br />

[Cohen and Levesque, 1990] Cohen, P. and Levesque, H.<br />

(1990).<br />

Intention is choice with commitment.<br />

Artificial Intelligence, 42:213–261.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 505/731<br />

7. Modal Logic 5. References<br />

[Emerson 1990] E. A. Emerson.<br />

Temporal and modal logic.<br />

Handbook of Theoretical Computer Science, volume B,<br />

995–1072. Elsevier, 1990.<br />

[Fagin et al. 1995] Fagin, R., Halpern, J. Y., Moses, Y. &<br />

Vardi, M. Y.<br />

Reasoning about Knowledge.<br />

MIT Press: Cambridge, MA.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 506/731<br />

7. Modal Logic 5. References<br />

[GiunchigliaTraverso00] Fausto Giunchiglia and Paolo<br />

Traverso.<br />

In Susanne Biundo and Maria Fox (Eds.) Recent<br />

Advances in AI Planning, 5th European Conference on<br />

Planning, ECP’99, Durham, UK, September 8-10, 1999,<br />

Proceedings, 1–20, LNCS 1809, Springer 2000.<br />

[HiDBoHoMe98] Hindriks, K. V., F. S. de Boer, H. Hoek,<br />

and J.-J. C. Meyer (1998).<br />

Formal semantics of the core of AGENT-0.<br />

In ECAI’98 Workshop on Practical Reasoning and<br />

Rationality, pp. 20–29.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 507/731<br />

7. Modal Logic 5. References<br />

[Huth00] Huth, M. & Ryan, M.<br />

Logic in Computer Science: Modeling and reasoning<br />

about systems.<br />

Cambridge University Press.<br />

[Jamroga, 2004] Jamroga, W. (2004).<br />

Strategic planning through model checking of ATL<br />

formulae.<br />

In et al., L. R., editor, Artificial Intelligence and Soft<br />

Computing: Proceedings of ICAISC’04, volume 3070 of<br />

Lecture Notes in Computer Science, pages 879–884.<br />

Springer Verlag.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 508/731<br />

7. Modal Logic 5. References<br />

[Jamroga/Dix1] Wojtek Jamroga and Jürgen Dix.<br />

Model Checking Strategic Abilities of Agents under<br />

Incomplete Information.<br />

In Mario Coppo, Elena Lodi and G. Michele Pinna<br />

(Eds.), Proceedings of the Italian Conference on<br />

Theoretical Computer Science (ICTCS ’05), pages<br />

295–308. LNCS 3701. Springer, 2005.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 509/731<br />

7. Modal Logic 5. References<br />

[Jamroga/Dix2] Wojtek Jamroga and Jürgen Dix.<br />

Do Agents Make Model Checking Explode<br />

(Computationally)?<br />

M. Pe(chouc(ek and P. Petta and L.Z. Varga (Eds.),<br />

Proceedings of the 4th International Central and<br />

Eastern European Conference on Multi-Agent<br />

<strong>Systems</strong> (CEEMAS ’05), pages 398-407. LNCS 3690.<br />

Springer, 2005.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 510/731<br />

7. Modal Logic 5. References<br />

[kripke63b] Kripke, S. (1963a).<br />

Semantical analysis of modal logic I. Normal<br />

propositional calculi.<br />

Zeitschrift fur math. Logik und Grundlagen der<br />

Mathematik 9, 67–96.<br />

[kripke63a] Kripke, S. (1963b).<br />

Semantical considerations on modal logic.<br />

Acta Philosophica Fennica 16, 83–94.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 511/731<br />

7. Modal Logic 5. References<br />

[kripke65] Kripke, S. (1965).<br />

Semantical analysis of modal logic II. Non-normal<br />

modal propositional calculi.<br />

In Addison, Henkin, and Tarski (Eds.), The theory of<br />

models, Amsterdam, North-Holland, pp. 206–220.<br />

[Pistore and Traverso, 2001] Pistore, M. and Traverso, P.<br />

(2001).<br />

Planning as model checking for extended goals in<br />

non-deterministic domains.<br />

In Proceedings of IJCAI, pages 479–486.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 512/731<br />

7. Modal Logic 5. References<br />

[Rao and Georgeff1991] Rao, A. S. and M. Georgeff<br />

(1991).<br />

Modeling Rational Agents within a BDI-Architecture.<br />

In J. F. Allen, R. Fikes, and E. Sandewall (Eds.),<br />

Proceedings of the International Conference on<br />

Knowledge Representation and Reasoning, Cambridge,<br />

MA, pp. 473–484. Morgan Kaufmann.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 513/731<br />

7. Modal Logic 5. References<br />

[vonWright51] von Wright, G. H. (1951).<br />

Deontic logic.<br />

Mind 60, 1–15.<br />

Reprinted in G. H. von Wright, Logical Studies, pp.<br />

58–74. Routledge and Kegan Paul, 1957.<br />

[Wooldridge, 2000] Wooldridge, M. (2000).<br />

Reasoning about Rational Agents.<br />

MIT Press : Cambridge, Mass.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 514/731<br />

8. Action/Time as Modalities<br />

Chapter 8. Action/Time as<br />

Modalities<br />

Action/Time as Modalities<br />

8.1 Time: LTL, CTL<br />

8.2 Action: Dynamic Logic<br />

8.3 ATL<br />

8.4 BDI<br />

8.5 Verification<br />

8.6 References


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 515/731<br />

8. Action/Time as Modalities<br />

Up to now:<br />

Several operators K i , each defines an<br />

accessibility relation on worlds.<br />

Description of static systems: no possibility<br />

of change<br />

MAS are dynamic:<br />

As an example of a temporal logic, we<br />

introduce CTL.<br />

Then we add programming constructs<br />

[a; b] [φ?] and define dynamic logic, where<br />

we can talk about programs and their<br />

behaviour.<br />

We end this section with introducing ATL:<br />

Temporal logic meets game theory.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 516/731<br />

8. Action/Time as Modalities 1. Time: LTL, CTL<br />

8.1 Time: LTL, CTL


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 517/731<br />

8. Action/Time as Modalities 1. Time: LTL, CTL<br />

Reasoning about Time: CTL<br />

Ideas:<br />

The accessibility relation can be seen as representing<br />

time.<br />

time: linear vs. branching<br />

start<br />

start


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 518/731<br />

8. Action/Time as Modalities 1. Time: LTL, CTL<br />

Typical temporal operators<br />

○ϕ<br />

□ϕ<br />

♦ϕ<br />

ϕ U ψ<br />

ϕ is true in the next moment in time<br />

ϕ is true in all future moments<br />

ϕ is true in some future moment<br />

ϕ is true until the moment when ψ<br />

becomes true<br />

□((¬passport ∨ ¬ticket) → ○¬board_flight)<br />

send(msg, rcvr) → ♦receive(msg, rcvr)


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 519/731<br />

8. Action/Time as Modalities 1. Time: LTL, CTL<br />

Temporal logic was originally developed in order to<br />

represent tense in natural language.<br />

Within Computer Science, it has achieved a significant<br />

role in the formal specification and verification of<br />

concurrent and distributed systems.<br />

Much of this popularity has been achieved because a<br />

number of useful concepts can be formally, and concisely,<br />

specified using temporal logics, e.g.<br />

safety properties<br />

liveness properties<br />

fairness properties


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 520/731<br />

8. Action/Time as Modalities 1. Time: LTL, CTL<br />

Safety:<br />

“something bad will not happen”<br />

“something good will always hold”<br />

Typical examples:<br />

□¬bankrupt<br />

□(fuelOK ∨<br />

❧ fuelOK)<br />

and so on . . .<br />

Usually: □¬....


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 521/731<br />

8. Action/Time as Modalities 1. Time: LTL, CTL<br />

Liveness:<br />

“something good will happen”<br />

Typical examples:<br />

♦rich<br />

roL → ♦roP<br />

and so on . . .<br />

Usually: ♦....


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 522/731<br />

8. Action/Time as Modalities 1. Time: LTL, CTL<br />

Combinations of safety and liveness possible:<br />

□(roL → ♦roP )<br />

♦□roP


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 523/731<br />

8. Action/Time as Modalities 1. Time: LTL, CTL<br />

Fairness: Often only really useful when<br />

scheduling processes, responding to messages,<br />

etc.<br />

Fairness (strong):<br />

“if something is attempted/requested, then<br />

it will be successful/allocated”<br />

Typical examples:<br />

□(attempt → ♦success)<br />

□♦attempt → □♦success


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 524/731<br />

8. Action/Time as Modalities 1. Time: LTL, CTL<br />

Linear Time Logic: Semantics<br />

Definition 8.1 (Models of LTL)<br />

A model of LTL is a sequence of time moments. We call<br />

such models paths, and denote them by λ.<br />

Evaluation of atomic propositions at particular time<br />

moments, denoted by λ[i] is also needed. We also use the<br />

notation λ[i . . . j] to denote all time moments between i<br />

and j (including both). λ[i . . . ∞] denotes the denumerable<br />

infinite set of all timepoints from i on into the future.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 525/731<br />

8. Action/Time as Modalities 1. Time: LTL, CTL<br />

Linear Time Logic: Semantics<br />

Evaluating a formula ϕ in a path means to evaluate it in<br />

the first element of the path.<br />

Definition 8.2 (Semantics of LTL)<br />

λ[0 . . . ∞] |= p iff p is true at moment λ[0];<br />

λ[0 . . . ∞] |= ❥ ϕ iff λ[1 . . . ∞] |= ϕ;<br />

λ[0 . . . ∞] |= ♦ϕ iff λ[i . . . ∞] |= ϕ for some i 0;<br />

λ[0 . . . ∞] |= □ϕ iff λ[i . . . ∞] |= ϕ for all i 0;<br />

λ[0 . . . ∞] |= ϕ U ψ iff λ[i . . . ∞] |= ψ for some i ≥ 0, and<br />

λ[j . . . ∞] |= ϕ for all 0 ≤ j i.<br />

Note that:<br />

□ϕ ≡ ¬♦¬ϕ, ♦ϕ ≡ ¬□¬ϕ, ♦ϕ ≡ ⊤ U ϕ


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 526/731<br />

8. Action/Time as Modalities 1. Time: LTL, CTL<br />

Branching Time: CTL<br />

CTL: Computational Tree Logic.<br />

Reasoning about possible computations of a system<br />

Time is branching: we want all alternative paths<br />

included!<br />

Models: states (time points, situations), transitions<br />

(changes)<br />

Paths: courses of action, computations.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 527/731<br />

8. Action/Time as Modalities 1. Time: LTL, CTL<br />

CTL models: transition systems<br />

Definition 8.3 (Transition System)<br />

A transition system is a pair<br />

〈Q, −→〉<br />

where Q is a non-empty set of states −→⊆ Q × Q is a<br />

transition relation.<br />

Note that, formally, a transition relation is just a modal<br />

accessibility relation.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 528/731<br />

8. Action/Time as Modalities 1. Time: LTL, CTL<br />

Definition 8.4 (Paths)<br />

A path λ is an infinite sequence of states that can<br />

be affected by subsequent transitions.<br />

A path must be full, i.e. either infinite, or ending<br />

in a state with no outgoing transition.<br />

Usually, we assume that the transition relation is<br />

serial (time flows forever).<br />

Then, all paths are infinite.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 529/731<br />

8. Action/Time as Modalities 1. Time: LTL, CTL<br />

Reasoning about Time: CTL<br />

Path quantifiers: A (for all paths), E (there is a path);<br />

Temporal operators: ❥ (nexttime), ♦ (sometime), □<br />

(always) and U (until);<br />

“Vanilla” CTL: every temporal operator must be<br />

immediately preceded by exactly one path quantifier;<br />

CTL*: no syntactic restrictions;<br />

Reasoning in “vanilla” CTL can be automatized.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 530/731<br />

8. Action/Time as Modalities 1. Time: LTL, CTL<br />

Example: Rocket and Cargo<br />

A rocket and a cargo,<br />

The rocket can be moved between London<br />

(proposition roL) and Paris (proposition roP ),<br />

The cargo can be in London (caL), Paris<br />

(caP ), or inside the rocket (caR),<br />

The rocket can be moved only if it has its fuel<br />

tank full (fuelOK),<br />

When it moves, it consumes fuel, and nofuel<br />

holds after each flight.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 531/731<br />

8. Action/Time as Modalities 1. Time: LTL, CTL<br />

Example: Rocket and Cargo<br />

roL<br />

nofuel<br />

1 caL<br />

roL 2<br />

roP<br />

roP<br />

fuelOK nofuel fuelOK<br />

caL caL 3 caL 4<br />

5 roL<br />

roL 6<br />

roP<br />

roP<br />

nofuel fuelOK nofuel fuelOK<br />

caR<br />

caR 7 caR caR 8<br />

roL → E♦roP<br />

A□(roL ∨ roP )<br />

roL → A ❤ (roP → nofuel)<br />

roL<br />

roL<br />

roP<br />

roP<br />

nofuel fuelOK nofuel fuelOK<br />

9 caP 10 caP caP 11<br />

caP 12


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 532/731<br />

8. Action/Time as Modalities 1. Time: LTL, CTL<br />

Definition 8.5 (Semantics of CTL*: state formulae)<br />

M, q |= Eϕ if, by definition, there is a path λ,<br />

starting from q, such that M, λ |=<br />

ϕ;<br />

M, q |= Aϕ if, by definition, for all paths λ,<br />

starting from q, we have M, λ |= ϕ.<br />

Definition 8.6 (Semantics of CTL*: path formulae)<br />

Exactly like for LTL!


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 533/731<br />

8. Action/Time as Modalities 1. Time: LTL, CTL<br />

Example: Rocket and Cargo<br />

roL<br />

nofuel<br />

1 caL<br />

roL 2<br />

roP<br />

roP<br />

fuelOK nofuel fuelOK<br />

caL caL 3<br />

caL 4<br />

5 roL<br />

roL 6<br />

roP<br />

roP<br />

nofuel fuelOK nofuel fuelOK<br />

caR<br />

caR 7 caR caR 8<br />

E♦caP<br />

roL<br />

roL<br />

roP<br />

roP<br />

nofuel fuelOK nofuel fuelOK<br />

9 caP 10 caP caP 11<br />

caP 12


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 534/731<br />

8. Action/Time as Modalities 1. Time: LTL, CTL<br />

How to express that there is no possibility of a<br />

deadlock?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 535/731<br />

8. Action/Time as Modalities 2. Action: Dynamic Logic<br />

8.2 Action: Dynamic Logic


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 536/731<br />

8. Action/Time as Modalities 2. Action: Dynamic Logic<br />

1st. Idea: Consider actions or programs a. Each<br />

action a defines a transition<br />

(accessibility relation) from worlds into<br />

worlds.<br />

2nd. Idea: We need statements about the<br />

outcome of actions:<br />

[a]φ: “after every execution of a, φ<br />

holds;<br />

〈a〉φ: “after some executions of a, φ<br />

holds.<br />

Naturally, 〈a〉φ ≡ ¬[a]¬φ.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 537/731<br />

8. Action/Time as Modalities 2. Action: Dynamic Logic<br />

3rd. Idea: Programs/actions can be combined<br />

(sequentially, nondeterministically,<br />

iteratively):<br />

[a; b]φ → [c]φ ′<br />

meaning “if after execution of a and<br />

then b the formula φ holds, then after<br />

executing c the formula φ ′ holds”.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 538/731<br />

8. Action/Time as Modalities 2. Action: Dynamic Logic<br />

Models for DL: Labelled Transition <strong>Systems</strong><br />

Definition 8.7 (Labelled Transition System)<br />

A labelled transition system is a pair<br />

〈Q, { a<br />

−→: a ∈ L}〉<br />

where Q is a non-empty set of states and L is a<br />

non-empty set of labels and for each a ∈ L:<br />

a<br />

−→⊆ Q × Q.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 539/731<br />

8. Action/Time as Modalities 2. Action: Dynamic Logic<br />

The Rocket Example: Adding Actions<br />

fuel<br />

roL<br />

nofuel<br />

1 caL<br />

roL 2<br />

roP<br />

roP<br />

fuelOK nofuel fuelOK<br />

caL caL 3 caL 4<br />

5 roL<br />

roL 6<br />

roP<br />

roP<br />

nofuel fuelOK nofuel fuelOK<br />

caR<br />

caR 7 caR caR 8<br />

roL<br />

roL<br />

roP<br />

roP<br />

nofuel fuelOK nofuel fuelOK<br />

9 caP 10 caP caP 11<br />

caP 12<br />

[fuel]fuelOK


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 540/731<br />

8. Action/Time as Modalities 2. Action: Dynamic Logic<br />

Definition 8.8 (Dynamic Logic: Models)<br />

A model of propositional dynamic logic is given<br />

by a labelled transition system and a valuation of<br />

propositions.<br />

Definition 8.9 (Composite labels)<br />

We assume that the set of labels forms a<br />

Kleene algebra 〈L, ;, ∪, ∗〉. We also assume that<br />

the set of labels contains constructs of the form<br />

“φ?”, whenever φ is a formula not involving any<br />

modalities.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 541/731<br />

8. Action/Time as Modalities 2. Action: Dynamic Logic<br />

“;” means sequential composition,<br />

∪ means nondeterministic choice,<br />

∗ means finite iteration (regular expr.),<br />

[φ?] means test.<br />

Thus we assume that the labels obey the<br />

following conditions:<br />

s a;b<br />

−→ t iff s<br />

s a∪b<br />

−→ t iff s<br />

ab<br />

−→ t,<br />

−→ a<br />

t or s<br />

b<br />

−→ t,<br />

s −→ a∗<br />

t is the reflexive and transitive closure of<br />

s −→ a<br />

t,<br />

s −→ φ?<br />

t iff s |= M φ.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 542/731<br />

8. Action/Time as Modalities 2. Action: Dynamic Logic<br />

What has this to do with programs?<br />

if φ then a else b<br />

while φ do a<br />

(φ?;a) ∪ (¬φ?;b)<br />

(φ?;a) ∗ ; ¬φ?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 543/731<br />

8. Action/Time as Modalities 2. Action: Dynamic Logic<br />

(nofuel?;fuel)(fuelOK?;load)<br />

roL<br />

nofuel<br />

1 caL<br />

roL 2<br />

roP<br />

roP<br />

fuelOK nofuel fuelOK<br />

caL caL 3 caL 4<br />

5 roL<br />

roL 6<br />

roP<br />

roP<br />

nofuel fuelOK nofuel fuelOK<br />

caR<br />

caR 7 caR caR 8<br />

roL<br />

roL<br />

roP<br />

roP<br />

nofuel fuelOK nofuel fuelOK<br />

9 caP 10 caP caP 11<br />

caP 12<br />

caR → [(nofuel?; fuel) ∪ (fuelOK?; load)]caR


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 544/731<br />

8. Action/Time as Modalities 3. ATL<br />

8.3 ATL


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 545/731<br />

8. Action/Time as Modalities 3. ATL<br />

ATL: What Agents Can Achieve<br />

ATL: Agent Temporal Logic [Alur et al. 1997]<br />

Temporal logic meets game theory<br />

Main idea: cooperation modalities<br />

〈〈A〉〉Φ: coalition A has a collective strategy to<br />

enforce Φ


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 546/731<br />

8. Action/Time as Modalities 3. ATL<br />

〈〈jamesbond〉〉♦win:<br />

“James Bond has an infallible plan to<br />

eventually win”<br />

〈〈jamesbond, bondsgirl〉〉fun U shot:<br />

“James Bond and the current Bond’s girl have<br />

a collective way of having fun until someone<br />

shoots at them”


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 547/731<br />

8. Action/Time as Modalities 3. ATL<br />

ATL Models: Concurrent Game Structures<br />

Definition 8.10 (Concurrent Game Structure)<br />

A concurrent game structure is a tuple<br />

M = 〈Agt, Q, π, Act, d, o〉, where:<br />

Agt: a finite set of all agents<br />

Q: a set of states<br />

π: a valuation of propositions<br />

Act: a finite set of (atomic) actions<br />

d : Agt × Q → P(Act) defines actions available to an<br />

agent in a state<br />

o: a deterministic transition function that assigns<br />

outcome states q ′ = o(q, α 1 , . . . , α k ) to states and tuples<br />

of actions


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 548/731<br />

8. Action/Time as Modalities 3. ATL<br />

Rocket Example: Simultaneous Actions<br />

< load 1,nop 2,fuel><br />

< nop<br />

1,nop 2,fuel><br />

< nop<br />

1,nop 2,nop3><br />

< load<br />

1,unload 2,fuel><br />

< unload<br />

< load<br />

1,unload 2,nop3><br />

1,nop 2,fuel><br />

< unload<br />

1,unload < unload 1,nop 2,nop3><br />

< nop<br />

< unload<br />

1,unload 1,unload 2,fuel><br />

< nop ,unload ,load ><br />

1 2 3<br />

< load<br />

1,nop 2,nop3><br />

< nop < load<br />

1,nop 2,load3><br />

< load ,unload ,load ><br />

1 2 3<br />

roL<br />

nofuel<br />

1 caL<br />

roL 2<br />

roP<br />

roP<br />

fuelOK nofuel fuelOK<br />

caL caL 3 caL 4<br />

5 roL<br />

roL 6<br />

roP<br />

roP<br />

nofuel fuelOK nofuel fuelOK<br />

caR<br />

caR 7 caR caR 8<br />

roL<br />

roL<br />

roP<br />

roP<br />

nofuel fuelOK nofuel fuelOK<br />

9 caP 10 caP caP 11<br />

caP 12


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 549/731<br />

8. Action/Time as Modalities 3. ATL<br />

Definition 8.11 (Strategy)<br />

A strategy is a conditional plan.<br />

We represent strategies with functions<br />

s a : Q → Act.<br />

The function out(q, S A ) returns the set of all<br />

paths that may result from agents A<br />

executing strategy S A from state q onward.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 550/731<br />

8. Action/Time as Modalities 3. ATL<br />

Definition 8.12 (Semantics of ATL)<br />

1 M, q |= 〈〈A〉〉Φ if, by definition,there is a<br />

collective strategy S A such that, for every<br />

path λ ∈ out(q, S A ), we have M, λ |= Φ


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 551/731<br />

8. Action/Time as Modalities 3. ATL<br />

< load 1,nop 2,fuel><br />

< nop<br />

1,nop 2,fuel><br />

< nop<br />

1,nop 2,<br />

nop 3><br />

< load<br />

1,unload 2,fuel><br />

< load<br />

1,unload 2,<br />

nop < unload<br />

3><br />

1,nop 2,fuel><br />

< unload<br />

1,unload < unload 1,nop 2,<br />

< unload<br />

1,unload nop 2,<br />

><br />

< nop ,unload ,load<br />

nop 3><br />

< nop<br />

1,unload 2,fuel><br />

3<br />

><br />

1 2 3<br />

< load<br />

1,nop 2,<br />

< nop 2,load<br />

nop 3><br />

3><br />

< load<br />

1,nop 2,load3><br />

< load ,unload ,load ><br />

1 2 3<br />

roL<br />

nofuel<br />

1 caL<br />

roL 2<br />

roP<br />

roP<br />

fuelOK nofuel fuelOK<br />

caL caL 3 caL 4<br />

5 roL<br />

roL 6<br />

roP<br />

roP<br />

nofuel fuelOK nofuel fuelOK<br />

caR<br />

caR 7 caR caR 8<br />

roL<br />

roL<br />

roP<br />

roP<br />

nofuel fuelOK nofuel fuelOK<br />

9 caP 10 caP caP 11<br />

caP 12<br />

nofuel → 〈〈3〉〉□nofuel


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 552/731<br />

8. Action/Time as Modalities 3. ATL<br />

Practical Importance of Temporal and Strategic Logics:<br />

Automatic verification in principle possible<br />

(model checking).<br />

Can be used for automated planning.<br />

Executable specifications can be used for<br />

programming.<br />

see Slide 565.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 553/731<br />

8. Action/Time as Modalities 4. BDI<br />

8.4 BDI


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 554/731<br />

8. Action/Time as Modalities 4. BDI<br />

Beliefs, Desires, Intentions<br />

BDI according to Cohen and Levesque:<br />

Mental primitives: beliefs and goals,<br />

Separate operators and relations for each<br />

agent<br />

Time and action: LTL and DL.<br />

Altogether: multi-modal logic


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 555/731<br />

8. Action/Time as Modalities 4. BDI<br />

Operator Meaning<br />

B i ϕ agent i believes ϕ<br />

G i ϕ agent i has goal of ϕ<br />

○ α action α will happen next<br />

Done α action α has just happened<br />

We also use the constructors “;” and “?” as<br />

introduced previously.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 556/731<br />

8. Action/Time as Modalities 4. BDI<br />

The primitive constructs above allow us to define the<br />

following operators:<br />

Derived Operator Definition Meaning<br />

♦α ∃x(○ x;α?) sometime α<br />

□α ¬♦¬α always α<br />

(Later ϕ) ¬ϕ ∧ ♦ϕ strict sometime<br />

(Before ϕ , ψ) ϕ → □ψ ϕ holds before ψ<br />

Examples:<br />

G citizen □safe a<br />

G police B citizen □safe citizen


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 557/731<br />

8. Action/Time as Modalities 4. BDI<br />

All goals have to be dropped eventually:<br />

♦¬(G i (Later ϕ))<br />

How to define a persistent goal?<br />

P-Goal i ϕ = (G i (Later ϕ)) ∧<br />

B i ¬ϕ ∧<br />

Before ((B i ϕ) ∨ (B i □¬ϕ) , (¬(G i Later ϕ))<br />

How to define intention?<br />

Intend i ϕ = (P-Goal i [Done i (B i (○ ϕ))? ; ϕ])


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 558/731<br />

8. Action/Time as Modalities 4. BDI<br />

BDI according to Rao and Georgeff:<br />

Mental primitives: beliefs, desires and<br />

intentions;<br />

Time: CTL.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 559/731<br />

8. Action/Time as Modalities 4. BDI<br />

W 1<br />

W 2<br />

W 3<br />

W 4<br />

hasA<br />

q 0<br />

AK 1<br />

D a<br />

q 0<br />

q 0<br />

q 0<br />

B a<br />

AK 1<br />

hasA hasA<br />

AQ 1<br />

D a<br />

hasA<br />

AQ 1<br />

B opt<br />

B opt<br />

hasA<br />

win<br />

AK 2<br />

hasA<br />

win<br />

AK 2<br />

QK hasA<br />

2 AQ 2 KQ 2<br />

win<br />

hasA<br />

win KQ 2


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 560/731<br />

8. Action/Time as Modalities 4. BDI<br />

hasA ∧ Bel a hasA : the agent has the Ace, and<br />

he is aware of it;<br />

Bel a E ○ win : he believes there is a way to<br />

win in the next step;


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 561/731<br />

8. Action/Time as Modalities 4. BDI<br />

Des a A ○ win : he desires that every path<br />

leads to a victory, so he does not have to<br />

worry about his decisions;<br />

However, he does not believe it is possible, so<br />

his desires are rather unrealistic:<br />

¬Bel a A ○ win;<br />

Moreover, he believes that a real optimist<br />

would believe that winning forever is<br />

inevitable: Bel a Bel opt A ○ □win.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 562/731<br />

8. Action/Time as Modalities 4. BDI<br />

What do we use these frameworks for?<br />

Analysis & Design<br />

Modeling systems (the frameworks provide<br />

intuitive conceptual structures, and a<br />

systematic approach);<br />

Specifying desireable properties of systems.<br />

Verification & Exploration<br />

Reasoning about concrete systems;<br />

Correctness testing.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 563/731<br />

8. Action/Time as Modalities 4. BDI<br />

What do we use these frameworks for?<br />

Automatic Generation of Behaviours<br />

Programming with executable<br />

specifications;<br />

Automatic planning.<br />

Philosophy of Mind and Agency<br />

Characterization of mental attitudes;<br />

Discussion of rational agents;<br />

Testing rationality assumptions.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 564/731<br />

8. Action/Time as Modalities 5. Verification<br />

8.5 Verification


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 565/731<br />

8. Action/Time as Modalities 5. Verification<br />

Model Checking Formulae of CTL and ATL<br />

Model checking: Does ϕ hold in model M<br />

and state q?<br />

Nice results: model checking CTL and ATL is<br />

tractable!


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 566/731<br />

8. Action/Time as Modalities 5. Verification<br />

Theorem (Clarke, Emerson & Sistla 1986)<br />

CTL model checking is P -complete, and can be<br />

done in time linear in the size of the model<br />

and the length of the formula.<br />

Theorem (Alur, Kupferman & Henzinger 1998)<br />

ATL model checking is P -complete, and can be<br />

done in time linear in the size of the model<br />

and the length of the formula.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 567/731<br />

8. Action/Time as Modalities 5. Verification<br />

So, let's model-check!<br />

Not as easy as it seems.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 568/731<br />

8. Action/Time as Modalities 5. Verification<br />

Agent Planning with ATL<br />

Automated verification of ATL properties:<br />

Can the agents do it?<br />

Planning: How can they do it?<br />

Planning as model checking: CTL<br />

(Giunchiglia and Traverso, 1999).<br />

Agent planning with ATL: even more<br />

natural.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 569/731<br />

8. Action/Time as Modalities 5. Verification<br />

function plan(ϕ).<br />

Returns a subset of Q for which formula ϕ holds, together with a (conditional)<br />

plan to achieve ϕ. The plan is sought within the context of concurrent<br />

game structure S = 〈Agt, Q, Π, π, o〉.<br />

case ϕ ∈ Π : return {〈q, −〉 | ϕ ∈ π(q)}<br />

case ϕ = ¬ψ : P 1 := plan(ψ);<br />

return {〈q, −〉 | q /∈ states(P 1 )}<br />

case ϕ = ψ 1 ∨ ψ 2 :<br />

P 1 := plan(ψ 1 ); P 2 := plan(ψ 2 );<br />

return {〈q, −〉 | q ∈ states(P 1 ) ∪ states(P 2 )}<br />

case ϕ = 〈〈A〉〉 ❢ ψ : return pre(A, states(plan(ψ)))<br />

case ϕ = 〈〈A〉〉□ψ :<br />

P 1 := plan(true); P 2 := plan(ψ); Q 3 := states(P 2 );<br />

while states(P 1 ) ⊈ states(P 2 )<br />

do P 1 := P 2 | states(P1 ); P 2 := pre(A, states(P 1 ))| Q3 od;<br />

return P 2 | states(P1 )<br />

case ϕ = 〈〈A〉〉ψ 1 U ψ 2 :<br />

P 1 := ∅; Q 3 := states(plan(ψ 1 )); P 2 := plan(true)| states(plan(ψ2 ));<br />

while states(P 2 ) ⊈ states(P 1 )<br />

do P 1 := P 1 ⊕ P 2 ; P 2 := pre(A, states(P 1 ))| Q3 od;<br />

return P 1<br />

end case


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 570/731<br />

8. Action/Time as Modalities 5. Verification<br />

Auxiliary functions:<br />

Weakest precondition:<br />

pre(A, Q 1 ) = {〈q, σ A 〉 | ∀σ Σ\A δ(q, σ A , σ Σ\A ) ∈ Q 1 }<br />

States for which plan P is defined:<br />

states(P ) = {q ∈ Q | ∃ σ 〈q, σ〉 ∈ P }<br />

Extending plan P 1 with P 2 :<br />

P 1 ⊕ P 2 = P 1 ∪ {〈q, σ〉 ∈ P 2 | q /∈ states(P 1 )}<br />

P restricted to the states from Q 1 :<br />

P | Q1 = {〈q, σ〉 ∈ P | q ∈ Q 1 }


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 571/731<br />

8. Action/Time as Modalities 5. Verification<br />

< load 1,nop 2,fuel><br />

< nop<br />

1,nop 2,fuel><br />

< nop<br />

1,nop 2,nop3><br />

< load<br />

1,unload 2,fuel><br />

< unload<br />

< load<br />

1,unload 2,nop3><br />

1,nop 2,fuel><br />

< unload<br />

1,unload < unload 1,nop 2,nop3><br />

< nop<br />

< unload<br />

1,unload 1,unload 2,fuel><br />

< nop ,unload ,load ><br />

1 2 3<br />

< load<br />

1,nop 2,nop3><br />

< nop < load<br />

1,nop 2,load3><br />

< load ,unload ,load ><br />

1 2 3<br />

roL<br />

nofuel<br />

1 caL<br />

roL 2<br />

roP<br />

roP<br />

fuelOK nofuel fuelOK<br />

caL caL 3 caL 4<br />

5 roL<br />

roL 6<br />

roP<br />

roP<br />

nofuel fuelOK nofuel fuelOK<br />

caR<br />

caR 7 caR caR 8<br />

roL<br />

roL<br />

roP<br />

roP<br />

nofuel fuelOK nofuel fuelOK<br />

9 caP 10 caP caP 11<br />

caP 12


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 572/731<br />

8. Action/Time as Modalities 5. Verification<br />

plan(〈〈1〉〉♦caP )={ 〈9, −〉, 〈10, −〉, 〈11, −〉, 〈12, −〉 }<br />

plan(〈〈1, 2〉〉♦caP )={ 〈2, 1:load·2:nop〉, 〈6, 1:move·2:nop〉,<br />

〈7, 1:unload·2:unload〉,<br />

〈8, 1:unload·2:unload〉,<br />

〈9, −〉, 〈10, −〉, 〈11, −〉, 〈12, −〉 }<br />

plan(〈〈1, 2, 3〉〉♦caP )={ 〈1, 1:load·3:load〉, 〈2, 1:load·3:load〉,<br />

〈3, 1:nop·3:fuel〉, 〈4, 1:move·3:nop〉,<br />

〈5, 1:load·3:fuel〉, 〈6, 1:move·3:nop〉,<br />

〈7, 1:unload·3:nop〉, 〈8, 1:unload·3:nop〉,<br />

〈9, −〉, 〈10, −〉, 〈11, −〉, 〈12, −〉 }


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 573/731<br />

8. Action/Time as Modalities 5. Verification<br />

Complexity of Model Checking CTL and ATL<br />

Nice results: model checking CTL and ATL is<br />

tractable.<br />

But: the result is relative to the size of the<br />

model and the formula<br />

Well known catch (CTL): size of models is<br />

exponential wrt a higher-level description<br />

Another problem: transitions are labelled<br />

So: the number of transitions can be<br />

exponential in the number of agents.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 574/731<br />

8. Action/Time as Modalities 5. Verification<br />

3 agents/attributes, 12 states, 216 transitions<br />

< load 1,nop 2,fuel><br />

< nop<br />

1,nop 2,fuel><br />

< nop<br />

1,nop 2,nop3><br />

< load<br />

1,unload 2,fuel><br />

< unload<br />

< load<br />

1,unload 2,nop3><br />

1,nop 2,fuel><br />

< unload<br />

1,unload < unload 1,nop 2,nop3><br />

< nop<br />

< unload<br />

1,unload 1,unload 2,fuel><br />

< nop ,unload ,load ><br />

1 2 3<br />

< load<br />

1,nop 2,nop3><br />

< nop < load<br />

1,nop 2,load3><br />

< load ,unload ,load ><br />

1 2 3<br />

roL<br />

nofuel<br />

1 caL<br />

roL 2<br />

roP<br />

roP<br />

fuelOK nofuel fuelOK<br />

caL caL 3 caL 4<br />

5 roL<br />

roL 6<br />

roP<br />

roP<br />

nofuel fuelOK nofuel fuelOK<br />

caR<br />

caR 7 caR caR 8<br />

roL<br />

roL<br />

roP<br />

roP<br />

nofuel fuelOK nofuel fuelOK<br />

9 caP 10 caP caP 11<br />

caP 12


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 575/731<br />

8. Action/Time as Modalities 5. Verification<br />

Proposition (Jamroga & Dix 2005)<br />

ATL model checking is Σ P 2 -complete with respect<br />

to the number of states and agents.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 576/731<br />

8. Action/Time as Modalities 5. Verification<br />

Complexity Classes Σ P 2 , ∆ P 2 , ∆ P 3<br />

Σ P i<br />

: problems solvable in polynomial time<br />

by a non-deterministic Turing machine<br />

making adaptive queries to a Σ P i−1 oracle<br />

Σ P 2 = NP NP : problems solvable in polynomial<br />

time by a non-deterministic Turing machine<br />

making adaptive queries to an NP oracle<br />

∆ P 2 = P NP : A problem is in ∆ P 2 = P NP if it can<br />

be solved in deterministic polynomial time<br />

with subcalls to an NP-oracle. We also have<br />

∆ P 3 := P [NPNP] and ∆ P 1 = P.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 577/731<br />

8. Action/Time as Modalities 5. Verification<br />

Summary of Complexity Results<br />

m, l n, k, l n local , k, l<br />

CTL P-compl. [1] P-compl. [1] PSPACE-compl. [2]<br />

ATL P-compl. [3] Σ P 2 -compl. [4] EXPTIME-compl. [7]<br />

Pos-ATL ir NP-compl. [5,6] Σ P 2 -compl. [6] ?<br />

ATL ir ∆ P 2 -compl. [8] ∆ P 3 -compl. [8] ?<br />

[1] Clarke, Emerson & Sistla (1986), Automatic verification of finite-state concurrent<br />

systems using temporal logic specifications.<br />

[2] Kupferman, Vardi & Wolper (2000), An automata-theoretic approach to<br />

branching-time model checking.<br />

[3] Alur, Henzinger & Kupferman (2002) Alternating-time Temporal Logic.<br />

[4] Jamroga & Dix (2005), Do agents make model checking explode?<br />

[5] Schobbens (2004), Alternating-time logic with imperfect recall.<br />

[6] Jamroga & Dix (2005), Model checking strategic abilities of agents under<br />

incomplete information.<br />

[7] Van der Hoek, Lomuscio & Wooldridge (2006), On the complexity of practical ATL<br />

model checking.<br />

[8] Jamroga & Dix (2007), Model checking abilities of agents: A closer look.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 578/731<br />

8. Action/Time as Modalities 6. References<br />

8.6 References


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 579/731<br />

8. Action/Time as Modalities 6. References<br />

[aqvist84] Åqvist, L. (1984).<br />

Deontic logic.<br />

In D. M. Gabbay and F. Guenther (Eds.), Handbook of<br />

Philosophical Logic, Vol II, pp. 605–714. Reidel.<br />

[Alur et al. 2002] R. Alur, T. A. Henzinger, and<br />

O. Kupferman.<br />

Alternating-time Temporal Logic.<br />

Journal of the ACM, 49:672–713, 2002.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 580/731<br />

8. Action/Time as Modalities 6. References<br />

[Broersen et al., 2001a] Broersen, J., Dastani, M., Huang,<br />

Z., and van der Torre, L. (2001a).<br />

The BOID architecture: conflicts between beliefs,<br />

obligations, intentions and desires.<br />

In Müller, J., Andre, E., Sen, S., and Frasson, C.,<br />

editors, Proceedings of the Fifth International<br />

Conference on Autonomous Agents, pages 9–16. ACM<br />

Press.<br />

[Cohen and Levesque, 1990] Cohen, P. and Levesque, H.<br />

(1990).<br />

Intention is choice with commitment.<br />

Artificial Intelligence, 42:213–261.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 581/731<br />

8. Action/Time as Modalities 6. References<br />

[Emerson 1990] E. A. Emerson.<br />

Temporal and modal logic.<br />

Handbook of Theoretical Computer Science, volume B,<br />

995–1072. Elsevier, 1990.<br />

[Fagin et al. 1995] Fagin, R., Halpern, J. Y., Moses, Y. &<br />

Vardi, M. Y.<br />

Reasoning about Knowledge.<br />

MIT Press: Cambridge, MA.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 582/731<br />

8. Action/Time as Modalities 6. References<br />

[GiunchigliaTraverso00] Fausto Giunchiglia and Paolo<br />

Traverso.<br />

In Susanne Biundo and Maria Fox (Eds.) Recent<br />

Advances in AI Planning, 5th European Conference on<br />

Planning, ECP’99, Durham, UK, September 8-10, 1999,<br />

Proceedings, 1–20, LNCS 1809, Springer 2000.<br />

[HiDBoHoMe98] Hindriks, K. V., F. S. de Boer, H. Hoek,<br />

and J.-J. C. Meyer (1998).<br />

Formal semantics of the core of AGENT-0.<br />

In ECAI’98 Workshop on Practical Reasoning and<br />

Rationality, pp. 20–29.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 583/731<br />

8. Action/Time as Modalities 6. References<br />

[Huth00] Huth, M. & Ryan, M.<br />

Logic in Computer Science: Modeling and reasoning<br />

about systems.<br />

Cambridge University Press.<br />

[Jamroga, 2004] Jamroga, W. (2004).<br />

Strategic planning through model checking of ATL<br />

formulae.<br />

In et al., L. R., editor, Artificial Intelligence and Soft<br />

Computing: Proceedings of ICAISC’04, volume 3070 of<br />

Lecture Notes in Computer Science, pages 879–884.<br />

Springer Verlag.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 584/731<br />

8. Action/Time as Modalities 6. References<br />

[Jamroga/Dix1] Wojtek Jamroga and Jürgen Dix.<br />

Model Checking Strategic Abilities of Agents under<br />

Incomplete Information.<br />

In Mario Coppo, Elena Lodi and G. Michele Pinna<br />

(Eds.), Proceedings of the Italian Conference on<br />

Theoretical Computer Science (ICTCS ’05), pages<br />

295–308. LNCS 3701. Springer, 2005.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 585/731<br />

8. Action/Time as Modalities 6. References<br />

[Jamroga/Dix2] Wojtek Jamroga and Jürgen Dix.<br />

Do Agents Make Model Checking Explode<br />

(Computationally)?<br />

M. Pe(chouc(ek and P. Petta and L.Z. Varga (Eds.),<br />

Proceedings of the 4th International Central and<br />

Eastern European Conference on Multi-Agent<br />

<strong>Systems</strong> (CEEMAS ’05), pages 398-407. LNCS 3690.<br />

Springer, 2005.<br />

[Jamroga/Dix3] Wojtek Jamroga and Jürgen Dix. (2007)<br />

Model Checking Abilities of Agents: A closer look.<br />

Journal of Computing <strong>Systems</strong>, to appear.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 586/731<br />

8. Action/Time as Modalities 6. References<br />

[kripke63b] Kripke, S. (1963a).<br />

Semantical analysis of modal logic I. Normal<br />

propositional calculi.<br />

Zeitschrift fur math. Logik und Grundlagen der<br />

Mathematik 9, 67–96.<br />

[kripke63a] Kripke, S. (1963b).<br />

Semantical considerations on modal logic.<br />

Acta Philosophica Fennica 16, 83–94.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 587/731<br />

8. Action/Time as Modalities 6. References<br />

[kripke65] Kripke, S. (1965).<br />

Semantical analysis of modal logic II. Non-normal<br />

modal propositional calculi.<br />

In Addison, Henkin, and Tarski (Eds.), The theory of<br />

models, Amsterdam, North-Holland, pp. 206–220.<br />

[Pistore and Traverso, 2001] Pistore, M. and Traverso, P.<br />

(2001).<br />

Planning as model checking for extended goals in<br />

non-deterministic domains.<br />

In Proceedings of IJCAI, pages 479–486.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 588/731<br />

8. Action/Time as Modalities 6. References<br />

[Rao and Georgeff1991] Rao, A. S. and M. Georgeff<br />

(1991).<br />

Modeling Rational Agents within a BDI-Architecture.<br />

In J. F. Allen, R. Fikes, and E. Sandewall (Eds.),<br />

Proceedings of the International Conference on<br />

Knowledge Representation and Reasoning, Cambridge,<br />

MA, pp. 473–484. Morgan Kaufmann.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 589/731<br />

8. Action/Time as Modalities 6. References<br />

[vonWright51] von Wright, G. H. (1951).<br />

Deontic logic.<br />

Mind 60, 1–15.<br />

Reprinted in G. H. von Wright, Logical Studies, pp.<br />

58–74. Routledge and Kegan Paul, 1957.<br />

[Wooldridge, 2000] Wooldridge, M. (2000).<br />

Reasoning about Rational Agents.<br />

MIT Press : Cambridge, Mass.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 590/731<br />

9. Agents based on FOL<br />

Chapter 9. Agents based on FOL<br />

Agents based on FOL<br />

9.1 First Order Logic (FOL)<br />

9.2 Situation Calculus<br />

9.3 Successor State Axioms<br />

9.4 (Con-)Golog<br />

9.5 (Concurrent-) MetaTeM<br />

9.6 Comparison<br />

9.7 References


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 591/731<br />

9. Agents based on FOL<br />

We are dealing with deductive reasoning agents. While<br />

the first subsections give a general introduction (from<br />

propositional logic to situation calculus, the frame<br />

problem), the next one, (Con-)Golog, describes a<br />

programming language based on the situation calculus.<br />

We also present MetaTeM, a first-order modal logic for<br />

expressing theories that can be directly executed. We end<br />

this chapter with a simple application and a comparison<br />

of how it is handled by different frameworks we have<br />

introduced.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 592/731<br />

9. Agents based on FOL<br />

Symbolic AI: Symbolic representation,<br />

e.g. sentential or first order logic.<br />

Using deduction. Agent as a theorem<br />

prover.<br />

Traditional: Theory about agents.<br />

Implementation as stepwise process<br />

(Software Engineering) over many<br />

abstractions.<br />

Symbolic AI: View the theory itself as<br />

executable specification.<br />

Internal state: Knowledge Base (KB),<br />

often simply called D (database).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 593/731<br />

9. Agents based on FOL<br />

Our running example for the situation calculus is the<br />

Wumpus-World (as in propositional logic). You’ll have to<br />

model the vacuum world in a similar way.<br />

4<br />

Stench<br />

Breeze<br />

PIT<br />

3<br />

Breeze<br />

Stench<br />

PIT<br />

Breeze<br />

Gold<br />

2<br />

Stench<br />

Breeze<br />

1<br />

Breeze<br />

PIT<br />

Breeze<br />

START<br />

1 2 3 4


¤<br />

¢<br />

£<br />

¡<br />

¡<br />

¢<br />

¤<br />

£<br />

¡<br />

£<br />

¤<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 594/731<br />

¤<br />

£<br />

¡<br />

¢<br />

¢<br />

£<br />

¡<br />

¡<br />

¢<br />

¡<br />

9. Agents based on FOL<br />

1,4 2,4 3,4 4,4<br />

1,3 2,3 3,3 4,3<br />

1,2 2,2 3,2 4,2<br />

OK<br />

1,1 2,1 3,1 4,1<br />

A<br />

OK<br />

OK<br />

¥<br />

(a)<br />

1,4 2,4 3,4 4,4<br />

1,3 2,3 3,3 4,3<br />

W!<br />

1,2<br />

A<br />

2,2 3,2 4,2<br />

S<br />

OK OK<br />

1,1 2,1 3,1 4,1<br />

B P!<br />

£<br />

V V<br />

OK OK<br />

¥<br />

(a)<br />

A = Agent<br />

B = Breeze<br />

G = Glitter, Gold<br />

OK = Safe square<br />

P = Pit<br />

S = Stench<br />

V = Visited<br />

W = Wumpus<br />

¢<br />

A = Agent<br />

B = Breeze<br />

G = Glitter, Gold<br />

OK = Safe square<br />

P = Pit<br />

S = Stench<br />

V = Visited<br />

W = Wumpus<br />

1,4 2,4 3,4 4,4<br />

1,3 2,3 3,3 4,3<br />

1,2 2,2 3,2 4,2<br />

P?<br />

OK<br />

1,1 2,1 3,1 4,1<br />

A P?<br />

¤<br />

V B<br />

OK OK<br />

¥<br />

(b)<br />

1,4 2,4 3,4 4,4<br />

P?<br />

1,3<br />

W!<br />

2,3<br />

A<br />

3,3<br />

P?<br />

4,3<br />

S G<br />

B<br />

1,2 2,2 3,2 4,2<br />

S<br />

£<br />

V V<br />

OK OK<br />

1,1 2,1 3,1 4,1<br />

B P!<br />

£<br />

V V<br />

OK OK<br />

(b)


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 595/731<br />

9. Agents based on FOL 1. First Order Logic (FOL)<br />

9.1 First Order Logic (FOL)


9. Agents based on FOL 1. First Order Logic (FOL)<br />

Definition 9.1 (First order logic L F OL ,L ⊆ L F OL )<br />

The language L F OL of first order logic (Praedikatenlogik<br />

erster Stufe) is defined as follows:<br />

x, y, z, x 1 , x 2 , . . . , x n , . . .: a countable set Var of<br />

variables.<br />

for each k ∈ N: P k 1 , P k 2 , . . . , P k n , . . . a countable set<br />

Pred k of k-dimensional predicate symbols (the<br />

0-dimensional predicate symbols are the propositional<br />

logic constants from At of L P L . We suppose that □<br />

and ⊤ are available.)<br />

for each k ∈ N: f k 1 , f k 2 , . . . , f k n, . . . a countable set<br />

Funct k of k-dimensional function symbols.<br />

¬, ∧, ∨, →: the sentential connectives.<br />

(, ): parentheses.<br />

∀, ∃: quantifiers.<br />

rof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 596/731


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 597/731<br />

9. Agents based on FOL 1. First Order Logic (FOL)<br />

Definition (continued)<br />

The 0-dimensional function symbols are called<br />

individuum constants – we suppress the parentheses. In<br />

general we will need – as in propositional logic – only a<br />

certain subset of the predicate or function symbols.<br />

These define a language L ⊆ L F OL (analogously to<br />

definition 2 on page 2). The used set of predicate and<br />

function symbols is also called signature Σ.


9. Agents based on FOL 1. First Order Logic (FOL)<br />

Definition (continued)<br />

The concept of an L-term t and an L-formula ϕ are<br />

defined inductively:<br />

Term: L-terms t are defined as follows:<br />

1 each variable is a L-term.<br />

2 if f k is a k-dimensional function symbol from L and t 1 ,<br />

. . . ,t k are L-terms, then f k (t 1 , . . . , t k ) is a L-Term.<br />

The set of all L-terms that one can create from the set<br />

X ⊆ Var is called T erm L (X) or T erm Σ (X). Using X = ∅<br />

we get the set of basic terms T erm L (∅), short: T erm L .<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 598/731


9. Agents based on FOL 1. First Order Logic (FOL)<br />

Definition (continued)<br />

Formula: L-formulae ϕ are also defined inductively:<br />

1 if P k is a k-dimensional predicate symbol from L and<br />

t 1 , . . . ,t k are L-terms then P k (t 1 , . . . , t k ) is an L-formula<br />

2 for all L-formulae ϕ is (¬ϕ) a L-formula<br />

3 for all L-formulae ϕ and ψ are (ϕ ∧ ψ) and (ϕ ∨ ψ)<br />

L-formulae.<br />

4 if x is a variable and ϕ a L-formula then are (∃ x ϕ) and<br />

(∀ x ϕ) L-formulae.<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 599/731


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 600/731<br />

9. Agents based on FOL 1. First Order Logic (FOL)<br />

Definition (continued)<br />

Atomic L-formulae are those which are composed<br />

according to 1., we call them At L (X) (X ⊆ VAR). The set<br />

of all L-formulae with respect to X is called F ml L (X).<br />

Positive formulae (F ml + L<br />

(X)) are those which are<br />

composed using only 1, 3. and 4.<br />

If ϕ is a L-formula and is part of an other L-formula ψ then<br />

ϕ is called sub-formula of ψ.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 601/731<br />

9. Agents based on FOL 1. First Order Logic (FOL)<br />

An illustrating example<br />

Example 9.2 (From semigroups to rings)<br />

We consider L = {0, 1, +, ·, ≤, =}, where 0, 1 are constants,<br />

+, · binary operations and ≤, = binary relations. What can<br />

one express in this language?<br />

Ax 1: ∀x∀y∀z x + (y + z) = (x + y) + z<br />

Ax 2: ∀x (x + 0 = 0 + x) ∧ (0 + x = x)<br />

Ax 3: ∀x∃y (x + y = 0) ∧ (y + x = 0)<br />

Ax 4: ∀x∀y x + y = y + x<br />

Ax 5: ∀x∀y∀z x · (y · z) = (x · y) · z<br />

Ax 6: ∀x∀y∀z x · (y + z) = x · y + x · z<br />

Ax 7: ∀x∀y∀z (y + z) · x = y · x + z · x<br />

Axiom 1 describes an semigroup, the axioms 1-2 describe a<br />

monoid, the axioms 1-3 a group, and the axioms 1-7 a ring.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 602/731<br />

9. Agents based on FOL 1. First Order Logic (FOL)<br />

Definition 9.3 (L-structure A = (U A , I A ))<br />

A L-structure or a L-interpretation is a pair<br />

A = def (U A , I A ) with U A being an arbitrary non-empty set,<br />

which is called the basic set (the universe or the<br />

individuum range) of A. Further I A is a mapping which<br />

assigns to each k-dimensional predicate symbol P k in<br />

L a k-dimensional predicate over U A<br />

assigns to each k-dimensional function symbol f k in L<br />

a k-dimensional function on U A<br />

In other words: the domain of I A is exactly the set of<br />

predicate and function symbols of L.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 603/731<br />

9. Agents based on FOL 1. First Order Logic (FOL)<br />

Definition (continued)<br />

The range of I A consists of the predicates and functions on<br />

U A . We write:<br />

I A (P ) = P A , I A (f) = f A .<br />

ϕ be a L 1 -formula and A = def (U A , I A ) a L-structure. A is<br />

called matching with ϕ if I A is defined for all predicate and<br />

function symbols which appear in ϕ, i.e. if L 1 ⊆ L.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 604/731<br />

9. Agents based on FOL 1. First Order Logic (FOL)<br />

Definition 9.4 (Variable assignment ϱ)<br />

A variable assignment ϱ over a L-structure<br />

A = (U A , I A ) is a function<br />

ϱ : Var → U A ; x ↦→ ϱ(x).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 605/731<br />

9. Agents based on FOL 1. First Order Logic (FOL)<br />

Definition 9.5 (Semantics of first order logic)<br />

ϕ be a formula, A a structure matching with ϕ and ϱ a<br />

variable assignment over A. For each term t, which can be<br />

built from components of ϕ, we define inductively the<br />

value of t in the structure A, we call A(t).<br />

1 for a variable x is A(x) = def ϱ(x).<br />

2 if t has the form t = f k (t 1 , . . . , t k ), with t 1 , . . . , t k being<br />

terms and f k a k-dimensional function symbol, then<br />

A(t) = def f A (A(t 1 ), . . . , A(t k )).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 606/731<br />

9. Agents based on FOL 1. First Order Logic (FOL)<br />

Definition (continued)<br />

Now we define inductively the logical value of a formula<br />

ϕ in A:<br />

1. if ϕ = def P k (t 1 , . . . , t k ) with the terms t 1 , . . . , t k and the<br />

k-dimensional predicate symbol P k , then<br />

{<br />

true, if (A(t1 ), . . . , A(t<br />

A(ϕ) = k )) ∈ P A ,<br />

def<br />

false, else.<br />

2. if ϕ = def ¬ψ, then<br />

{<br />

true,<br />

A(ϕ) = def<br />

false,<br />

3. if ϕ = def (ψ ∧ η), then<br />

{<br />

true,<br />

A(ϕ) = def<br />

false,<br />

if A(ψ) = false,<br />

else.<br />

if A(ψ) = true and A(η) = true,<br />

else.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 607/731<br />

9. Agents based on FOL 1. First Order Logic (FOL)<br />

Definition (continued)<br />

4. if ϕ = def (ψ ∨ η), then<br />

{<br />

true,<br />

A(ϕ) = def<br />

false,<br />

5. if ϕ = def ∀ x ψ, then<br />

{<br />

true,<br />

A(ϕ) == def<br />

false,<br />

6. if ϕ = def ∃ x ψ, then<br />

{<br />

true,<br />

A(ϕ) = def<br />

false,<br />

if A(ψ) = true or A(η) = true,<br />

else.<br />

if ∀ d ∈ UA : A [x/d] (ψ) = true,<br />

else.<br />

if ∃d ∈ UA : A [x/d] (ψ) = true,<br />

else.<br />

In the cases 5. and 6. the notation [x/d] was used. For<br />

d ∈ U A be A [x/d] the structure A ′ , which is identical with A<br />

except for the definition of x A′ : x A′ = def d (independently<br />

of the fact that I A is defined for x or not).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 608/731<br />

9. Agents based on FOL 1. First Order Logic (FOL)<br />

Definition (continued)<br />

We write:<br />

A |= ϕ[ϱ] for A(ϕ) = true: A is a model for ϕ with<br />

respect to ϱ.<br />

If ϕ does not contain free variables, then A |= ϕ[ϱ] is<br />

independently from ϱ. We simply suppress ϱ.<br />

If there is at least one model for ϕ , then ϕ is called<br />

satisfiable or consistent.


9. Agents based on FOL 1. First Order Logic (FOL)<br />

Definition 9.6 (Tautology)<br />

1 A theory is a set of formulae without free<br />

variables: T ⊆ F ml L . A satisfies T if A |= ϕ<br />

holds for all ϕ ∈ T . We write A |= T .<br />

2 A L-formula ϕ is called L-tautology, if for all<br />

matching L-structures A the following holds:<br />

A |= ϕ.<br />

From now on we mostly suppress the language<br />

L, because it is clearly obvious from the context.<br />

Nevertheless it has to be defined always.<br />

rof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 609/731


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 610/731<br />

9. Agents based on FOL 1. First Order Logic (FOL)<br />

Definition 9.7 (Consequence set Cn(T ))<br />

A formula ϕ results from T , if for all<br />

structures A with A |= T also A |= ϕ holds.<br />

Therefore we write: T |= ϕ.<br />

We denote with<br />

Cn L (T ) = def {ϕ ∈ F ml L : T |= ϕ},<br />

or simply Cn(T ), the semantic consequence<br />

operator.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 611/731<br />

9. Agents based on FOL 1. First Order Logic (FOL)<br />

Lemma 9.8 (Properties of Cn(T ))<br />

The semantic consequence operator has the<br />

following properties<br />

1 T -extension: T ⊆ Cn(T ),<br />

2 Monotony: T ⊆ T ′ ⇒ Cn(T ) ⊆ Cn(T ′ ),<br />

3 Closure: Cn(Cn(T )) = Cn(T ).<br />

Lemma 9.9 (ϕ ∉ Cn(T))<br />

ϕ ∉ Cn(T ) if and only if there is a structure A<br />

with A |= T and A |= ¬ϕ.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 612/731<br />

9. Agents based on FOL 1. First Order Logic (FOL)<br />

Definition 9.10 (MOD(T ), Cn(U))<br />

If T ⊆ F ml L , then we denote by MOD(T ) the set<br />

of all L-structures A which are models of T :<br />

MOD(T ) = def {A : A |= T }.<br />

If U is a set of structures then we can consider all<br />

sentences, which are true in all structures. We<br />

call this set also Cn(U):<br />

Cn(U) = def {ϕ ∈ F ml L : ∀A ∈ U : A |= ϕ}.<br />

MOD is obviously dual to Cn:<br />

Cn(MOD(T )) = Cn(T ), MOD(Cn(T )) = MOD(T ).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 613/731<br />

9. Agents based on FOL 1. First Order Logic (FOL)<br />

Definition 9.11 (Completeness of a theory T )<br />

T is called complete, if for each formula ϕ ∈ F ml L : T |= ϕ<br />

or T |= ¬ϕ holds.<br />

Attention:<br />

Do not mix up this last condition with the property of a<br />

valuation v (or a model): each valuation is complete in the<br />

above sense.<br />

Lemma 9.12 (Ex Falso Quodlibet)<br />

T is consistent if and only if Cn(T ) ≠ F ml L .


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 614/731<br />

9. Agents based on FOL 1. First Order Logic (FOL)<br />

An illustrating example<br />

Example 9.13 (Natural numbers in different languages)<br />

N P r = (N, 0 N , + N , = N ) („Presburger Arithmetic”),<br />

N P A = (N, 0 N , + N , ·N , = N ) („Peano Arithmetic”),<br />

N P A ′ = (N, 0 N , 1 N , + N , ·N , = N ) (variant of N P A ).<br />

These sets each define the natural numbers, but in<br />

different languages.<br />

Question:<br />

If the language bigger is bigger then we can express more.<br />

Is L P A ′ more expressive then L P A ?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 615/731<br />

9. Agents based on FOL 1. First Order Logic (FOL)<br />

Answer:<br />

No, because one can replace the 1 N by a<br />

L P A -formula: there is a L P A -formula φ(x) so that<br />

for each variable assignment ρ the following<br />

holds:<br />

N P A<br />

′ |= ρ φ(x) if and only if ρ(x) = 1 N<br />

Thus we can define a macro for defining the 1.<br />

Each formula of L P A<br />

′ can be transformed into an<br />

equivalent formula of L P A .


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 616/731<br />

9. Agents based on FOL 1. First Order Logic (FOL)<br />

Question:<br />

Is L P A perhaps more expressive than L P r , or can<br />

the multiplication be defined somehow?<br />

We will see later that L P A is indeed more<br />

expressive:<br />

the set of sentences valid in N P r is decidable<br />

whereas<br />

the set of sentences valid in N P A is not even<br />

recursively enumerable.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 617/731<br />

9. Agents based on FOL 1. First Order Logic (FOL)<br />

We have already defined a complete and correct calculus<br />

for propositional logic L P L . Such calculi exist also for first<br />

order logic L F OL .<br />

Theorem 9.14 (Completeness of first order logic)<br />

A formula follows semantically from a theory T if it can be<br />

derived:<br />

T ⊢ ϕ if and only if T |= ϕ<br />

Theorem 9.15 (Compactness of first order logic)<br />

A formula can be derived from a theory T if it can be derived<br />

from a finite subset of T :<br />

Cn(T ) = ⋃ {Cn(T ′ ) : T ′ ⊆ T, T ′ finite}.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 618/731<br />

9. Agents based on FOL 2. Situation Calculus<br />

9.2 Situation Calculus


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 619/731<br />

9. Agents based on FOL 2. Situation Calculus<br />

Question:<br />

How do we axiomatize the Wumpus-world in<br />

FOL?<br />

function KB-AGENT( percept) returns an action<br />

static: KB, a knowledge base<br />

t, a counter, initially 0, indicating time<br />

TELL(KB, MAKE-PERCEPT-SENTENCE( percept, t))<br />

action ASK(KB, MAKE-ACTION-QUERY(t))<br />

TELL(KB, MAKE-ACTION-SENTENCE(action, t))<br />

t t + 1<br />

return action


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 620/731<br />

9. Agents based on FOL 2. Situation Calculus<br />

Idea:<br />

In order to describe actions or their effects consistently we<br />

consider the world as a sequence of situations (snapshots<br />

od the world). Therefore we have to extend each predicate<br />

by an additional argument.<br />

We use the function symbol<br />

do(action, situation)<br />

as the term for the situation which emerges when the<br />

action action is executed in the situation situation.<br />

Actions: T urn_right, T urn_left, F oreward, Shoot, Grab,<br />

Release, Climb.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 621/731<br />

9. Agents based on FOL 2. Situation Calculus<br />

PIT<br />

Gold<br />

PIT<br />

PIT<br />

Gold<br />

PIT<br />

PIT<br />

Gold<br />

PIT<br />

PIT<br />

Gold<br />

PIT<br />

PIT<br />

PIT<br />

PIT<br />

S 3<br />

Forward<br />

S 02<br />

Turn (Right)<br />

S 1<br />

PIT<br />

Forward<br />

S 0


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 622/731<br />

9. Agents based on FOL 2. Situation Calculus<br />

We also need a memory, a predicate<br />

At(person, location, situation)<br />

with person being either W umpus or Agent and location<br />

being the actual position (stored as pair [i,j]).<br />

Important axioms are the so called successor-state<br />

axioms, they describe how actions effect situations. The<br />

most general form of these axioms is<br />

true afterwards ⇐⇒ an action made it true<br />

or it is already true and<br />

no action made it false


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 623/731<br />

9. Agents based on FOL 2. Situation Calculus<br />

Axioms about At(p, l, s):<br />

At(p, l, do(F orward, s))↔((l . = location_ahead(p, s) ∧ ¬W all(l))<br />

At(p, l, s) →Location_ahead(p, s) . =<br />

Location_toward(l, Orient.(p, s))<br />

W all([x, y]) ↔(x . = 0 ∨ x . = 5 ∨ y . = 0 ∨ y . = 5)


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 624/731<br />

9. Agents based on FOL 2. Situation Calculus<br />

Location_toward([x, y], 0) . = [x + 1, y]<br />

Location_toward([x, y], 90) . = [x, y + 1]<br />

Location_toward([x, y], 180) . = [x − 1, y]<br />

Location_toward([x, y], 270) . = [x, y − 1]<br />

Orient.(Agent, s 0 ) . = 90<br />

Orient.(p, do(a, s)) . = d ↔<br />

((a . = turn_right ∧ d . = mod(Orient.(p, s) − 90, 360))<br />

∨(a . = turn_left ∧ d . = mod(Orient.(p, s) + 90, 360))<br />

∨(Orient.(p, s) . = d ∧ ¬(a . = T urn_right ∨ a . = T urn_left))<br />

mod(x, y) is the implemented “modulo”-function,<br />

assigning a distinct value between 0 and y to each variable<br />

x.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 625/731<br />

9. Agents based on FOL 2. Situation Calculus<br />

Axioms about percepts, useful new notions:<br />

P ercept([Stench, b, g, u, c], s) → Stench(s)<br />

P ercept([a, Breeze, g, u, c], s) → Breeze(s)<br />

P ercept([a, b, Glitter, u, c], s) → At_Gold(s)<br />

P ercept([a, b, g, Bump, c], s) → At_W all(s)<br />

P ercept([a, b, g, u, Scream], s) → W umpus_dead(s)<br />

At(Agent, l, s) ∧ Breeze(s) → Breezy(l)<br />

At(Agent, l, s) ∧ Stench(s) → Smelly(l)


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 626/731<br />

9. Agents based on FOL 2. Situation Calculus<br />

Adjacent(l 1 , l 2 ) ↔ ∃ d l 1<br />

. = Location_toward(l2 , d)<br />

Smelly(l 1 ) → ∃l 2 At(W umpus, l 2 , s)∧<br />

(l 2<br />

. = l1 ∨ Adjacent(l 1 , l 2 ))<br />

P ercept([none, none, g, u, c], s) ∧ At(Agent, x, s) ∧ Adjacent(x, y)<br />

→ OK(y)<br />

(¬At(W umpus, x, t) ∧ ¬P it(x))<br />

→ OK(y)<br />

At(W umpus, l 1 , s) ∧ Adjacent(l 1 , l 2 )<br />

→ Smelly(l 2 )<br />

At(P it, l 1 , s) ∧ Adjacent(l 1 , l 2 )<br />

→ Breezy(l 2 )


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 627/731<br />

9. Agents based on FOL 2. Situation Calculus<br />

Axioms to describe actions:<br />

Holding(Gold, do(Grab, s)) ↔ At_Gold(s)∨<br />

Holding(Gold, s)<br />

Holding(Gold, do(Release, s)) ↔ □<br />

Holding(Gold, do(T urn_right, s)) ↔ Holding(Gold, s)<br />

Holding(Gold, do(T urn_left, s)) ↔ Holding(Gold, s)<br />

Holding(Gold, do(F orward, s)) ↔ Holding(Gold, s)<br />

Holding(Gold, do(Climb, s)) ↔ Holding(Gold, s)<br />

Each effect must be described carefully.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 628/731<br />

9. Agents based on FOL 2. Situation Calculus<br />

Axioms describing preferences among actions:<br />

Great(a, s) → Action(a, s)<br />

(Good(a, s) ∧ ¬∃b Great(b, s)) → Action(a, s)<br />

(Medium(a, s) ∧ ¬∃b (Great(b, s) ∨ Good(b, s))) → Action(a, s)<br />

(Risky(a, s) ∧ ¬∃b (Great(b, s) ∨ Good(b, s) ∨ Medium(a, s)))<br />

→ Action(a, s)<br />

At(Agent, [1, 1], s) ∧ Holding(Gold, s) → Great(Climb, s)<br />

At_Gold(s) ∧ ¬Holding(Gold, s) → Great(Grab, s)<br />

At(Agent, l, s) ∧ ¬V isited(Location_ahead(Agent, s))∧<br />

∧OK(Location_ahead(Agent, s)) → Good(F orward, s)<br />

V isited(l) ↔ ∃s At(Agent, l, s)<br />

The goal is not only to find the gold but also to return<br />

safely. We need the additional axioms<br />

Holding(Gold, s) → Go_back(s) etc.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 629/731<br />

9. Agents based on FOL 2. Situation Calculus<br />

Important problems of knowledge<br />

representation<br />

There are three very important representation-problems<br />

concerning the axiomatization of a changing world:<br />

Frame problem: most actions change only little – we<br />

need many actions to describe invariant<br />

properties.<br />

It would be ideal to axiomatize only what does<br />

not change and to add a proposition like<br />

“nothing else changes”.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 630/731<br />

9. Agents based on FOL 2. Situation Calculus<br />

Qualification problem: it is necessary to enumerate all<br />

conditions under which an action is executed<br />

successfully. For example:<br />

∀x (Bird(x) ∧¬P enguin(x) ∧ ¬Dead(x)∧<br />

∧¬Ostrich(x) ∧ ¬BrokenW ing(x)∧<br />

∧ . . .<br />

−→ F lies(x)<br />

It would be ideal to just say “birds normally<br />

fly”.<br />

Ramification problem: How should we handle implicit<br />

consequences of actions? For example<br />

Grab(Gold): Gold can be contaminated. Then<br />

Grab(Gold) is not optimal.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 631/731<br />

9. Agents based on FOL 2. Situation Calculus<br />

Programming versus knowledge engineering<br />

programming knowledge engineering<br />

choose language choose logic<br />

write program define knowledge base<br />

write compiler implement calculus<br />

run program derive new facts


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 632/731<br />

9. Agents based on FOL 3. Successor State Axioms<br />

9.3 Successor State Axioms


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 633/731<br />

9. Agents based on FOL 3. Successor State Axioms<br />

A Solution to the Frame Problem?<br />

Where do the successor state axioms come<br />

from?<br />

We have to ask: Which fluents stay<br />

invariant?<br />

relational fluent:<br />

¬broken(x, s) ∧ (x ≠ y ∨ ¬fragile(x, s)) −→<br />

¬broken(x, do(drop(r, y), s))<br />

functional fluent: color(x, s) . = c −→<br />

color(x, do(drop(r, y), s)) . = c<br />

How many of such axioms do we need?


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 634/731<br />

9. Agents based on FOL 3. Successor State Axioms<br />

We need exactly<br />

2 × #actions × #fluents<br />

Suppose we are given axioms of the form<br />

. . . −→ fluent(x, do(action, s))<br />

. . . −→ ¬fluent(x, do(action, s)),<br />

How can we compute the successor state axioms<br />

automatically?<br />

Note, that the above set assumes implicitly that all actions<br />

can be applied: this is an overly optimistic assumption<br />

according to the Qualification Problem.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 635/731<br />

9. Agents based on FOL 3. Successor State Axioms<br />

Qualification Problem Revisited<br />

We assume a predicate Poss to describe the<br />

possibility to apply an action.<br />

Poss(pickup(r, x), s) → ∀z ( ¬holding(r, z, s) ).<br />

But → is too weak. Can we replace it by ↔?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 636/731<br />

9. Agents based on FOL 3. Successor State Axioms<br />

Actions have preconditions: necessary and sufficient<br />

conditions which must hold before an action can be<br />

executed.<br />

A robot r can lift object x in situation s iff r is not<br />

holding anything, is located next to x, and x is not<br />

too heavy.<br />

The effect on Broken when r drops an object (positive<br />

effect axiom):<br />

Poss(drop(r, x), s) ∧ F ragile(x) →<br />

Broken(x, do(drop(r, x), s)).<br />

Repairing an object causes the object not to be broken<br />

any more (negative effect axiom):<br />

Poss(repair(r, x), s) → ¬Broken(x, do(repair(r, x), s)).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 637/731<br />

9. Agents based on FOL 3. Successor State Axioms<br />

What about<br />

Poss(pickup(r, x), s) → ∀z ( ¬holding(r, z, s) ∧ ¬heavy(x) ∧<br />

nextto(r, x, s) ).<br />

We suppose we are given a list of axioms of the<br />

form<br />

Poss(action(⃗x), s) ←→ φ action (⃗x, s)<br />

where φ action (⃗x, s) does not contain any<br />

do-terms.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 638/731<br />

9. Agents based on FOL 3. Successor State Axioms<br />

(1) : fragile(x, s) −→ broken(x, do(drop(r, x), s))<br />

(1 ′ ) : nextto(b, x, s) −→ broken(x, do(explode(b), s))<br />

(2) : −→ ¬broken(x, do(repair(r, x), s))<br />

We assume these are all possibilities for broken, ¬broken.<br />

Then (1), (1 ′ ) are equivalent to<br />

∃r (a . = drop(r, x) ∧ fragile(x, s))∨<br />

∃b (a . = explode(b) ∧ nextto(b, x, s))<br />

−→<br />

broken(x, do(a, s)).<br />

(2) is equivalent to<br />

∃r a . = repair(r, x) −→ ¬broken(x, do(a, s))


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 639/731<br />

9. Agents based on FOL 3. Successor State Axioms<br />

Under which conditions could ¬broken(x, s) and<br />

broken(x, do(a, s)) be both true?<br />

(1 ′′ ) : ¬broken(x, s) ∧ broken(x, do(a, s)) −→<br />

∃r (a . = drop(r, x) ∧ fragile(x, s)∨<br />

∃b (a . = explode(b) ∧ nextto(b, x, s))<br />

(2 ′ ) : broken(x, s) ∧ ¬broken(x, do(a, s)) −→<br />

∃r a . = repair(r, x)


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 640/731<br />

9. Agents based on FOL 3. Successor State Axioms<br />

(1), (1 ′ ), (2), (1 ′′ ), (2 ′ ) are equivalent to the<br />

successor state axiom<br />

broken(x, do(a, s))<br />

←→<br />

∃r (a . = drop(r, x) ∧ fragile(x, s)) ∨<br />

∃a (b . = explode(b) ∧ nextto(b, x, s)) ∨<br />

broken(x, s) ∧ ¬∃r a . = repair(r, x)<br />

This can be generalised, also for functional<br />

fluents!


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 641/731<br />

9. Agents based on FOL 3. Successor State Axioms<br />

Thus the 2 × #actions × #fluents many axioms<br />

can be rewritten into only<br />

#fluents<br />

many axioms (2 × #fluents if we count each<br />

equivalence twice).But we also need the Poss<br />

axioms: another #actions many.<br />

Altogether, the 2 × #actions × #fluents are<br />

compiled into (modulo a constant factor)<br />

#actions+#fluents.<br />

Some people call this a solution to the frame<br />

problem.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 642/731<br />

9. Agents based on FOL 4. (Con-)Golog<br />

9.4 (Con-)Golog


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 643/731<br />

9. Agents based on FOL 4. (Con-)Golog<br />

From now on we use the symbol<br />

⊃ to denote implication → and<br />

≡ to denote equivalence ↔.<br />

Firstly we have to give a precise definition as to<br />

how the domain we are dealing with is<br />

described: the effects of actions, how to denote<br />

and distinguish actions, the initial state.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 644/731<br />

9. Agents based on FOL 4. (Con-)Golog<br />

Definition 9.16 (Domain Descriptions (Sit. Calc.))<br />

A domain description D in the situation calculus consists<br />

of the following: D = D ap ∪ D ss ∪ D una ∪ D S0 where<br />

D ap = action preconditions<br />

Poss(A(⃗x), s) ≡ Π A (⃗x, s)<br />

D ss = successor state axioms<br />

Poss(a, s) ⊃ [F (⃗x, do(a, s)) ≡ Φ F (⃗x, a, s)]<br />

D una = unique names for actions:<br />

A(⃗x) ≠ B(⃗y) for distinct A and B,<br />

A(⃗u) . = A(⃗v) ⊃ ⃗u . = ⃗v.<br />

D S0 = sentences describing the initial state, where S 0 is<br />

the only situation term (there are no occurrences of<br />

do(_, _).)


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 645/731<br />

9. Agents based on FOL 4. (Con-)Golog<br />

Planning in the Situation Calculus<br />

Let G(s) be a goal. Then we are interested in:<br />

D |= ∃s G(s),<br />

and leave this task to a theorem prover.<br />

As a side effect of the derivation we can (often) read<br />

off the correct action sequence (a plan) from the term<br />

bound by s<br />

s . = do(α n , do(α n−1 , . . . do(α 1 , S 0 ) . . .)).<br />

Not quite right: this allows action sequences that are not<br />

executable. For example, if G is a tautology, then any<br />

action sequence will do.<br />

Why is that a bit too simple?


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 646/731<br />

9. Agents based on FOL 4. (Con-)Golog<br />

It allows action sequences that are not executable: If G<br />

is a tautology, then any action sequence will do.<br />

It also allows actions sequences of the form<br />

a, a −1 , b, b −1 , . . ..<br />

Definition 9.17 (Plan)<br />

1 We define a predicate Legal(s) which is true if every<br />

action in the action sequence leading to s is<br />

executable:<br />

Legal(s) ≡ s . = S 0 ∨ ∃a∃s ′ [s . = do(a, s ′ ) ∧ Poss(a, s ′ ) ∧ Legal(s ′ )]<br />

2 A plan is a sequence of ground action terms<br />

α 1 , α 2 , . . . , α n s.t.<br />

D |= ∃s[G(s) ∧ Legal(s) ∧ s . = do(α n , do(α n−1 , . . . do(α 1 , S 0 ) . . .))]


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 647/731<br />

9. Agents based on FOL 4. (Con-)Golog<br />

Question: How to find a suitable s?<br />

First approach: Regression planning, that is<br />

planning backwards from the goal to<br />

the initial state.<br />

Second approach: Golog, a programming<br />

language for the situation calculus.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 648/731<br />

9. Agents based on FOL 4. (Con-)Golog<br />

We define a regression operator R which transforms a<br />

formula of the situation calculus and reduces the nesting<br />

of do(α, do(. . .)) terms by 1.<br />

Definition 9.18 (Regression operator R)<br />

1 If A is not a fluent (incl. . =) or A = Poss(a, s),<br />

then R[A] = A<br />

2 If F is a fluent and s a situation variable or<br />

s = S 0 , then R[F (⃗t, s)] = F (⃗t, s).<br />

3 If F is a fluent with successor state axiom<br />

Poss(a, s) ⊃ [F (x 1 , . . . , x n , do(a, s)) ≡ Φ F ],<br />

then R[F (t 1 , . . . , t n , do(α, σ))] = Φ F | x 1,...,x n ,a,s<br />

t 1 ,...,t n ,α,σ .


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 649/731<br />

9. Agents based on FOL 4. (Con-)Golog<br />

1 Let W , W 1 , and W 2 be arbitrary formulas.<br />

Then:<br />

R[¬W ] = ¬R[W ];<br />

R[∀v W ] = ∀v R[W ];<br />

R[∃v W ] = ∃v R[W ];<br />

R[W 1 ∧ W 2 ] = R[W 1 ] ∧ R[W 2 ];<br />

R[W 1 ∨ W 2 ] = R[W 1 ] ∨ R[W 2 ];<br />

R[W 1 ⊃ W 2 ] = R[W 1 ] ⊃ R[W 2 ];<br />

R[W 1 ≡ W 2 ] = R[W 1 ] ≡ R[W 2 ].


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 650/731<br />

9. Agents based on FOL 4. (Con-)Golog<br />

Example 9.19<br />

G = ∀a∀s[P (A, do(a, do(a ′ , s))) ∧ s . = do(B, S 0 ) ⊃<br />

∃x[P (x, s) ∧ Poss(B, do(a, s)) ∧ R(x) ∧ Q(do(B, s))]].<br />

Let P and Q be fluents, R not a fluent. Let the successor<br />

state axioms for P and Q be<br />

Poss(a, s) ⊃ [P (x, do(a, s)) ≡ Φ P (x, a, s)],<br />

Poss(a, s) ⊃ [Q(do(a, s)) ≡ Φ Q (a, s)].<br />

Then (neither Φ P nor Φ Q contain do(_ , _) terms):<br />

R[G] = ∀a∀s[Φ P (A, a, do(a ′ , s)) ∧ s . = do(B, S 0 ) ⊃<br />

∃x[P (x, s) ∧ Poss(B, do(a, s)) ∧ R(x) ∧ Φ Q (B, s)]].


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 651/731<br />

9. Agents based on FOL 4. (Con-)Golog<br />

Linear Regression Let α = A(g 1 , . . . , g k ) be a ground<br />

action with precondition axiom<br />

Poss(A(x 1 , . . . , x k ), s) ≡ Π A (x 1 , . . . , x k , s).<br />

Let precond(α, s) be Π A (g 1 , . . . , g k , s). Let φ(s) be a formula<br />

whose only situation term is the free variable s. (φ(s) may<br />

contain other free variables, but not of type situation.)<br />

The regression of φ(s) through α, denoted as R(α, φ(s)),<br />

is<br />

R[φ(do(α, s))] ∧ precond(α, s).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 652/731<br />

9. Agents based on FOL 4. (Con-)Golog<br />

Theorem 9.20 (Reiter)<br />

Let α 1 , . . . , α n be a sequence of ground actions and G(s) a<br />

wff whose only free variable is s. Then α 1 , . . . , α n is a plan<br />

for G iff<br />

D una ∪ D S0 |= R(α 1 , R(α 2 , . . . R(α n−1 , R(α n , G(s))) · · · ))| s S 0<br />

.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 653/731<br />

9. Agents based on FOL 4. (Con-)Golog<br />

Linear Regression Planning<br />

Input: a domain description D and goal G(s).<br />

Output: an action sequence A.<br />

Initialize A (empty sequence) and Γ<br />

(G(s)).<br />

Check whether D una ∪ D S0 |= Γ| s S 0<br />

. If<br />

yes, then return A.<br />

Otherwise<br />

choose a ground action α;<br />

insert it at the beginning of A;<br />

compute the regression of Γ through α;<br />

assign the result to Γ;<br />

goto 2.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 654/731<br />

9. Agents based on FOL 4. (Con-)Golog<br />

Comments on Regression Planning<br />

Because of the previous theorem, the method is both<br />

correct and complete.<br />

The algorithm is nondeterministic. It does not say<br />

which α to choose next. (Can be implemented using<br />

backtracking.)<br />

Does not always terminate, for example, if there is no<br />

plan. The problem whether a plan exists is<br />

undecidable.<br />

The algorithm is fairly dumb. For example, if there is<br />

an action noop with no effects, then this could be<br />

chosen arbitrarily often, i.e. plans need not be optimal.<br />

A simple strategy for goal-oriented search: try those<br />

actions which satisfy one or more conditions which do<br />

not already follow from the initial situation.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 655/731<br />

9. Agents based on FOL 4. (Con-)Golog<br />

Example 9.21<br />

Actions: pickup(x), drop(x), walk(x)<br />

Preconditions D ap :<br />

Poss(pickup(x), s) ≡ At(x, s) ∧ ∀y¬Holding(y, s)<br />

Poss(drop(x), s) ≡ Holding(x, s)<br />

Poss(walk(x), s) ≡ true<br />

Effects:<br />

Poss(pickup(x), s) ⊃ Holding(x, do(pickup(x), s))<br />

Poss(drop(x), s) ⊃ ¬Holding(x, do(drop(x), s))<br />

Poss(drop(x), s) ⊃ Broken(x, do(drop(x), s))<br />

Poss(walk(x), s) ⊃ At(x, do(walk(x), s))<br />

Poss(walk(x), s) ∧ At(y, s) ∧ y ≠ x ⊃ ¬At(y, do(walk(x), s))


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 656/731<br />

9. Agents based on FOL 4. (Con-)Golog<br />

These result in successor state axioms D ss :<br />

Poss(a, s) ⊃ [Holding(x, do(a, s)) ≡<br />

a . = pickup(x) ∨ Holding(x, s) ∧ a ≠ drop(x)]<br />

Poss(a, s) ⊃ [Broken(x, do(a, s)) ≡<br />

a . = drop(x) ∨ Broken(x, s)]<br />

Poss(a, s) ⊃ [At(x, do(a, s)) ≡ a . = walk(x)∨<br />

At(x, s) ∧ ¬∃y (y ≠ x ∧ a . = walk(y))]<br />

Initial situation D S0 :<br />

∀x ¬Holding(x, S 0 ), ¬At(A, S 0 ), ¬Broken(A, S 0 )<br />

Goal: ∃s Broken(A, s)<br />

(Break A.)


9. Agents based on FOL 4. (Con-)Golog<br />

Planning vs. Programming<br />

While regression planning works for small<br />

domains, the search space becomes<br />

unmanageable in larger, more realistic<br />

applications.<br />

We will now consider a more realistic alternative,<br />

where we allow the user to<br />

prespecify (program) how to achieve a task<br />

in as much detail as desired, yet, at the same<br />

time<br />

leave some flexibility in choosing appropriate<br />

actions to the machine.<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 657/731


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 658/731<br />

9. Agents based on FOL 4. (Con-)Golog<br />

Complex Actions<br />

Complex actions are macros which are ultimately defined<br />

in terms of primitive actions. This way complex actions<br />

inherit the solution to the frame problem.<br />

Consider the problem of clearing the table in a<br />

blocksworld setting. It would be nice to write something<br />

like<br />

while (∃block) ontable(block) do remove_a_block end-while<br />

proc remove_a_block (Πx)[pickup(x); putaway(x)] end-proc<br />

Note that in such a formulation, we do not care about the<br />

situation argument (that must be there in the fluents). We<br />

want this technical point to be dealt with in the following<br />

macros (therefore the notation a[s]).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 659/731<br />

9. Agents based on FOL 4. (Con-)Golog<br />

The following operators are considered:<br />

Sequence:<br />

First execute A, then B.<br />

Test actions:<br />

Is φ true in the current situation?<br />

If-then-else, While-loops<br />

Nondeterministic actions:<br />

Execute A or B.<br />

Nondeterministic choice of the argument of an<br />

actions:<br />

e.g. (Πx)pickup(x): pick up an arbitrary object.<br />

procedures<br />

Names for complex actions, recursion.<br />

With that we obtain a programming language for the<br />

high-level control of a robot.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 660/731<br />

9. Agents based on FOL 4. (Con-)Golog<br />

Complex Actions in the Situation Calc. (1)<br />

DO(a, s, s ′ ) stands for:<br />

The execution of action a in situation s leads<br />

to situation s ′ .<br />

Primitive actions:<br />

DO(a, s, s ′ ) = Poss(a[s], s) ∧ s ′ . = do(a[s], s).<br />

What does a[s] mean? Suppose a is<br />

read(favorite_book(kjeld)) and favorite_book<br />

is a functional fluent. Then a[s] is<br />

read(favorite_book(kjeld, s)).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 661/731<br />

9. Agents based on FOL 4. (Con-)Golog<br />

Sequence:<br />

DO([a 1 ; a 2 ], s, s ′ ) =<br />

∃s ′′ DO(a 1 , s, s ′′ ) ∧ DO(a 2 , s ′′ , s ′ ).<br />

Nondeterministic actions:<br />

DO([a 1 |a 2 ], s, s ′ ) = DO(a 1 , s, s ′ )∨DO(a 2 , s, s ′ )<br />

Nondeterministic choice:<br />

DO((Πx)a(x), s, s ′ ) = ∃x DO(a(x), s, s ′ )


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 662/731<br />

9. Agents based on FOL 4. (Con-)Golog<br />

Test actions:<br />

DO(φ?, s, s ′ ) = φ[s] ∧ s . = s ′<br />

Here φ stands for a situation calculus formula<br />

with all situation arguments suppressed. φ[s]<br />

stands for the arguments restored: if φ is<br />

∀x (ontable(x) ∧ ¬on(x, A)) then φ[s] is the<br />

formula<br />

∀x (ontable(x, s) ∧ ¬on(x, A, s)).<br />

If φ is ∃x (on(x, favorite_block(nils))) then<br />

φ[s] is the formula<br />

∃x (on(x, favorite_block(nils, s), s)).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 663/731<br />

9. Agents based on FOL 4. (Con-)Golog<br />

Complex Actions in the Situation Calc. (2)<br />

If-then-else:<br />

DO([φ, a 1 , a 2 ], s, s ′ ) =<br />

DO([[φ?; a 1 ]|[¬φ?; a 2 ]], s, s ′ )<br />

∗ -operator: execute the action n times (n ≥ 0):<br />

DO(a ∗ , s, s ′ ) =<br />

∀P [∀s 1 P (s 1 , s 1 ) ∧ ∀s 1 , s 2 , s 3 (P (s 1 , s 2 )∧<br />

DO(a, s 2 , s 3 ) ⊃ P (s 1 , s 3 ))] ⊃ P (s, s ′ )<br />

While-loops:<br />

DO(〈φ, a〉, s, s ′ ) = DO(([φ?; a] ∗ ; ¬φ?), s, s ′ )


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 664/731<br />

9. Agents based on FOL 4. (Con-)Golog<br />

Procedures: definition also uses ∗ (needed because of<br />

recursion).<br />

Here we give just a few examples. We define above(x, y) as<br />

the transitive closure of on(x, y):<br />

proc above(x, y)<br />

(x . = y)? | [Πz on(x, z)? ; above(x, z)]<br />

end-proc<br />

We define clean (no arguments) as an action to put away<br />

all blocks in the box:<br />

proc clean<br />

(∀x[ block(x) ⊃ in(x, box)] ? |<br />

(Πx)∀y ¬on(y, x) ?; put(x, box)]<br />

clean end-proc<br />

Note: ∗ -operator needs quantification over predicates (2nd order logic). But<br />

the semantics of complex actions is completely described within the situation<br />

calculus.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 665/731<br />

9. Agents based on FOL 4. (Con-)Golog<br />

if Φ then δ 1 else δ 2 end-if is a macro for<br />

[Φ?;δ 1 ] | [¬Φ?;δ 2 ]<br />

while Φ do δ end-while is a macro for<br />

[[Φ?;δ] ∗ ; ¬Φ? ]


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 666/731<br />

9. Agents based on FOL 4. (Con-)Golog<br />

Golog: An Agent Oriented Programming<br />

Language<br />

Golog = alGOl in LOGic ( Semantics = Situation Calculus)<br />

It generalizes conventional imperative programming<br />

languages:<br />

Procedures in “normal” imperative languages are<br />

ultimately reduced to machine instructions like<br />

assignment statements.<br />

Procedures in Golog actions are reduced to<br />

primitive actions which refer to actions in the real<br />

world, like picking up objects, opening doors,<br />

moving from one room to another, etc. Instead of<br />

machine states we are interested in world states.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 667/731<br />

9. Agents based on FOL 4. (Con-)Golog<br />

Executing complex actions requires logical<br />

reasoning about what the world is like and how it<br />

evolves.<br />

For example, in order to execute<br />

while [∃block OnT able(block)] do remove_a_block<br />

one needs to evaluate the test<br />

[∃block OnT able(block)]<br />

in the current situation.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 668/731<br />

9. Agents based on FOL 4. (Con-)Golog<br />

An Example Golog Program<br />

Action preconditions:<br />

Poss(pickup(x), s) ≡ ∀z¬Holding(z, s)<br />

Poss(putontable(x), s) ≡ Holding(x, s)<br />

Poss(putonfloor(x), s) ≡ Holding(x, s)<br />

Initial state:<br />

OnT able(x, S 0 ) ≡ (x . = A) ∨ (x . = B)<br />

∀x¬Holding(x, S 0 )


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 669/731<br />

9. Agents based on FOL 4. (Con-)Golog<br />

Successor State Axioms:<br />

Poss(a, s) ⊃ [Holding(x, do(a, s)) ≡<br />

a . = pickup(x) ∨ Holding(x, s)∧<br />

a ≠ putontable(x)∧<br />

a ≠ putonfloor(x)]<br />

Poss(a, s) ⊃ [OnT able(x, do(a, s)) ≡<br />

a . = putontable(x)∨<br />

OnT able(x, s) ∧ a ≠ pickup(x)]<br />

Poss(a, s) ⊃ [OnF loor(x, do(a, s)) ≡<br />

a . = putonfloor(x)∨<br />

OnF loor(x, s) ∧ a ≠ pickup(x)]


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 670/731<br />

9. Agents based on FOL 4. (Con-)Golog<br />

Complex actions:<br />

proc clear_table<br />

while [∃block OnT able(block)] do<br />

(Πb)OnT able(b)?; remove_from_table(b).<br />

proc remove_from_table(block)<br />

pickup(block); putonfloor(block).<br />

The evaluation of clear_table:<br />

Axioms |= ∃s DO(clear_table, S 0 , s).<br />

The result is a binding of a term (action sequence) to s.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 671/731<br />

9. Agents based on FOL 4. (Con-)Golog<br />

For example:<br />

s<br />

.<br />

= do(putonfloor(B),<br />

do(pickup(B),<br />

do(putonfloor(A),<br />

do(pickup(A), S 0 )))).<br />

[Note: The order of the blocks is not predetermined by the<br />

program.]<br />

In general the evaluation of a Golog procedure results<br />

in a trace of the primitive actions to be executed.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 672/731<br />

9. Agents based on FOL 4. (Con-)Golog<br />

A simple Forward Planner in Golog<br />

So far we have seen how Golog allows the user<br />

to tell the system in detail how to solve a task.<br />

Golog can also be used to leave it to the system<br />

to solve a goal in the original sense of planning.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 673/731<br />

9. Agents based on FOL 4. (Con-)Golog<br />

The following procedure wspdf(n) finds plans of<br />

length at most n by forward search (Reiter et al.<br />

2000):<br />

proc wspdf(n)<br />

goal? | [n > 0?] ; (πa)(primitive_action(a)?; a);<br />

¬badSituation? ; wspdf(n − 1)<br />

badSituation(s) is a domain dependent predicate used to<br />

define when a situation s should be discarded from further<br />

consideration (important for pruning the search space).<br />

For simple definitions of badSituation, this can solve<br />

problems with plans of length around 20.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 674/731<br />

9. Agents based on FOL 5. (Concurrent-) MetaTeM<br />

9.5 (Concurrent-) MetaTeM


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 675/731<br />

9. Agents based on FOL 5. (Concurrent-) MetaTeM<br />

We present a first-order temporal logic based on<br />

discrete, linear models with finite past and<br />

infinite future, called FML [fisherNormalForm].<br />

start<br />

start


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 676/731<br />

9. Agents based on FOL 5. (Concurrent-) MetaTeM<br />

Typical temporal operators used are<br />

○ϕ<br />

□ϕ<br />

♦ϕ<br />

ϕ is true in the next moment in time<br />

ϕ is true in all future moments<br />

ϕ is true in some future moment<br />

□((¬passport ∨ ¬ticket) → ○¬board_flight)<br />

send(msg, rcvr) → ♦receive(msg, rcvr)


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 677/731<br />

9. Agents based on FOL 5. (Concurrent-) MetaTeM<br />

□(requested → ♦received)<br />

□(received → ○acted)<br />

□(acted → ♦□done)


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 678/731<br />

9. Agents based on FOL 5. (Concurrent-) MetaTeM<br />

From the above we should be able to infer that it<br />

is not the case that the system continually<br />

re-sends a request, but never sees it completed<br />

(□¬done); i.e. the statement<br />

should be inconsistent.<br />

□requested ∧ □¬done


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 679/731<br />

9. Agents based on FOL 5. (Concurrent-) MetaTeM<br />

There are actually many forms of fairness:<br />

♦attempt → ♦succeed<br />

♦attempt → ♦succeed<br />

attempt → ♦succeed<br />

attempt → ♦succeed


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 680/731<br />

9. Agents based on FOL 5. (Concurrent-) MetaTeM<br />

FML introduces two new connectives to classical<br />

logic,<br />

until (φ Uψ meaning ψ will become true at<br />

some future time point t and in all states<br />

between and different from now and t, φ will<br />

be true) and<br />

since (φ Sψ meaning ψ became true at<br />

some time point t in the past and in all<br />

states between t and now φ is true).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 681/731<br />

9. Agents based on FOL 5. (Concurrent-) MetaTeM<br />

Syntax of FML.<br />

The formulae for FML are generated as usual, starting from<br />

a set L p of predicate symbols, a set L v of variable symbols,<br />

a set L c of constant symbols, the quantifiers ∀ and ∃, and<br />

the set L t of terms (constants and variables). The set F ml<br />

is defined by:<br />

If t 1 , ..., t n are in L t and p is a predicate symbol of arity<br />

n, then p(t 1 , ..., t n ) is in F ml.<br />

⊤ (true) and ⊥ (false) are in F ml.<br />

If A and B are in F ml, then so are ¬A, A ∧ B, AUB,<br />

ASB, and (A).<br />

If A is in F ml and v is in L v , then ∃v.A and ∀v.A are<br />

both in F ml.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 682/731<br />

9. Agents based on FOL 5. (Concurrent-) MetaTeM<br />

The following connectives are defined<br />

([finger-fisher-owens]):<br />

○φ φ is true in the next state [⊥Uφ]<br />

⊖φ the current state is not the initial state,<br />

and φ was true in the previous state [⊥Sφ]<br />

⊚φ if the current state is not the initial state,<br />

then φ was true in the previous state [¬ ⊖¬φ]<br />

♦φ φ will be true in some future state [⊤Uφ]<br />

φ φ was true in some past state [⊤Sφ]<br />

□φ φ will be true in all future states [¬ ♦¬φ]<br />

φ φ was true in all past states [¬¬φ]


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 683/731<br />

9. Agents based on FOL 5. (Concurrent-) MetaTeM<br />

Temporal formulae can be classified as follows.<br />

state-formula: is either a literal or a boolean combination<br />

of other state-formulae.<br />

Strict future-time:<br />

If A and B are either state or strict<br />

future-time formulae, then A UB is a strict<br />

future-time formula.<br />

If A and B are strict future-time formulae,<br />

then ¬A, A ∧ B, and (A) are strict<br />

future-time formulae.<br />

Strict past-time: past-time duals of strict future-time<br />

formulae.<br />

Non-strict: include state-formulae in their definition.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 684/731<br />

9. Agents based on FOL 5. (Concurrent-) MetaTeM<br />

Semantics of FML.<br />

The models for FML formulae are given by a<br />

structure consisting of a sequence of worlds<br />

(also called states), together with an<br />

assignment of truth values to atomic sentences<br />

within states, a domain D which is assumed to<br />

be constant for every state, and mappings from<br />

elements of the language into denotations.<br />

This is like in Definition 8.4 on slide 528.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 685/731<br />

9. Agents based on FOL 5. (Concurrent-) MetaTeM<br />

Definition 9.22 (FML model)<br />

A FML-model is a tuple M = 〈σ, D, h c , h p 〉 where<br />

σ is the ordered set of states s 0 , s 1 , s 2 , ...,<br />

h c is a map from the constants into D, and<br />

h p is a map from N × L p into D n → { true, false } (the<br />

first argument of h p is the index i of the state s i ).<br />

Thus, for a particular state s, and a particular predicate p<br />

of arity n, h(s, p) assigns truth values to atoms constructed<br />

from n-tuples of elements of D.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 686/731<br />

9. Agents based on FOL 5. (Concurrent-) MetaTeM<br />

variable assignment: h v is a mapping from the variables<br />

into elements of D.<br />

term assignment: Given a variable and the valuation<br />

function h c , a term assignment τ vh is a<br />

mapping from terms into D defined in the<br />

usual way.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 687/731<br />

9. Agents based on FOL 5. (Concurrent-) MetaTeM<br />

The semantics of FML is given by the |= relation that<br />

assigns the truth value of a formula in a model M at a<br />

particular moment in time i and with respect to a variable<br />

assignment.<br />

〈M, i, h v 〉 |= ⊤<br />

〈M, i, h v 〉 ̸|= ⊥<br />

〈M, i, h v 〉 |= p(x 1 , ..., x n ) iff h p (i, p)(τ vh (x 1 ), ..., τ vh (x n )) = true<br />

〈M, i, h v 〉 |= ¬φ iff 〈M, i, h v 〉 ̸|= φ<br />

〈M, i, h v 〉 |= φ ∨ ψ iff 〈M, i, h v 〉 |= φ or 〈M, i, h v 〉 |= ψ<br />

〈M, i, h v 〉 |= φ Uψ iff for some k s.t. i < k, 〈M, k, h v 〉 |= ψ<br />

for all j, if i < j < k then 〈M, j, h v 〉 |= φ<br />

〈M, i, h v 〉 |= φ Sψ iff for some k s.t. 0 ≤ k < i, 〈M, k, h v 〉 |= ψ<br />

for all j, if k < j < i then 〈M, j, h v 〉 |= φ<br />

〈M, i, h v 〉 |= ∀x.φ iff for all d ∈ D, 〈M, i, h v [d/x]〉 |= φ<br />

〈M, i, h v 〉 |= ∃x.φ iff there exists d ∈ D s.t. 〈M, i, h v [d/x]〉 |= φ


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 688/731<br />

9. Agents based on FOL 5. (Concurrent-) MetaTeM<br />

Concurrent METATEM is a programming<br />

language for DAI based on FML<br />

([concMTM14, concMTM13, concMTM16]).<br />

A Concurrent METATEM system contains a number of<br />

concurrently executing agents which are able to<br />

communicate through message passing.<br />

Each agent executes a first-order temporal logic<br />

specification of its desired behavior.<br />

Each agent has two main components:<br />

an interface which defines how the agent may<br />

interact with its environment (i.e., other agents);<br />

a computational engine, defining how the agent<br />

may act.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 689/731<br />

9. Agents based on FOL 5. (Concurrent-) MetaTeM<br />

An agent interface consists of three components:<br />

a unique agent identifier which names the agent<br />

a set of predicates defining what messages will be<br />

accepted by the agent – they are called environment<br />

predicates;<br />

a set of predicates defining messages that the agent<br />

may send—these are called component predicates.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 690/731<br />

9. Agents based on FOL 5. (Concurrent-) MetaTeM<br />

Besides environment and component predicates, an agent<br />

has a set of internal predicates with no external effect.<br />

The computational engine of an object is based on the<br />

METATEM paradigm of executable temporal logics. The<br />

idea behind this approach is to directly execute a<br />

declarative agent specification given as a set of program<br />

rules which are temporal logic formulae of the form:<br />

antecedent about past → consequent about future


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 691/731<br />

9. Agents based on FOL 5. (Concurrent-) MetaTeM<br />

The intuitive interpretation of such a rule is<br />

on the basis of the past, do the future.<br />

Since METATEM rules must respect the past<br />

implies future form, FML formulae defining<br />

agent rules must be transformed into this form.<br />

This is always possible as demonstrated in<br />

[BFG89].


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 692/731<br />

9. Agents based on FOL 6. Comparison<br />

9.6 Comparison


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 693/731<br />

9. Agents based on FOL 6. Comparison<br />

Comparison via a running example<br />

The following is taken from [MascardiMS04].<br />

Buyer<br />

Seller<br />

contractProposal<br />

accept<br />

refuse<br />

contractProposal<br />

acknowledge<br />

accept<br />

refuse<br />

acknowledge<br />

contractProposal


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 694/731<br />

9. Agents based on FOL 6. Comparison<br />

Notation used in this figure is based on an<br />

agent-oriented extension of UML<br />

[Parunak-odell, aose54];<br />

the diamond with the × inside represents a “xor”<br />

connector;<br />

the protocol can be repeated more than once (note<br />

the bottom arrow from the buyer to the seller labelled<br />

with a “contractProposal” message, which loops<br />

around and up to point higher up to the seller time<br />

line).


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 695/731<br />

9. Agents based on FOL 6. Comparison<br />

Seller agent may receive a contractProposal message<br />

from a buyer agent.<br />

According to the amount of merchandise required and<br />

the price proposed by the buyer, the seller may<br />

accept the proposal, refuse it or try to negotiate a<br />

new price by sending a contractProposal message<br />

back to the buyer.<br />

The buyer agent can do the same (accept, refuse or<br />

negotiate) when it receives a contractProposal<br />

message back from the seller.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 696/731<br />

9. Agents based on FOL 6. Comparison<br />

Behaviour of seller<br />

if the received message is<br />

contractProposal(merchandise, amount, proposedprice)<br />

then<br />

if there is enough merchandise in the warehouse<br />

and the price is greater or equal than a max value,<br />

the seller accepts by sending an accept message to<br />

the buyer and concurrently ships the required<br />

merchandise to the buyer (if no concurrent actions<br />

are available, answering and shipping merchandise<br />

will be executed sequentially);


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 697/731<br />

9. Agents based on FOL 6. Comparison<br />

if there is not enough merchandise in the warehouse<br />

or the price is lower or equal than a min value, the<br />

seller agent refuses by sending a refuse message to<br />

the buyer;<br />

if there is enough merchandise in the warehouse and<br />

the price is between min and max, the seller sends a<br />

contractProposal to the buyer with a proposed price<br />

evaluated as the mean of the price proposed by the<br />

buyer and max.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 698/731<br />

9. Agents based on FOL 6. Comparison<br />

The merchandise to be exchanged are oranges,<br />

with minimum and maximum price 1 and 2<br />

euro respectively. The initial amount of oranges<br />

that the seller possesses is 1000.


Situation independent functions declaration:<br />

min-price(Merchandise) = Min<br />

The minimum price the seller is willing to take<br />

under consideration for Merchandise is Min.<br />

max-price(Merchandise) = Max<br />

The price for Merchandise that the seller accepts<br />

without negotiation is equal or greater than Max.<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 699/731<br />

9. Agents based on FOL 6. Comparison<br />

GOLOG<br />

Primitive actions declaration:<br />

ship(Buyer, Merchandise, Required-amount)<br />

The seller agent delivers the Required-amount of<br />

Merchandise to the Buyer.<br />

send(Sender, Receiver, Message)<br />

Sender sends Message to Receiver.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 700/731<br />

9. Agents based on FOL 6. Comparison<br />

Primitive fluents declaration:<br />

receiving(Sender, Receiver, Message, S)<br />

Receiver receives Message from Sender in situation<br />

S.<br />

storing(Merchandise, Amount, S)<br />

The seller stores Amount of Merchandise in<br />

situation S.<br />

Initial situation axioms:<br />

min-price(orange) = 1<br />

max-price(orange) = 2<br />

∀ S, R, M. ¬ receiving(S, R, M, s 0 )<br />

storing(orange, 1000, s 0 )


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 701/731<br />

9. Agents based on FOL 6. Comparison<br />

Precondition axioms:<br />

poss(ship(Buyer, Merchandise, Required-amount), S) ≡<br />

storing(Merchandise, Amount, S) ∧ Amount ≥<br />

Required-amount<br />

It is possible to ship merchandise iff there is<br />

enough merchandise stored in the warehouse.<br />

poss(send(Sender, Receiver, Message), S) ≡ ⊤<br />

It is always possible to send messages.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 702/731<br />

9. Agents based on FOL 6. Comparison<br />

Successor state axioms:<br />

receiving(Sender, Receiver, Message,<br />

do(send(Sender, Receiver, Message), S)) ≡ ⊤<br />

Receiver receives Message from Sender in<br />

do(send(Sender, Receiver, Message), S)<br />

reached by executing<br />

send(Sender, Receiver, Message) in S.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 703/731<br />

9. Agents based on FOL 6. Comparison<br />

storing(Merchandise, Amount, do(A, S)) ≡<br />

(A = ship(Buyer, Merchandise, Required-amount)∧<br />

storing(Merchandise, Required-amount +<br />

Amount, S))<br />

∨<br />

(A ≠ ship(Buyer, Merchandise, Required-amount)∧<br />

storing(Merchandise, Amount, S))<br />

The seller has a certain Amount of Merchandise if it had<br />

Required-amount + Amount of Merchandise in the<br />

previous situation and it shipped Required-amount of<br />

Merchandise, or if it had Amount of Merchandise in the<br />

previous situation and it did not ship any Merchandise.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 704/731<br />

9. Agents based on FOL 6. Comparison<br />

We may think that a buyer agent executes a<br />

buyer-life-cycle procedure concurrently with<br />

the seller agent procedure seller-life-cycle.<br />

buyer-life-cycle defines the actions the buyer<br />

agent takes according to its internal state and<br />

the messages it receives.<br />

The seller-life-cycle is defined in the following<br />

way.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 705/731<br />

9. Agents based on FOL 6. Comparison<br />

proc seller-life-cycle<br />

if receiving(Buyer, seller,<br />

contractP roposal(Merchandise, Required-amount, P rice), now)<br />

then<br />

if storing(Merchandise, Amount, now)<br />

∧ Amount ≥ Required-amount<br />

∧ P rice ≥ max-price(Merchandise)<br />

then ship(Buyer, Merchandise, Required-amount) ‖<br />

send(seller, Buyer, accept(Merchandise, Required-amount, P rice))<br />

else<br />

if storing(Merchandise, Amount, now) ∧ Amount ≥ Required-amount<br />

∧ min-price(Merchandise) < P rice < max-price(Merchandise)<br />

then send(seller, Buyer, contractP roposal(Merchandise,<br />

Required-amount, (P rice + max-price(Merchandise))/2))<br />

else nil


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 706/731<br />

9. Agents based on FOL 6. Comparison<br />

Agent-0<br />

timegrain := m The program is characterized by a<br />

time-grain of one minute.<br />

CAPABILITIES := ((DO ?time (ship ?!buyer ?merchandise<br />

?required-amount ?!price))<br />

(AND (B (?time (stored ?merchandise ?stored-amount)))<br />

(>= ?stored-amount ?required-amount)))<br />

The agent has the capability of shipping a certain amount<br />

of merchandise, provided that, at the time of shipping, it<br />

believes that such amount is stored in the warehouse.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 707/731<br />

9. Agents based on FOL 6. Comparison<br />

INITIAL BELIEFS := (0 (stored orange 1000))<br />

(?!time (min-price orange 1))<br />

(?!time (max-price orange 2))<br />

The agent has initial beliefs about the minimum price,<br />

maximum price and stored amount of oranges. The initial<br />

belief about stored oranges only holds at time 0, since this<br />

amount will change during the agent’s life, while beliefs<br />

about minimum and maximum prices hold whatever the<br />

time.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 708/731<br />

9. Agents based on FOL 6. Comparison<br />

COMMITMENT RULES := (COMMIT<br />

(?buyer REQUEST<br />

(DO now (ship ?buyer ?merchandise ?req-amnt ?price)))<br />

(AND (B (now (stored ?merchandise ?stored-amount)))<br />

(>= ?stored-amount ?req-amnt)<br />

(B (now (max-price ?merchandise ?max)))<br />

(>= ?price ?max))<br />

(?buyer (DO now<br />

(ship ?buyer ?merchandise ?req-amnt ?price)))<br />

(myself (INFORM now ?buyer<br />

(accepted ?merchandise ?req-amnt ?price)))<br />

(myself (DO now (update-merchandise ?merchandise ?req-amnt)))<br />

)


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 709/731<br />

9. Agents based on FOL 6. Comparison<br />

The first commitment rule says that if the seller agent<br />

receives a request of shipping a certain amount of<br />

merchandise at a certain price, and if it believes that the<br />

required amount is stored in the warehouse and the<br />

proposed price is greater than max-price, the seller agent<br />

commits itself to the buyer to ship the merchandise (ship<br />

is a private action), and decides (namely, commits to<br />

itself) to inform the buyer that its request has been<br />

accepted and to update the stored amount of<br />

merchandise (update-merchandise is a private action).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 710/731<br />

9. Agents based on FOL 6. Comparison<br />

(COMMIT<br />

(?buyer REQUEST<br />

(DO now (ship ?buyer ?merchandise ?req-amnt<br />

?price)))<br />

(OR (AND (B (now (stored ?merchandise<br />

?stored-amount)))<br />

(< ?stored-amount ?req-amnt))<br />

(AND (B (now (min-price ?merchandise ?min)))<br />

(


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 711/731<br />

9. Agents based on FOL 6. Comparison<br />

The second rule says that if the required amount<br />

of merchandise is not present in the warehouse<br />

or the price is too low, the seller agent decides<br />

to inform the buyer that its request has been<br />

refused.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 712/731<br />

9. Agents based on FOL 6. Comparison<br />

(COMMIT<br />

(?buyer REQUEST<br />

(DO now (ship ?buyer ?merchandise ?req-amnt<br />

?price)))<br />

(AND (B (now (stored ?merchandise ?stored-amount)))<br />

(>= ?stored-amount ?req-amnt)<br />

(B (now (max-price ?merchandise ?max)))<br />

(< ?price ?max)<br />

(B (now (min-price ?merchandise ?min)))<br />

(> ?price ?min))<br />

(myself (DO now (eval-mean ?max ?price ?mean-price)))<br />

(myself (REQUEST now ?buyer<br />

(eval-counter-proposal ?merchandise<br />

?req-amnt ?mean-price)))<br />

)


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 713/731<br />

9. Agents based on FOL 6. Comparison<br />

Finally, the third rule says that if the price can be<br />

negotiated and there is enough merchandise in the<br />

warehouse, the seller agent evaluates the price to propose<br />

to the buyer agent (eval-mean is a private action) and<br />

decides to send a counter-proposal to it. We are assuming<br />

that the buyer agent is able to perform an<br />

eval-counter-proposal action to evaluate the seller agent’s<br />

proposal: the seller agent must know the exact action<br />

syntax if it wants that the buyer agent understands and<br />

satisfies its request.


of. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 714/731<br />

9. Agents based on FOL 6. Comparison<br />

Concurrent MetaTeM<br />

The Concurrent METATEM program for the seller agent<br />

may be as follows:<br />

The interface of the seller agent is the following:<br />

seller(contractP roposal)[accept, refuse, contractP roposal, ship] <<br />

meaning that:<br />

– the seller agent, identified by the seller identifier, is able<br />

to recognize a contractProposal message with its<br />

arguments, not specified in the interface;<br />

– the messages that the seller agent is able to broadcast to<br />

the environment, including both communicative acts and<br />

actions on the environment, are accept, refuse,<br />

contractProposal, ship.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 715/731<br />

9. Agents based on FOL 6. Comparison<br />

The internal knowledge base of the seller agent contains<br />

the following rigid predicates (predicates whose value<br />

never changes):<br />

min-price(orange, 1).<br />

max-price(orange, 2).<br />

The internal knowledge base of the seller agent contains<br />

the following flexible predicates (predicates whose value<br />

changes over time):<br />

storing(orange, 1000).


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 716/731<br />

9. Agents based on FOL 6. Comparison<br />

The program rules of the seller agent are the following<br />

ones (lowercase symbols = constants, uppercase =<br />

variables):<br />

∀ Buyer, Merchandise, Req_Amnt, P rice<br />

⊖[contractP roposal(Buyer, seller, Merchandise, Req_Amnt, P rice) ∧<br />

storing(Merchandise, Old_Amount) ∧ Old_Amount ≥ Req_Amnt ∧<br />

max − price(Merchandise, Max) ∧ P rice ≥ Max] =⇒<br />

[ship(Buyer, Merchandise, Req_Amnt, P rice) ∧<br />

accept(seller, Buyer, Merchandise, Req_Amnt, P rice)]<br />

If there was a previous state where Buyer sent a<br />

contractProposal message to seller, and in that previous<br />

state all the conditions were met to accept the proposal,<br />

then accept the Buyer’s proposal and ship the required<br />

merchandise.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 717/731<br />

9. Agents based on FOL 6. Comparison<br />

∀Buyer, Merchandise, Req_Amnt, P rice<br />

⊖[contractP roposal(Buyer, seller, Merchandise, Req_Amnt, P rice)∧<br />

storing(Merchandise, Old_Amount)∧<br />

min − price(Merchandise, Min)∧<br />

Old_Amount < Req_Amnt ∨ P rice ≥ Min] =⇒<br />

refuse(seller, Buyer, Merchandise, Req_Amnt, P rice)<br />

If there was a previous state where Buyer sent a<br />

contractProposal message to seller, and in that previous<br />

state the conditions were not met to accept the Buyer’s<br />

proposal, then send a refuse message to Buyer.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 718/731<br />

9. Agents based on FOL 6. Comparison<br />

∀Buyer, Merchandise, Req_Amnt, P rice<br />

⊖[contractP roposal(Buyer, seller, Merchandise, Req_Amnt, P rice)∧<br />

storing(Merchandise, Old_Amount) ∧ min −<br />

price(Merchandise, Min)∧<br />

max − price(Merchandise, Max) ∧ Old_Amount ≥ Req_Amnt∧<br />

P rice > Min ∧ P rice < Max ∧ New_P rice =<br />

(Max + P rice)/2] =⇒<br />

contractP roposal(seller, Buyer, Merchandise, Req_Amnt, New_P rice)<br />

If there was a previous state where Buyer sent a<br />

contractProposal message to seller, and in that previous<br />

state the conditions were met to send a contractProposal<br />

back to Buyer, then send a contractProposal message to<br />

Buyer with a new proposed price.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 719/731<br />

9. Agents based on FOL 6. Comparison<br />

T Sns Cm Cc N M Sem<br />

ConGolog □ □ □ <br />

AGENT-0 □ □ □ □ □<br />

IMPACT □ □ □ <br />

Conc. METATEM □ □ <br />

T: Temporal.<br />

Sns: Sensing.<br />

Cm: Communication mechanisms.<br />

Cc: Concurrent.<br />

N: Nondeterministic.<br />

M: Modular.<br />

Sem: Formal semantics.<br />

: Fully supported.<br />

□: Partially supported.<br />

□: Not supported.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 720/731<br />

9. Agents based on FOL 7. References<br />

9.7 References


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 721/731<br />

9. Agents based on FOL 7. References<br />

[BFG89] Barringer, H., M. Fisher, D. Gabbay, G. Gough,<br />

and R. Owens (1990).<br />

METATEM: A framework for programming in<br />

temporal logic.<br />

In J. W. de Bakker, W. P. de Roever, and G. Rozenberg<br />

(Eds.), Proceedings of the 1989 REX Workshop on<br />

Stepwise Refinement of Distributed <strong>Systems</strong>: Models,<br />

Formalisms, Correctness, pp. 94–129. Springer-Verlag.<br />

LNCS 430.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 722/731<br />

9. Agents based on FOL 7. References<br />

[DLL] De Giacomo, G., Y. Lespérance, and H. J. Levesque<br />

(2000).<br />

Congolog, a concurrent programming language<br />

based on the situation calculus.<br />

Artificial Intelligence 121, 109–169.<br />

[finger-fisher-owens] Finger, M., M. Fisher, and R. Owens<br />

(1993).<br />

METATEM at work: Modelling reactive systems using<br />

executable temporal logic.<br />

In P. Chung, G. L. Lovegrove, and M. Ali (Eds.),<br />

Proceedings of the 6th International Conference on


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 723/731<br />

9. Agents based on FOL 7. References<br />

Industrial and Engineering Applications of Artificial<br />

Intelligence and Expert <strong>Systems</strong> (IEA/AIE’93), pp.<br />

209–218. Gordon and Breach Publishing.<br />

[fisherNormalForm] Fisher, M. (1992).<br />

A normal form for first-order temporal formulae.<br />

In D. Kapur (Ed.), Proceedings of the 11th<br />

International Conference on Automated Deduction<br />

(CADE’92), pp. 370–384. Springer-Verlag.<br />

LNCS 607.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 724/731<br />

9. Agents based on FOL 7. References<br />

[concMTM13] Fisher, M. (1993).<br />

Concurrent METATEM – A language for modeling<br />

reactive systems.<br />

In A. Bode, M. Reeve, and G. Wolf (Eds.), Proceedings<br />

of the 5th International Conference on Parallel<br />

Architectures and Language, Europe (PARLE’93), pp.<br />

185–196. Springer-Verlag.<br />

LNCS 694.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 725/731<br />

9. Agents based on FOL 7. References<br />

[concMTM14] Fisher, M. and H. Barringer (1991).<br />

Concurrent METATEM processes – A language for<br />

distributed AI.<br />

In E. Mosekilde (Ed.), Proceedings of the 1991<br />

European Simulation Multiconference. SCS Press.<br />

[concMTM16] Fisher, M. and M. Wooldridge (1993).<br />

Executable temporal logic for distributed AI.<br />

In K. Sycara (Ed.), Proceedings of the 12th International<br />

Workshop of Distributed AI (IWDAI’93), pp. 131–142.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 726/731<br />

9. Agents based on FOL 7. References<br />

[fipa] Foundation for Intelligent Physical Agents.<br />

FIPA home page.<br />

http://www.fipa.org/.<br />

[fipa-acl] Foundation for Intelligent Physical Agents<br />

(2002).<br />

FIPA ACL message structure specification.<br />

Approved for standard, 2002-12-06.<br />

http://www.fipa.org/specs/fipa00061/.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 727/731<br />

9. Agents based on FOL 7. References<br />

[HiDBoHoMe98] Hindriks, K. V., F. S. de Boer, H. Hoek,<br />

and J.-J. C. Meyer (1998).<br />

Formal semantics of the core of AGENT-0.<br />

In ECAI’98 Workshop on Practical Reasoning and<br />

Rationality, pp. 20–29.<br />

[mascardi02] Mascardi, V. (2002).<br />

Logic-Based Specification Environments for Multi-Agent<br />

<strong>Systems</strong>.<br />

Ph. D. thesis, Computer Science Department of<br />

Genova University, Genova, Italy.<br />

DISI-TH-2002-04.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 728/731<br />

9. Agents based on FOL 7. References<br />

[MascardiMS04] Mascardi, V., M. Martelli, and L. Sterling<br />

(2004).<br />

Logic-based specification languages for intelligent<br />

software agents.<br />

TPLP 4(4), 429–494.<br />

[Parunak-odell] Odell, J., H. V. D. Parunak, and B. Bauer<br />

(2000a).<br />

Extending UML for agents.<br />

In G. Wagner, Y. Lespérance, and E. Yu (Eds.),<br />

Proceedings of the 2nd Workshop on Agent-Oriented<br />

Information <strong>Systems</strong> (AOIS’00). Held in conjunction


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 729/731<br />

9. Agents based on FOL 7. References<br />

with 17th National conference on Artificial Intelligence<br />

(AAAI’00), pp. 3–17.<br />

[aose54] Odell, J., H. V. D. Parunak, and B. Bauer (2000b).<br />

Representing agent interaction protocols in UML.<br />

In P. Ciancarini and M. Wooldridge (Eds.),<br />

Proceedings of the 1st International Workshop on<br />

Agent-Oriented Software Engineering (AOSE’00), pp.<br />

121–140. Springer-Verlag.<br />

LNCS 1957.<br />

[Shoham90] Shoham, Y. (1993, March).<br />

Agent-oriented programming.<br />

Artificial Intelligence 60, 51–92.


Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 730/731<br />

9. Agents based on FOL 7. References<br />

[placa] Thomas, S. R. (1995).<br />

The PLACA agent programming language.<br />

In M. Wooldridge and N. R. Jennings (Eds.),<br />

Proceedings of the 1st International Workshop on Agent<br />

Theories, Architectures, and Languages (ATAL’94), pp.<br />

355–370. Springer-Verlag.<br />

LNCS 890.<br />

[vonWright51] von Wright, G. H. (1951).<br />

Deontic logic.<br />

Mind 60, 1–15.<br />

Reprinted in G. H. von Wright, Logical Studies, pp.<br />

58–74. Routledge and Kegan Paul, 1957.


9. Agents based on FOL 7. References<br />

Prof. Dr. Jürgen Dix · Department of Informatics, TUC <strong>Multiagent</strong> <strong>Systems</strong>, WS 06/07 731/731

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!