Progress in BDI Logic Programming with AgentSpeak(L) Rafael H. - - PowerPoint PPT Presentation

progress in bdi logic programming with agentspeak l
SMART_READER_LITE
LIVE PREVIEW

Progress in BDI Logic Programming with AgentSpeak(L) Rafael H. - - PowerPoint PPT Presentation

Progress in BDI Logic Programming with AgentSpeak(L) Rafael H. Bordini R.Bordini@csc.liv.ac.uk Department of Computer Science University of Liverpool, U.K. Summary Overview of AgentSpeak(L) AgentSpeak(XL) Interpreter Asymmetry Thesis


slide-1
SLIDE 1

Progress in BDI Logic Programming with AgentSpeak(L)

Rafael H. Bordini

R.Bordini@csc.liv.ac.uk

Department of Computer Science University of Liverpool, U.K.

slide-2
SLIDE 2

Summary

Overview of AgentSpeak(L) AgentSpeak(XL) Interpreter Asymmetry Thesis Principles in AgentSpeak(L) AgentSpeak(F) Verification Ongoing and Future Work

29/11/02 Dagstuhl Seminar p.2/65

slide-3
SLIDE 3

Overview of AgentSpeak(L)

slide-4
SLIDE 4

AgentSpeak(L)

Programming language for BDI agents (faithful to the original conception of the BDI architecture) Natural extension of logic programming (neat notation) Proposed by Rao (MAAMAW 1996)

Logical, computable, agent oriented programming language Bridging the gap between BDI theory and practice

Abstract interpreter was further formalised using Z by d’Inverno and Luck Joint work with: Rodrigo Machado (UFRGS) First prototype interpreter: SIM Speak, based on SIM AGENT

29/11/02 Dagstuhl Seminar p.4/65

slide-5
SLIDE 5

Syntax (I)

If

  • is a predicate symbol, and
✁✄✂ ☎✆ ✆ ✆ ☎ ✁✞✝

are (first-order) terms,

✁ ✂ ☎✆ ✆ ✆ ☎ ✁✠✝ ✡

is a belief atom Ground belief atoms are base beliefs If

is a belief atom,

and

☞ ☛

are belief literals Belief literals are beliefs If

and are beliefs, so is

☛ ✌

29/11/02 Dagstuhl Seminar p.5/65

slide-6
SLIDE 6

Syntax (II)

If

  • is a predicate symbol, and
✁✄✂ ☎✆ ✆ ✆ ☎ ✁ ✝

are terms,

✁ ✂ ☎ ✆ ✆ ✆ ☎ ✁✠✝ ✡

and

✁ ✂ ☎✆ ✆ ✆ ☎ ✁✠✝ ✡

are goals

’ denotes achievement goals ‘

’ denotes test goals

If

  • ✟✝✆

is a belief atom,

  • ✟✝✆

and

  • ✟✝✆

are goals, then

  • ✟✝✆

,

✆ ✡

,

  • ✟✝✆

,

  • ✟✝✆

,

✞ ✁
✆ ✡

and

✞ ✂
✆ ✡

are triggering events If

is an action symbol and

✁✄✂ ☎✆ ✆ ✆ ☎ ✁ ✝

are first-order terms, then

✟ ✟ ✁ ✂ ☎✆ ✆ ✆ ☎ ✁✞✝ ✡

is an action

29/11/02 Dagstuhl Seminar p.6/65

slide-7
SLIDE 7

Syntax (III)

If

  • is a triggering event,

is a belief (plan context), and

✂ ✂ ☎✆ ✆ ✆ ☎ ✂ ✝

are goals or actions (plan body), then

✁ ✂ ✂ ☎ ✆ ✆ ✆ ☎ ✂ ✝

is a plan (where

is called the plan’s head) An AgentSpeak(L) program is specified by a set of initial base beliefs and a set of plans

29/11/02 Dagstuhl Seminar p.7/65

slide-8
SLIDE 8

AgentSpeak(L) Interpreter

An intention is as stack of partially instantiated plans An event is a pair

  • ✁✄✂
☎ ✆

, where

is a triggering event and

is an intention If the intention

is the true intention, the event is called an external event, otherwise it is an internal event An AgentSpeak(L) agent is defined by a tuple

✂ ✞ ✂ ✟ ✂ ✠ ✂ ✡ ✂ ☛✌☞ ✂ ☛✌✍ ✂ ☛✏✎ ✆

Selection functions:

✑✓✒

selects an event from set

✔ ✑✓✕

selects an option (i.e., an applicable plan)

✑✗✖

selects an intention from the set

29/11/02 Dagstuhl Seminar p.8/65

