29
João Alexandre Leite Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa { jleite, lmp }@di.fct.unl.pt Pierangelo Dell’Acqua Dept. of Science and Technology Linköping University [email protected] Porto, 17-20 Dec. 2001 Epia01

João Alexandre Leite Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa { jleite, lmp }@di.fct.unl.pt Pierangelo

  • View
    220

  • Download
    3

Embed Size (px)

Citation preview

Page 1: João Alexandre Leite Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa { jleite, lmp }@di.fct.unl.pt Pierangelo

João Alexandre Leite

Luís Moniz Pereira

Centro de Inteligência Artificial - CENTRIA

Universidade Nova de Lisboa

{ jleite, lmp }@di.fct.unl.pt

Pierangelo Dell’Acqua

Dept. of Science and Technology

Linköping University

[email protected]

Porto, 17-20 Dec. 2001Epia01

Page 2: João Alexandre Leite Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa { jleite, lmp }@di.fct.unl.pt Pierangelo

Our agents

We propose a LP approach to agents that can:

Reason and React to other agentsUpdate their own knowledge, reactions and goals Interact by updating the theory of another agentDecide whether to accept an update depending on the

requesting agentCapture the representation of social evolution

Page 3: João Alexandre Leite Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa { jleite, lmp }@di.fct.unl.pt Pierangelo

Framework

This framework builds on the work:

Updating Agents

P. Dell’Acqua & L. M. Pereira - MAS’99

Multi-dimensional Dynamic Logic Programming

L. A. Leite & J. J. Alferes & L. M. Pereira - CLIMA’01

Page 4: João Alexandre Leite Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa { jleite, lmp }@di.fct.unl.pt Pierangelo

Updating agents

Updating agent: a rational, reactive agent that can dynamically change its own knowledge and goals

makes observations reciprocally updates other agents with goals and rules thinks (rational) selects and executes an action (reactive)

Page 5: João Alexandre Leite Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa { jleite, lmp }@di.fct.unl.pt Pierangelo

Multi-Dimensional Logic Programming

In MDLP knowledge is given by a set of programs.

Each program represents a different piece of updating knowledge assigned to a state.

States are organized by a DAG (Directed Acyclic Graph) representing their precedence relation.

MDLP determines the composite semantics at each state according to the DAG paths.

MDLP allows for combining knowledge updates that evolve along multiple dimensions.

Page 6: João Alexandre Leite Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa { jleite, lmp }@di.fct.unl.pt Pierangelo

Contribution

1 To extend the framework of MDLP with integrity constraints and active rules.

2 To incorporate the framework of MDLP into a multi-agent architecture.

3 To make the DAG of each agent updatable.

Page 7: João Alexandre Leite Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa { jleite, lmp }@di.fct.unl.pt Pierangelo

DAG

A directed acyclic graph DAG is a pair D=(V,E) where V is a set of vertices and E is a set of directed edges.

Page 8: João Alexandre Leite Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa { jleite, lmp }@di.fct.unl.pt Pierangelo

Agent’s language

Atomic formulae:

A objective atoms

not A default atoms

i:C projects

iC updates

Formulae: Li is an atom, an update or a negated update

active rule

generalized rules

Zj is a project

integrity constraint

false L1 Ln Z1 Zm

A L1 Ln

not A L1 Ln

L1 Ln Z

Page 9: João Alexandre Leite Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa { jleite, lmp }@di.fct.unl.pt Pierangelo

Projects and updates

A project j:C denotes the intention of some agent i of proposing the updating the theory of agent j with C.

iC denotes an update proposed by i of the current theory of some agent j with C.

wilma:C

fredC

Page 10: João Alexandre Leite Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa { jleite, lmp }@di.fct.unl.pt Pierangelo

Agents’ knowledge states

Knowledge states represent dynamically evolving states of agents’ knowledge. They undergo change due to updates.

Given the current knowledge state Ps , its successor knowledge state Ps+1 is produced as a result of the occurrence of a set of

