- Laboratoire d'InfoRmatique en Image et Systèmes d'information LIRIS UMR 5205 CNRS/INSA.

26
[email protected] - http://liris.cnrs.fr/julien.subercaze/ Laboratoire d'InfoRmatique en Image et Systèmes d'information UMR 5205 CNRS/INSA de Lyon/Université Claude Bernard Lyon 1/Université Lumière Lyon 2/Ecole Centrale Université Claude Bernard Lyon 1, bâtiment Nautibus 43, boulevard du 11 novembre 1918 — F-69622 Villeurbanne cedex http://liris.cnrs.fr UMR 5205 Universiteit Twente - 19/03/2009 Universiteit Twente - 19/03/2009 Programming Semantic Agents Julien Subercaze

description

What is a MAS Multi Agent System is useful paradigm for Distributed Artificial Intelligence an for Distributed Knowledge Management Agent are autonomous Able to interact with their environment Able to interact with other agents Definitions vary between MAS subdomains Universiteit Twente - 19/03/2009 3

Transcript of - Laboratoire d'InfoRmatique en Image et Systèmes d'information LIRIS UMR 5205 CNRS/INSA.

Page 1: -  Laboratoire d'InfoRmatique en Image et Systèmes d'information LIRIS UMR 5205 CNRS/INSA.

[email protected] - http://liris.cnrs.fr/julien.subercaze/

Laboratoire d'InfoRmatique en Image et Systèmes d'informationLIRIS UMR 5205 CNRS/INSA de Lyon/Université Claude Bernard Lyon 1/Université Lumière Lyon 2/Ecole Centrale de Lyon

Université Claude Bernard Lyon 1, bâtiment Nautibus43, boulevard du 11 novembre 1918 — F-69622 Villeurbanne cedex

http://liris.cnrs.fr

UMR 5205

Universiteit Twente - 19/03/2009

Universiteit Twente - 19/03/2009

Programming Semantic Agents

Julien Subercaze

Page 2: -  Laboratoire d'InfoRmatique en Image et Systèmes d'information LIRIS UMR 5205 CNRS/INSA.

Summary

Introduction to MAS

Cognitive agents – a state of the art

Restrictions on cognitive agents

Semantic Agents

Implementation

Conclusion

Universiteit Twente - 19/03/2009 2

Page 3: -  Laboratoire d'InfoRmatique en Image et Systèmes d'information LIRIS UMR 5205 CNRS/INSA.

What is a MAS

Multi Agent System is useful paradigm for Distributed Artificial Intelligence an for Distributed Knowledge Management

Agent are autonomousAble to interact with their environmentAble to interact with other agents

Definitions vary between MAS subdomains

Universiteit Twente - 19/03/2009 3

Page 4: -  Laboratoire d'InfoRmatique en Image et Systèmes d'information LIRIS UMR 5205 CNRS/INSA.

Several types of agents

Reactive : perceive environmentProactive : goal directedIntelligent :

Reactive Pro-active Social Ability

Cognitive Knowledge Management Process Reasoning abilities High level representation of environment

Universiteit Twente - 19/03/2009 4

Page 5: -  Laboratoire d'InfoRmatique en Image et Systèmes d'information LIRIS UMR 5205 CNRS/INSA.

Cognitive Agents

Our scope : Cognitive Agents

Architectures of cognitive agents, related work: Not implemented : IDA (Intelligent Distribution Agent, U of

Memphis)

Dedicated applications in which Knowledge Base and algorithm for behaviours are decoupled :

Bibster : bibliographic references search (AIFB, Germany) and its clones : SemreX and SocioBiblog

Sifo-Peers : Decentralized Social Network (DERI, Ireland)

Universiteit Twente - 19/03/2009 5

Page 6: -  Laboratoire d'InfoRmatique en Image et Systèmes d'information LIRIS UMR 5205 CNRS/INSA.

Details : BIBSTER

Universiteit Twente - 19/03/2009 6