slide-9
SLIDE 9

Events Intentions BRF

Unify Context Execute Intention Event Unify Action Selected Event Beliefs Intention Events Beliefs Beliefs Beliefs

S

O

AgentSpeak(L) Agent

Intentions Selected Plans

...

New New

Intention New Subplan Push

6 5 2 1 3 7 4

Perception

Belief Base

Internal Events External Events Relevant Plans Applicable Plans Means Intended

SI S

E

Plan Library

Update Intention

29/11/02 Dagstuhl Seminar p.9/65

slide-10
SLIDE 10

AgentSpeak(XL) Interpreter

slide-11
SLIDE 11

Introduction

Joint work with: Ana Bazzan, Rafael Jannone, Daniel Basso, Rosa Vicari (UFRGS) and Victor Lesser (UMass) Combining Logic-Based and Decision-Theoretic Agent Frameworks Practical (initial) contribution:

using decision-theoretic task scheduling (TÆMS/DTC) to improve intention selection in AgentSpeak(L)

Selection functions were taken for granted Greater expressiveness

applications where quantitative reasoning is natural control over an agent’s set of intentions

29/11/02 Dagstuhl Seminar p.11/65

slide-12
SLIDE 12

Language Extensions (I)

Addition/deletion of beliefs (in plan bodies) Recovering from plan failure:

✞ ✁
  • ✟✝✆

,

✞ ✂
  • ✟✝✆

Special action for speech acts based communication: .send (I.F.: inform, ask, achieve, know-how, deny) Plans have labels:

✁ ✂ ✂ ☎ ✆ ✆ ✆ ☎ ✂ ✝

Internal actions:

✟ ✁ ✁ ✁ ✂ ✄ ✟ ✁ ✂ ☎ ✆ ✆ ✆ ☎ ✁ ✝ ✡

29/11/02 Dagstuhl Seminar p.12/65

slide-13
SLIDE 13

Language Extensions (II)

Internal actions:

Run locally by the interpreter, do not affect the environment (i.e., they take effect immediately) Can be used in the context as well as in the body of a plan Side effects: if they appear in the context of a relevant plan, they are executed even if the plan is not applicable Separate libraries for different types of extensions Empty library name: access to the standard library (arithmetic and relational operators)

29/11/02 Dagstuhl Seminar p.13/65

slide-14
SLIDE 14

Interpreter Extensions

Access to libraries of actions List of (generic) properties associated with each plan in the set of intentions (in a dynamic way) Interpreting illocutionary forces and updating the appropriate data structures Unification algorithm allows uninstantiated variables in negated literals Events with no applicable plans can be either discarded or suspended (select more than one at a cycle) External actions may fail

29/11/02 Dagstuhl Seminar p.14/65

slide-15
SLIDE 15

Integrating with DTC

The DTC scheduler produces alternative sequences of method (action) execution for a given TÆMS task structure

it attempts to satisfy the criteria (quality, duration, and cost), relationships and deadlines as much as possible

We create a TÆMS task structure where the methods are plan labels (intended means) Programmers can set specific values for the scheduling criteria, relationships and deadlines of each plan (using internal actions from a specific library) The schedules returned by DTC for the TÆMS t.s. representing

defines the order in which to select intentions

29/11/02 Dagstuhl Seminar p.15/65

slide-16
SLIDE 16

Free Software – Download

http://protem.inf.ufrgs.br/cucla

29/11/02 Dagstuhl Seminar p.16/65

slide-17
SLIDE 17

Asymmetry Thesis Principles in AgentSpeak(L)

slide-18
SLIDE 18

Introduction (I)

Joint work with: ´ Alvaro F. Moreira (UFRGS) Rao aimed at “bridging the gap” between theory and practice of BDI agents Proof system (sketched) for AgentSpeak(L) with which to prove BDI properties of agents (not done) Example of such properties are Rao & Georgeff’s principles based on Bratman’s Asymmetry Thesis

29/11/02 Dagstuhl Seminar p.18/65

slide-19
SLIDE 19

Introduction (II)

Showing which of the asymmetry thesis principles apply to any AgentSpeak(L) agent An initial contribution towards more formal grounding for BDI programming Definitions for what the three mental attitudes expressible in BDI logics mean for AgentSpeak(L) agents (based on its structural operational semantics) A framework for proving other BDI properties of AgentSpeak(L)

29/11/02 Dagstuhl Seminar p.19/65

slide-20
SLIDE 20

Motivation