parallel updates.

Update actions do not modify the current or any of the previous knowledge states. They only affect the successor state: the precondition of the action is evaluated in the current state and the postcondition updates the successor state.

Page 11: João Alexandre Leite Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa { jleite, lmp }@di.fct.unl.pt Pierangelo

Agent’s language

A project i:C can take one of the forms:

i : ( A L1 Ln )

i : ( L1 Ln Z )

i : ( ?- L1 Ln )

i : ( not A L1 Ln )

i : ( false L1 Ln Z1 Zm )

i : edge(u,v)

i : not edge(u,v)

Page 12: João Alexandre Leite Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa { jleite, lmp }@di.fct.unl.pt Pierangelo

Initial theory of an agent

A multi-dimensional abductive LP for an agent is a tuple:

T = D, PD, A, RD

- D=(V,E) is a DAG s.t. ´V (inspection point of ).

- PD={PV | vV} is a set of generalized LPs.

- A is a set of atoms (abducibles).

- RD={RV | vV} is a set of set of active rules.

Page 13: João Alexandre Leite Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa { jleite, lmp }@di.fct.unl.pt Pierangelo

The agent’s cycle

Every agent can be thought of as an abductive LP equipped with a set of inputs represented as updates.

The abducibles are (names of) actions to be executed as well as explanations of observations made.

Updates can be used to solve the goals of the agent as well as to trigger new goals.

Page 14: João Alexandre Leite Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa { jleite, lmp }@di.fct.unl.pt Pierangelo

Happy story - example

inspection point of Alfredo

alfredo

judge

mother father

girlfriend

alfredo´

state 0

The goal of Alfredo is to be happy

DAG of Alfredo

Page 15: João Alexandre Leite Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa { jleite, lmp }@di.fct.unl.pt Pierangelo

Happy story - example

alfredo

judge

mother father

girlfriend

alfredo´

hasGirlfriend not happy father:(?-happy)not happy mother:(?-happy)getMarried hasGirlfriend girlfriend:proposemoveOut alfredo:rentApartmentcustody(judge,mother) alfredo:edge(father,mother)

{moveOut, getMarried}

state 0

abducibles

Page 16: João Alexandre Leite Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa { jleite, lmp }@di.fct.unl.pt Pierangelo

Happy story - example

alfredo

judge

mother father

girlfriend

alfredo´

state 0

hasGirlfriend not happy father:(?-happy)not happy mother:(?-happy)getMarried hasGirlfriend girlfriend:proposemoveOut alfredo:rentApartmentcustody(judge,mother) alfredo:edge(father,mother)

{moveOut, getMarried}

Page 17: João Alexandre Leite Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa { jleite, lmp }@di.fct.unl.pt Pierangelo

Agent theory

The initial theory of an agent is a multi-dimensional abductive LP.

Let an updating program be a finite set of updates, and S be a set of natural numbers. We call the elements sS states.

An agent at state s, written s , is a pair (T,U):

- T is the initial theory of .

- U={U1,…, Us} is a sequence of updating programs.

Page 18: João Alexandre Leite Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa { jleite, lmp }@di.fct.unl.pt Pierangelo

Multi-agent system

A multi-agent system M={1s ,…, n

s } at state s is a set of

agents 1,…,n at state s.

M characterizes a fixed society of evolving agents.

The declarative semantics of M characterizes the relationship among the agents in M, and how the system evolves.

The declarative semantics is stable models based.

Page 19: João Alexandre Leite Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa { jleite, lmp }@di.fct.unl.pt Pierangelo

Happy story - 1st scenario

Suppose that at state 1, Alfredo receives

from the mother:

and from the father:

mother(happy moveOut)

mother(false moveOut not getMarried)

mother(false not happy)

father(happy moveOut)

father(not happy getMarried)

Page 20: João Alexandre Leite Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa { jleite, lmp }@di.fct.unl.pt Pierangelo