Page 7: -  Laboratoire d'InfoRmatique en Image et Systèmes d'information LIRIS UMR 5205 CNRS/INSA.

Semantic Agent : why ?Our goal : Extend agent capabilities by introducing reflection on Reasoning.

Universiteit Twente - 19/03/2009 7

Knowledge

Goals

Behaviour

{ Cognitive Agents}+ Behaviour

as Knowledge

=

Semantic Agents

Our contribution What exists

Page 8: -  Laboratoire d'InfoRmatique en Image et Systèmes d'information LIRIS UMR 5205 CNRS/INSA.

Semantic Web

Universiteit Twente - 19/03/2009 8

Semantic Web Layers – Tim Berners Lee

Page 9: -  Laboratoire d'InfoRmatique en Image et Systèmes d'information LIRIS UMR 5205 CNRS/INSA.

Reasoning and Behaviour

Agent behaviour is a part of its knowledge

Technology used : Nowadays, Web Semantic Technologies is the most

advanced to represent technologies OWL stores knowledge SWRL gives extension to express rules on OWL

Page 10: -  Laboratoire d'InfoRmatique en Image et Systèmes d'information LIRIS UMR 5205 CNRS/INSA.

Our Goal (refined)

Build agents that have their behaviours expressed in SWRL

Universiteit Twente - 19/03/2009 13

Page 11: -  Laboratoire d'InfoRmatique en Image et Systèmes d'information LIRIS UMR 5205 CNRS/INSA.

Building behaviour representation

Agent Behaviour : sequence of actions

Triggered by in internal/external agents

We can represent the behaviour as extended finite state machine :

Transitions triggered by if statement

Transition => execution of specified actions

Universiteit Twente - 19/03/2009 14

Page 12: -  Laboratoire d'InfoRmatique en Image et Systèmes d'information LIRIS UMR 5205 CNRS/INSA.

Agent model

Defining the internal agent architecture

List of possible atomic actions Internal :

Add/Remove/Modify : Class, Property, Individual, Rule External :

Receive Messages

These actions have parameters : receiver, content, …

Universiteit Twente - 19/03/2009 15

Page 13: -  Laboratoire d'InfoRmatique en Image et Systèmes d'information LIRIS UMR 5205 CNRS/INSA.

Agent Behaviour Model

Universiteit Twente - 19/03/2009 16

State • Begin• A• B• …• End

Actions :• Add Property• Remove Property• Add Individual• ….• Send Message• Receive Message

Page 14: -  Laboratoire d'InfoRmatique en Image et Systèmes d'information LIRIS UMR 5205 CNRS/INSA.

Agent Internal Architecture

Universiteit Twente - 19/03/2009 17

Knowledge BASE

Engine

Atomic actions

Knowledge of the agent

Low level implementation

Start RulesExecute Actions

Page 15: -  Laboratoire d'InfoRmatique en Image et Systèmes d'information LIRIS UMR 5205 CNRS/INSA.

Agent interpreter

Universiteit Twente - 19/03/2009 18

Engine : Fire Rules

Clock

Execute actions sequence

incoming messages

outgoing messages

If state updated

Knowledge Base Update : • Behaviour• Knowledge• State

Rules and stateActions names and parameters

Knowledge BaseRules – States – Messages-

Knowledge

Page 16: -  Laboratoire d'InfoRmatique en Image et Systèmes d'information LIRIS UMR 5205 CNRS/INSA.

Example of behaviour

Simple behaviour : Register to the yellow pages Send a query to the agent « Bob » Wait for answer

Use of atomical actions (12 in total): RegisterDF SendMessage WaitForMessage …

Each action takes parameters(name/value)

Universiteit Twente - 19/03/2009 19

Page 17: -  Laboratoire d'InfoRmatique en Image et Systèmes d'information LIRIS UMR 5205 CNRS/INSA.

Example of behaviour II

Universiteit Twente - 19/03/2009 20