The asymmetry thesis principles express rational properties in respect to the mental attitudes of the BDI framework, and in AgentSpeak(L) are relevant for: Providing further insight into the language itself Informing designers of AgentSpeak(L) agents Defining the BDI logic to which AgentSpeak(L) corresponds

29/11/02 Dagstuhl Seminar p.20/65

slide-21
SLIDE 21

Asymmetry Thesis

Bratman’s Asymmetry Thesis basically says two things: it is irrational for an agent to intend to do an action and also believe that it will not do it (intention-belief inconsistency) it is rational for an agent to intend to do an action but not believe that it will do it (intention-belief incompleteness) Rao & Georgeff added: it is rational for an agent to believe that it can do an action without necessarily intending it (belief-intention incompleteness)

29/11/02 Dagstuhl Seminar p.21/65

slide-22
SLIDE 22

Asymmetry Thesis Principles

Label Principle AT1

INTEND

✂☎✄ ✆ ✝✟✞

BEL

✂ ✞ ✄ ✆

AT2

INTEND

✂☎✄ ✆ ✝

BEL

✂☎✄ ✆

AT3

BEL

✂☎✄ ✆ ✝

INTEND

✂☎✄ ✆

AT4

INTEND

✂☎✄ ✆ ✝✟✞

DES

✂ ✞ ✄ ✆

AT5

INTEND

✂☎✄ ✆ ✝

DES

✂ ✄ ✆

AT6

DES

✂☎✄ ✆ ✝

INTEND

✂ ✄ ✆

AT7

DES

✂☎✄ ✆ ✝✟✞

BEL

✂ ✞ ✄ ✆

AT8

DES

✂☎✄ ✆ ✝

BEL

✂☎✄ ✆

AT9

BEL

✂☎✄ ✆ ✝

DES

✂☎✄ ✆

29/11/02 Dagstuhl Seminar p.22/65

slide-23
SLIDE 23

Preliminaries

From the SOS of AgentSpeak(L):

Agent:

✁ ✂ ✂ ✄ ☎✝✆ ✞✆

Circumstance

is a tuple

✂ ✝ ✂ ✡ ✂ ✠ ✂ ✡ ✞ ✂ ☛ ✂ ☞ ✂ ✌ ✆

set of intentions

set of events

the set of actions

The semantic rules define a transition relation

✂ ✟ ✆ ✑ ✒
✓ ✂ ✟ ✓ ✆ ✟✕✔

refers to component

  • f C (similarly for others)

The intention with plan

  • n top of

is denoted by

☎ ✗ ✖ ✘

29/11/02 Dagstuhl Seminar p.23/65

slide-24
SLIDE 24

Belief

Definition 1 (Belief in AgentSpeak(L) agents) We say that an AgentSpeak(L) agent

, regardless of its circumstance , believes a formula

iff it is included in the agent’s belief base; that is, for an agent

✁ ✂ ✄ ☎ ✆ ☎ ✝ ✆ ✞

: BEL

✟✡✠☛ ☞ ✌ ✍ ✟ ☛ ✡ ✎ ☛ ✏ ☎ ✆

29/11/02 Dagstuhl Seminar p.24/65

slide-25
SLIDE 25

Intention (I)

Auxiliary function

✂ ✁ ✒ ✂ ✄ ☎ ✆ ✁

is the domain of all individual intentions (a stack of partially instantiated plans) Returns all achievement goals in the triggering event part of the plans For any

☎ ✝ ✁

:

T

✆ ✄ ✞✟
✄ ☎ ✗ ✖ ✘ ✆ ✄ ✠ ✡ ✞
✟ ☞
✄ ☎ ✆

if

✖ ✄ ✌ ✄
✂ ✍ ☛ ✎ ✏
✄ ☎ ✆
  • therwise

29/11/02 Dagstuhl Seminar p.25/65

slide-26
SLIDE 26

Intention (II)

Definition 2 (Intention in AgentSpeak(L) agents) An AgentSpeak(L) agent

intends

at circumstance iff it has

as an achievement goal that currently appears in its set of intentions

  • , or

is an achievement goal that appears in the (suspended) intentions associated with events in . For an agent

and its circumstance , we have: INTEND

✟✡✠☛ ☞ ✌ ✍ ✟ ☛ ✡ ✎ ☛ ✏ ✁✄✂ ✌✆☎ ✁ ✝ ✆ ✟ ✁ ✡ ✞ ☛ ✏ ✟

te

☞ ✁ ✍ ✂ ✌✆✟ ✁ ✝ ✆ ✟ ✁ ✡

29/11/02 Dagstuhl Seminar p.26/65

slide-27
SLIDE 27

Desire

Definition 3 (Desire in AgentSpeak(L) agents) An agent at circumstance desires a formula