happy moveOutfalse moveOut not getMarried

alfredo

judge

mother father

girlfriend

alfredo´

state 1

happy moveOutnot happy getMarried

Happy story - 1st scenario

In this scenario, Alfredo cannot achieve his goal without producing a contradiction. Not being able to make a decision, Alfredo is not reactive at all.

false not happy

Page 21: João Alexandre Leite Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa { jleite, lmp }@di.fct.unl.pt Pierangelo

Happy story - 2nd scenario

Suppose that at state 1 Alfredo’s parents decide to get divorced, and the judge gives custodity to the mother.

judgecustody(judge,mother)

Page 22: João Alexandre Leite Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa { jleite, lmp }@di.fct.unl.pt Pierangelo

custody(judge,mother)

Happy story - 2nd scenario

alfredo

judge

mother father

girlfriend

alfredo´

state 1

hasGirlfriend not happy father:(?-happy)not happy mother:(?-happy)getMarried hasGirlfriend girlfriend:proposemoveOut alfredo:rentApartmentcustody(judge,mother) alfredo:edge(father,mother)

Page 23: João Alexandre Leite Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa { jleite, lmp }@di.fct.unl.pt Pierangelo

Happy story - 2nd scenario

alfredo

judge

girlfriend

alfredo´

state 2

mother father Suppose that when asked by Alfredo, the parents reply in the same way as in the 1st scenario.

Note that the internal update produces a change in the DAG of Alfredo.

Page 24: João Alexandre Leite Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa { jleite, lmp }@di.fct.unl.pt Pierangelo

Happy story - 2nd scenario

Now, the advice of the mother prevails over and rejects that of his father.

alfredo

judge

girlfriend

alfredo´

state 2

happy moveOutfalse moveOut not getMarried

happy moveOutnot happy getMarried

mother father

false not happy

Page 25: João Alexandre Leite Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa { jleite, lmp }@di.fct.unl.pt Pierangelo

Happy story - 2nd scenario

Thus, Alfredo gets married, rents an apartment, moves out and lives happily ever after.

alfredo

judge

girlfriend

alfredo´

state 2

hasGirlfriend not happy father:(?-happy)not happy mother:(?-happy)getMarried hasGirlfriend girlfriend:proposemoveOut alfredo:rentApartmentcustody(judge,mother) alfredo:edge(father,mother)

mother father

Page 26: João Alexandre Leite Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa { jleite, lmp }@di.fct.unl.pt Pierangelo

Syntactical transformation

The semantics of an agent at state s, s=(T,U), is established by

a syntactical transformation that maps s into an abductive LP:

s = P,A,R

1. s P´,A,R

P´ is a normal LP, A and R are a set of abducibles and active rules.

2. Default negation can then be removed from P´ via the abdual transformation (Alferes et al. ICLP99):

P´ P P is a definite LP.

Page 27: João Alexandre Leite Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa { jleite, lmp }@di.fct.unl.pt Pierangelo

Agent architecture

RationalP

ReactiveP+R

CC

s = P,A,R

can abduce

XSB Prolog XSB Prolog

cannot abduce

InterProlog(Declarativa)

InterProlog(Declarativa)

Java

Page 28: João Alexandre Leite Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa { jleite, lmp }@di.fct.unl.pt Pierangelo

Agent architecture

RationalP

ReactiveP+R

CC

s = P,A,R

UpdateH

projects

ExternalInterface

ext.projectUpdates

ActionH

int.project

Page 29: João Alexandre Leite Luís Moniz Pereira Centro de Inteligência Artificial - CENTRIA Universidade Nova de Lisboa { jleite, lmp }@di.fct.unl.pt Pierangelo

Future work

At the agent level: How to combine logical theories of agents expressed

over graph structures.

How to incorporate other rational abilities, e.g., learning.

At the multi-agent system level: Non synchronous, dynamic multi-agent system.

How to formalize dynamic societies of agents.

How to formalize the notion of organisational reflection.