Programming Semantic Agents
description
Transcript of Programming Semantic Agents
[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
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
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
Several types of agents
Reactive : perceive environment
Proactive : goal directed
Intelligent : Reactive Pro-active Social Ability
Cognitive Knowledge Management Process Reasoning abilities High level representation of environment
Universiteit Twente - 19/03/2009 4
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
Details : BIBSTER
Universiteit Twente - 19/03/2009 6
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
Semantic Web
Universiteit Twente - 19/03/2009 8
Semantic Web Layers – Tim Berners Lee
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
Our Goal (refined)
Build agents that have their
behaviours expressed in SWRL
Universiteit Twente - 19/03/2009 13
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
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
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
Agent Internal Architecture
Universiteit Twente - 19/03/2009 17
Knowledge BASE
Engine
Atomic actions
Knowledge of the agent
Low level implementation
Start RulesExecute Actions
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
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
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}
Implementation
JAVA Based Prototype using following libs:
JADE : MAS Framework
Protege-OWL
JENA Framework
Pellet Reasoner
Universiteit Twente - 19/03/2009 21
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
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) ∧
Execution of Behaviour
Engine queries SWRL repository through API :NextState value ? Answer : A
A != BEGIN, there is a transitionEngine queries repository to get the Action Sequence
Update the current state to A
For each action Get the name from repository : RegisterDF
Get the parameters : none in this case
Call the low level atomic action with the parameters : execution of the action
Universiteit Twente - 19/03/2009 24
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 t
o A
Universiteit Twente - 19/03/2009 26
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
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
Questions ?
Universiteit Twente - 19/03/2009 29