iff

is an achievement goal in ’s set of events (associated with any intention

), or

is a current intention of the agent; more formally: DES

✟ ✠ ☛ ☞ ✌ ✍ ✟ ☛ ✡ ✎ ✄ ✁ ☛ ☎ ✁ ✞ ✏ ✔ ✞

INTEND

✟✡✠☛ ☞ ✌ ✍ ✟ ☛ ✡

29/11/02 Dagstuhl Seminar p.27/65

slide-28
SLIDE 28

AT2

Lemma 2 (AgentSpeak(L) allows intention–belief incomplete agents) There exists an AgentSpeak(L) agent

such that, for some

  • and
  • ,
✄ ✁ ☎ ✁ ✞ ✞ ✂ ✄ ✁

and

☞ ✟

INTEND

✟✡✠☛ ✄ ☞ ✌ ✄ ✍ ✟ ☛ ✡

BEL

✟ ✠ ☛ ✄ ☞ ✌ ✄ ✍ ✟ ☛ ✡ ✡

.

Proof. The proof consists in showing an instance of a program with

✄ ☎

in the triggering event of a plan but not including

in the set of beliefs. An instance of that plan may become an intended means (i.e., to be included in

✟ ✔

) so that INTEND

✆✞✝ ✟✞✠ ✡ ☛ ✄ ☎ ✆

holds, yet there is no guarantee that

will be believed by the agent at that point. So in this case we have a situation of intention–belief incompleteness.

29/11/02 Dagstuhl Seminar p.28/65

slide-29
SLIDE 29

AT2

The details of the proof are as follows. Consider an agent

✁ ✄
  • ☎✝✆
✂ ✞ ✆ ✆

, where

☎✝✆ ✄ ✞✟

and

✞ ✆ ✄ ✞ ✌ ✖ ✄✁ ✆ ✂

T

✎ ✄✄✂ ✄ ☎ ✆ ✂ ✌ ✄✄✂ ✄ ☎ ✆ ✂

T

☎ ✆ ✟

, at

✟✝✆

(the initial circumstance). Suppose that, from perception of the environment, a belief

✖ ✄✁ ✆

is added to the agent’s belief base (i.e.,

☎ ✞ ✄ ✞ ✖ ✄✁ ✆ ✟

). This belief revision generates an event so that the agent’s circumstance now is

✟ ✄
✟ ✂ ✞
✖ ✄✁ ✆ ✂

T

✆ ✟ ✂ ✞ ✟ ✂ ✞✟ ✂ ✂ ✂ ✆

(i.e.,

✟✠✟ ✄ ✞
✖ ✄✁ ✆ ✂

T

✆ ✟

). From the configuration

✂ ✟ ✆

, the following sequence of semantic rules would apply: (i) SelEv, (ii) Rel

, (iii) Appl

, (iv) SelAppl, (v) ExtEv, (vi) IntSel, and (vii) Achieve. Working out the details of the rule applications, and assuming for simplicity (but without loss of generality) that no further belief revision took place, this leads to a configuration

✓ ✂ ✟ ✓ ✆

,

✓ ✄
  • ☎✝✆
✓ ✂ ✞✆ ✆

, where

☎✝✆ ✓ ✄ ✞ ✖ ✄✁ ✆ ✟

, and

✟ ✓ ✄
✟ ✂ ✞ ✌ ✄✄✂ ✄ ☎ ✆ ✂

T

✗ ✌ ✖ ✄✁ ✆ ✂

T

✎ ✄✄✂ ✄ ☎ ✆ ✘ ✟ ✂ ✞✟ ✂ ✞✟ ✂ ✂ ✂ ✆

. In other words, the agent now has in

✟ ✟

an internal event with triggering event

✌ ✄✄✂ ✄ ☎ ✆

, generated by the (intended) plan for handling

✌ ✖ ✄✁ ✆

.

29/11/02 Dagstuhl Seminar p.29/65

slide-30
SLIDE 30

AT2

From that point the following semantic rules can be applied: (viii) SelEv, (ix) Rel

, (x) Appl

, (xi) SelAppl, (xii) IntEv. This sequence of rule applications leads to a configuration where

✟✕✔ ✄ ✞ ✌ ✖ ✄✁ ✆ ✂

T

✎ ✄✄✂ ✄ ☎ ✆ ✗ ✌ ✄ ✂ ✄ ☎ ✆ ✂

T

☎ ✆ ✘ ✟

. In such configuration, by Definition 2, we see that INTEND

✆✞✝ ✟ ✠ ✡ ☛ ✄ ✂ ✄ ☎ ✆ ✆