Begin A B{RegisterDF} {SendMessage}

Param Value

Performative Query

Content « Select ?x ..  »

SendTo «Bob»

C{Wait4Message}

END

{AddIndividual}

Page 18: -  Laboratoire d'InfoRmatique en Image et Systèmes d'information LIRIS UMR 5205 CNRS/INSA.

Implementation

JAVA Based Prototype using following libs:

JADE : MAS Framework

Protege-OWL

JENA Framework

Pellet Reasoner

Universiteit Twente - 19/03/2009 21

Page 19: -  Laboratoire d'InfoRmatique en Image et Systèmes d'information LIRIS UMR 5205 CNRS/INSA.

Implementation layers

Universiteit Twente - 19/03/2009 22

Knowledge Base

Engine

Atomic actions

Knowledge of the agent

Low level implementation

Start RulesExecute Actions

OWL-DL SWRL

JAVASWRL APIJENA APIProtege API

JAVAJade API

Page 20: -  Laboratoire d'InfoRmatique en Image et Systèmes d'information LIRIS UMR 5205 CNRS/INSA.

Example of behaviour II

Universiteit Twente - 19/03/2009 23

Begin A B{RegisterDF} {SendMessage}

Param Value

Performative Query

Content « Select ?x ..  »

SendTo «Ralf»

C{Wait4Message}

END

{AddIndividual}

State(?x) hasStateValue(?x,BEGIN) NextState(?y)∧ ∧=> hasStateValue(?y,A) hasValue(Action,RegisterDF) ∧

Page 21: -  Laboratoire d'InfoRmatique en Image et Systèmes d'information LIRIS UMR 5205 CNRS/INSA.

Execution of BehaviourEngine queries SWRL repository through API :

NextState value ? Answer : A

A != BEGIN, there is a transitionEngine queries repository to get the Action SequenceUpdate the current state to A

For each action Get the name from repository : RegisterDFGet the parameters : none in this caseCall the low level atomic action with the parameters : execution of the action

Universiteit Twente - 19/03/2009 24

Page 22: -  Laboratoire d'InfoRmatique en Image et Systèmes d'information LIRIS UMR 5205 CNRS/INSA.

Timeline of a transition

Universiteit Twente - 19/03/2009 25

KB

Engine

AtomicActions

A

Nex

tSta

te

Val

ue ?

Act

ionL

ist

Val

ue ?

{Reg

iste

rDF}

Exe

cute

R

egis

er D

F

Message to DF

Upd

ate

Sta

te to

A

Page 23: -  Laboratoire d'InfoRmatique en Image et Systèmes d'information LIRIS UMR 5205 CNRS/INSA.

Universiteit Twente - 19/03/2009 26

Page 24: -  Laboratoire d'InfoRmatique en Image et Systèmes d'information LIRIS UMR 5205 CNRS/INSA.

ConclusionWhy : Cognitive Agents implementation always hardcodes behaviour of agents !

Our Solution : Behaviour is part of Knowledge, we describe it using Semantic Web Rules and also defined an agent architecture.

Advantages Reflection on the behaviour of the agent Behaviour is a piece of agents knowledge Behaviour no more depends from agents implementation

language

DrawbacksProgramming is difficult

Universiteit Twente - 19/03/2009 27

Page 25: -  Laboratoire d'InfoRmatique en Image et Systèmes d'information LIRIS UMR 5205 CNRS/INSA.

Perspectives :

Opens a new way of agent capabilities !! What are the possible applications ? Domains of interest ?

How to exchange Agents Behaviours ?

Use of Virtual Knowledge Communities appears to be the most common solution since agents already exchange knowledge within the communities.

We need an IDE to program Agents

Consistency Checking required

Universiteit Twente - 19/03/2009 28

Page 26: -  Laboratoire d'InfoRmatique en Image et Systèmes d'information LIRIS UMR 5205 CNRS/INSA.

Questions ?

Universiteit Twente - 19/03/2009 29