is true. However, it is possible that no further belief revision took place, which means that

  • BEL
✆ ✝ ✟ ✠ ✡ ☛ ✄ ✂ ✄ ☎ ✆ ✆
  • holds. Therefore, we have shown by

counterexample that AT2 (i.e., INTEND

✆✞✝ ✟ ✠ ✡ ☛ ✄ ☎ ✆ ✁

BEL

✆✞✝ ✟✞✠ ✡ ☛ ✄ ☎ ✆

) does not hold.

✂✄

From the lemma above it follows immediately that AT1 does not hold for AgentSpeak(L). The following lemma corresponds to stating that AT3 does hold for AgentSpeak(L).

29/11/02 Dagstuhl Seminar p.30/65

slide-31
SLIDE 31

ATP in AgentSpeak(L)

Theorem 1 (Asymmetry Thesis Principles in AgentSpeak(L)) All AgentSpeak(L) agents satisfy the asymmetry thesis principles AT2, AT3, AT4, AT6, AT8, and AT9, but do not satisfy AT1, AT5, and AT7.

Proof. Follows immediately from Corollaries 1, 2, and 3.

✂✄

29/11/02 Dagstuhl Seminar p.31/65

slide-32
SLIDE 32

ATP in AgentSpeak(L)

Corollary 4 (Equivalence to BDI Logics) In regard to the asymmetry thesis principles that are satisfied, AgentSpeak(L) is not equivalent to either BDI-B1, BDI-B2, BDI-S3, BDI-R3, or BDI-W3, as defined by Rao & Georgeff.

Proof. Rao and Georgeff proved that those logics satisfy other combinations of the asymmetry thesis principles.

✂✄

29/11/02 Dagstuhl Seminar p.32/65

slide-33
SLIDE 33

AgentSpeak(F) Verification

slide-34
SLIDE 34

Introduction

Joint work with: Michael Fisher, Carmen Pardavila, Mike Wooldridge Verification of AgentSpeak(F) multi-agent systems by Model Checking AgentSpeak(F): restricted version of AgentSpeak(L) for generating a finite state model of an agent Current Approach: translating AgentSpeak(F) into Promela, converting specifications written in a simplified BDI logic into LTL, then using Spin

29/11/02 Dagstuhl Seminar p.34/65

slide-35
SLIDE 35

AgentSpeak(F): Main Restrictions

various translation parameters (bounds on data structures) uninstantiated variables in triggering events uninstantiated variables in negated literals in a plan’s context (as originally defined by Rao) the same predicate symbol with different arities first order terms (rather than just constants and variables)

29/11/02 Dagstuhl Seminar p.35/65

slide-36
SLIDE 36

AgentSpeak(F): Some Features

Inter-agent communication: .send(

  • ,

,

)

Illocutionary forces:

tell untell achieve

Other basic internal actions (printing, arithmetic

  • perations, etc.)

29/11/02 Dagstuhl Seminar p.36/65

slide-37
SLIDE 37

Specifications (I)

Written in a simplified BDI logic

Let

✖ ✁

be any valid Promela boolean expression,

  • , be any agent

label,

be a variable ranging over agent labels, and

and

  • be

AgentSpeak(F) atomic and action formulæ except with no variables

  • allowed. Then the set of well-formed formulæ (wff) of this logical

language is defined inductively as follows:

29/11/02 Dagstuhl Seminar p.37/65

slide-38
SLIDE 38

Specifications (II)

1.

✖ ✁

is a wff; 2.

is a wff; 3.

Bel

,

Des

, and

Int

are wff; 4.

  • ✁✂✁
✄ ✁

and

✄ ✁✂✁ ✄ ✁

are wff, where

✝ ✞

Bel

Des

Int

and

ranges over a finite set of agent labels; 5.

Does

is a wff;

  • 6. if

and

are wff, so are

,

✄ ☎ ✆ ☎ ✆

,

✄ ☎ ✝ ☎ ✆

,

✄ ☎ ✁ ☎ ✆

,

✄ ☎ ✞ ☎ ✆

, always

✄ ✟ ☎ ✆

, eventually

✄ ✠ ☎ ✆

, until

✄ ☎ ✡ ☎ ✆

, and “release”, the dual of until

✄ ☎ ☛ ☎ ✆

;

  • 7. nothing else is a wff.

29/11/02 Dagstuhl Seminar p.38/65

slide-39
SLIDE 39

Ongoing and Future Work

slide-40
SLIDE 40

MASSOC

Joint work with: Fabio Okuyama, Denise de Oliveira, Guilherme Drehmer, Romulo Krafta (UFRGS) GUI for AgentSpeak(XL) and ELMS (Okuyama), using SACI (Jomi H¨ ubner – FURB) Applications in Social Simulation Social aspects of urban development (Denise Oliveria and Romulo Krafta)

29/11/02 Dagstuhl Seminar p.40/65

slide-41
SLIDE 41

AgentSpeak(XL) Interpreter

Using the partial-order scheduler (efficiency) Addressing multi-agent coordination Extending the TS library (e.g., to allow other TÆ MS relations) Further experiments to assess certain decisions (e.g., scheduling whole plans)

29/11/02 Dagstuhl Seminar p.41/65

slide-42
SLIDE 42

Relating Back to BDI Theory

Using our framework to prove other BDI properties of AgentSpeak(L) agents Extending the semantics to cope with extended versions or AgentSpeak(L) Defining a logic that is equivalent to AgentSpeak(L) (deductive verification)

29/11/02 Dagstuhl Seminar p.42/65

slide-43
SLIDE 43

Algorithmic Verification

Proving the correctness of the AgentSpeak(F) translation into Promela Cooperation with Willem Visser and John Penix (NASA — Ames Research Center)

Translating to Java rather than Promela (then using JPF2) Comparing the performance of Spin and JPF2 (in model checking AgentSpeak(F)) More realistic applications (autonomous spacecraft control)

29/11/02 Dagstuhl Seminar p.43/65

slide-44
SLIDE 44

Abstract Syntax and Structural Operational Semantics of AgentSpeak(L)

slide-45
SLIDE 45

Syntax (I)

AgentSpeak(L) Agent

✁ ✄ ✄ ✂ ☎ ✆ ✝ ✆ ☎ ✆ ✄ ✄ ✂
✆ ✆ ✆
✟ ✄
✝ ✆ ✄ ✄ ✂ ✁ ✂ ✆ ✆ ✆ ✁ ✝ ✟ ✄ ✂ ✡

Beliefs

✄ ✄ ✂

P

✟ ✁ ✂ ☎✆ ✆ ✆ ☎ ✁✠✝ ✡ ✟ ✄

where P is a predicate symbol; a belief is a ground atom (we use

  • for beliefs)

29/11/02 Dagstuhl Seminar p.45/65

slide-46
SLIDE 46

Syntax (II)

Plans

✁ ✄ ✄ ✂ ✁✁ ✄ ✂ ✁ ✂ ✁
  • triggering event
✂ ✁

context

sequence of actions, goals, and belief up- dates (a plan’s body) Context

✂ ✁ ✄ ✄ ✂
✄ ☞
✄ ✂ ✁ ✌ ✂ ✁ ✄

T

29/11/02 Dagstuhl Seminar p.46/65

slide-47
SLIDE 47

Syntax (III)

Actions, Goals, Belief Updating, Plan Body

ranges over basic actions

✄ ✂ ✁
✄ ✂
✄ ✂
✄ ✄ ✂ ✟ ✄
✂ ☎ ✂ ✁

is an achievement goal

is a test goal

29/11/02 Dagstuhl Seminar p.47/65

slide-48
SLIDE 48

Syntax (IV)

The first component in the head of a plan is a triggering event:

☛✁ ✂ ✂ ✄ ✌
✂ ✑
✂ ✌ ✂ ✂ ✑ ✂

If

is a plan of the form

✍ ☛ ✎ ✏

, we define TrEv

✄ ✖ ✆ ✄ ☛✁

and Ctxt

✄ ✖ ✆ ✄ ✍ ☛

, which retrieve the triggering event and the context of the plan, respectively. AgentSpeak(L) Selection Functions:

✄ ✟ ✂

event selection function

✄✆☎ ✝ ✂

applicable plan sel. function

✄ ✔ ✂

intention selection function

29/11/02 Dagstuhl Seminar p.48/65

slide-49
SLIDE 49

Semantics (I)

The semantic rules define a transition relation:

✄ ✁ ☎ ✞ ✞ ✄ ✁
✁ ✂ ✄ ☎ ✆ ✝ ✆ ✞

29/11/02 Dagstuhl Seminar p.49/65

slide-50
SLIDE 50

Semantics (II)

an agent’s circumstance is a tuple

✂ ✄
☎ ☎ ☎ ✝ ☎
✁ ☎ ✂ ✞ ✠

set of intentions,

set of events,

set of actions to be performed in the environment,

set of relevant plans,

✡ ✞

set of applicable plans,

intention being considered,

plan being considered,

event being considered.

29/11/02 Dagstuhl Seminar p.50/65

slide-51
SLIDE 51

Semantics (III)

set of relevant plans RelPlans

✟ ✝ ✆ ☎ ✁✁ ✡ ✂
✁ ✄ ✁ ✏ ✝ ✆ ✌ ✁ ✂

mgu

✟ ✁✁ ☎

TrEv

✟ ✁ ✡ ✡ ✂

applicable plans AppPlans

✟ ☎ ✆ ☎ ✡ ✂
✁ ✄ ✁ ✏ ✌ ✁

is s.t.

☎ ✆ ✄ ✂

Ctxt

✟ ✁ ✡ ✁ ✂

performing a test goal results in a set of substitutions: Test

✟ ☎ ✆ ☎
✡ ✂
✄ ☎ ✆ ✄ ✂
✁ ✂

29/11/02 Dagstuhl Seminar p.51/65

slide-52
SLIDE 52

Semantics (IV)

Notation

denotes component

  • f

, and similarly for the others;

indicates that there is no intention being considered in the agent’s execution, and similarly for

and

;

✁ ✄ ✁ ☎

denotes the intention that has plan

  • n top of

intention

.

29/11/02 Dagstuhl Seminar p.52/65

slide-53
SLIDE 53

Semantics (V)

The semantic rules are given next.

29/11/02 Dagstuhl Seminar p.53/65

slide-54
SLIDE 54

Event Selection

SelEv

✄ ✟ ✄ ✟ ✟ ✆ ✄
☎ ✆
✂ ✟ ✆ ✑ ✒
✂ ✟ ✓ ✆
  • ✟✂✁
✄ ✂ ✟ ☎ ✝ ✄ ✟ ✄ ✄ ✞ ✟

where:

✟ ✓ ✟ ✄ ✟ ✟ ✑
  • ☛✁
✂ ☎ ✆ ✟ ✓ ✁ ✄
  • ☛✁
✂ ☎ ✆

29/11/02 Dagstuhl Seminar p.54/65

slide-55
SLIDE 55

Relevant Plans

Rel

RelPlans

✄ ✞ ✆ ✂ ☛✁ ✆
✞✟
✂ ✟ ✆ ✑ ✒
✂ ✟ ✓ ✆
  • ✟✂✁
  • ☛✁
✂ ☎ ✆ ✟ ☎ ✝ ✂ ✟ ✄ ✄ ✞✟

where:

✟ ✓ ✄ ✄

RelPlans

✄ ✞ ✆ ✂ ☛

Rel

RelPlans

✄ ✞ ✆ ✂ ☛✁ ✆ ✄ ✞✟
✂ ✟ ✆ ✑ ✒
✂ ✟ ✓ ✆
✁ ✄
  • ☛✁
✂ ☎ ✆ ✟ ☎ ✝ ✂ ✟ ✄ ✄ ✞✟

where:

✟ ✓ ✁ ✄

29/11/02 Dagstuhl Seminar p.55/65

slide-56
SLIDE 56

Applicable Plans

Appl

AppPlans

✄ ☎ ✆ ✂ ✟ ✄ ✆
✞✟
✂ ✟ ✆ ✑ ✒
✂ ✟ ✓ ✆
  • ✟✂✁
✂ ✟ ☎ ✝ ✄ ✞ ✟ ✂ ✟ ✄
✞✟

where:

✟ ✓ ✄ ✄ ✞ ✟ ✟ ✓ ☎ ✝ ✄

AppPlans

✄ ☎✝✆ ✂ ✟ ✄ ✆

Appl

AppPlans

✄ ☎ ✆ ✂ ✟ ✄ ✆ ✄ ✞✟
✂ ✟ ✆ ✑ ✒
✂ ✟ ✓ ✆
✂ ✟ ☎ ✝ ✄ ✞ ✟ ✂ ✟ ✄
✞✟

where:

✟ ✓ ✄ ✄ ✞✟ ✟ ✓ ✁ ✄ ✟ ✓ ✟ ✄ ✟ ✟ ☞
  • ☛✁
✂ ☎ ✆

29/11/02 Dagstuhl Seminar p.56/65

slide-57
SLIDE 57

Selection of Applicable Plan

SelAppl

✄ ☎ ✝ ✄ ✟ ☎ ✝ ✆ ✄ ✖
✂ ✟ ✆ ✑ ✒
✂ ✟ ✓ ✆
  • ✟✂✁
✂ ✟ ☎ ✝
✞ ✟

where:

✟ ✓
✖ ✟ ✓ ☎ ✝ ✄ ✞✟

29/11/02 Dagstuhl Seminar p.57/65

slide-58
SLIDE 58

Preparing the Set of Intentions

ExtEv

✂ ✟ ✆ ✑ ✒
✂ ✟ ✓ ✆
✁ ✄

T

✆ ✂ ✟

where:

✟ ✓ ✔ ✄ ✟✕✔ ☞ ✞ ✗ ✖ ✘ ✟ ✟ ✓ ✁ ✄ ✟ ✓

IntEv

✂ ✟ ✆ ✑ ✒
✂ ✟ ✓ ✆
✁ ✄
☎ ✆ ✂ ✟

where:

✟ ✓ ✔ ✄ ✟✕✔ ☞ ✞ ☎ ✗ ✖ ✘ ✟ ✟ ✓ ✁ ✄ ✟ ✓

29/11/02 Dagstuhl Seminar p.58/65

slide-59
SLIDE 59

Intention Selection

IntSel

✟ ✘ ✡ ✂ ✁ ✄ ✁ ☎ ✞ ✞ ✄ ✁ ☎

where:

29/11/02 Dagstuhl Seminar p.59/65

slide-60
SLIDE 60

Executing: Basic Actions

Action

☎ ✞ ✞ ✄ ✁ ☎
✁ ✄

;

✂ ☎

where:

✂ ✂ ✄
✂ ✟ ✘ ✞
✡ ✄
✂ ☎ ✂

29/11/02 Dagstuhl Seminar p.60/65

slide-61
SLIDE 61

Executing: Achievement Goals

Achieve

✄ ✁ ☎ ✞ ✞ ✄ ✁ ☎
✁ ✄

;

✂ ☎

where:

✂ ✔ ✄
✂ ✘ ✞

29/11/02 Dagstuhl Seminar p.61/65

slide-62
SLIDE 62

Executing: Test Goals

Test

Test

✄ ☎✝✆ ✂
✆ ✄ ✞✟
✂ ✟ ✆ ✑ ✒
✂ ✟ ✓ ✆
  • ✟✁
✄ ☎ ✗ ✂
✎ ☎

;

✏ ✘

where:

✟ ✓
✟ ✓ ✔ ✄ ✄ ✟ ✔ ✑ ✞ ✟✁ ✟ ✆ ☞ ✞ ☎ ✗ ✂
✎ ✏ ✘ ✟

Test

Test

✄ ☎✝✆ ✂
✞✟
✂ ✟ ✆ ✑ ✒
✂ ✟ ✓ ✆
  • ✟☎
✄ ☎ ✗ ✂
✎ ☎

;

✏ ✘

where:

✟ ✓
✟ ✓ ✔ ✄ ✄ ✟✕✔ ✑ ✞ ✟☎ ✟ ✆ ☞ ✞ ☎ ✗ ✄ ✂
✎ ✏ ✆ ✆ ✘ ✟ ✆ ✝

Test

✄ ☎✝✆ ✂

29/11/02 Dagstuhl Seminar p.62/65

slide-63
SLIDE 63

Executing: Belief Updates (I)

AddBel

✄ ✁ ☎ ✞ ✞ ✄ ✁
✁ ✄
  • ;
✂ ☎

where:

☎ ✆
✂ ✔ ✄
✂ ✟ ✘ ✞
✡ ✄
✂ ☎ ✂

29/11/02 Dagstuhl Seminar p.63/65

slide-64
SLIDE 64

Executing: Belief Updates (II)

DelBel

☎ ✞ ✞ ✄ ✁
✁ ✄
  • ;
✂ ☎

where:

☎ ✆
✂ ✔ ✄
✂ ✟ ✘ ✞
✡ ✄
✂ ☎ ✂

29/11/02 Dagstuhl Seminar p.64/65

slide-65
SLIDE 65

Removing Intentions

ClrInt

✂ ✟ ✆ ✑ ✒
✂ ✟ ✓ ✆
  • ✟☎
✄ ✗ ✂
✎ ✘

where:

✟ ✓
✟ ✓ ✔ ✄ ✟✕✔ ✑ ✞ ✟☎ ✟

ClrInt

✂ ✟ ✆ ✑ ✒
✂ ✟ ✓ ✆
  • ✟☎
✄ ☎ ✓ ✗ ✂
✓ ✎ ✄
  • ☛✁
✏ ✓ ✘ ✗ ✂
✎ ✘

where:

✟ ✓
✟ ✓ ✔ ✄ ✄ ✟✕✔ ✑ ✞ ✟☎ ✟ ✆ ☞ ✞ ☎ ✓ ✗ ✂
✓ ✎ ✏ ✓ ✘ ✟

29/11/02 Dagstuhl Seminar p.65/65