Aplicatii Web bazate pe semantica, agenti si servicii

Slides:



Advertisements
Similar presentations
8-1 LECTURE 8: Agent Communication An Introduction to MultiAgent Systems
Advertisements

FIPA Interaction Protocol. Request Interaction Protocol Summary –Request Interaction Protocol allows one agent to request another to perform some action.
1 Inteligenta Artificiala Universitatea Politehnica Bucuresti Anul universitar Adina Magda Florea
Sisteme multi-agent Universitatea “Politehnica” din Bucuresti anul universitar Adina Magda Florea
Concrete architectures (Section 1.4) Part II: Shabbir Ssyed We will describe four classes of agents: 1.Logic based agents 2.Reactive agents 3.Belief-desire-intention.
2009 Pag Pag. 2 Agenda 1.Obiectivul proiectului 2.Parteneri 3.Autentificare versus identificare 4.Schema generala 5.Probleme de rezolvat / rezolvate.
Agent Communication Languages CSE5610- Intelligent Software Systems Agent Communication Languages.
BDI Agents Martin Beer, School of Computing & Management Sciences,
Present Perfect Continuous prezentare. schema Afirmativ: S + have/has + been + V-ing… Negativ: S + have/has + not + been + V-ing… Interogativ: have/has.
Agents Communication Languages (ACL) Dumitru Roman Digital Enterprise Research Institute
2015/8/91 FIPA Communicative Acts (CA). 2015/8/92 Introduction to FIPA FIPA is an IEEE Computer Society standards organization that promotes agent-based.
Multi-Agent Systems University “Politehnica” of Bucarest Spring 2011 Adina Magda Florea curs.cs.pub.ro.
Topic 5: Communication and Negotiation Protocols
Agent Communication The nature of communication Indirect communication
EEL 5937 Agent communication EEL 5937 Multi Agent Systems Lecture 10, Feb. 6, 2003 Lotzi Bölöni.
Belief Desire Intention Agents Presented by Justin Blount From Reasoning about Rational Agents By Michael Wooldridge.
Multi-Agent Systems Lecture 3 University “Politehnica” of Bucarest Adina Magda Florea
Multi-Agent Systems University “Politehnica” of Bucarest Spring 2011 Adina Magda Florea curs.cs.pub.ro.
Lecture 2 Multi-Agent Systems Lecture 2 University “Politehnica” of Bucarest Adina Magda Florea
EEL 5937 Agent communication EEL 5937 Multi Agent Systems Lotzi Bölöni.
Lecture 2 Multi-Agent Systems Lecture 2 Computer Science WPI Spring 2002 Adina Magda Florea
Intelligent Agents: Technology and Applications Agent Communications IST 597B Spring 2003 John Yen.
Agent Communication Languages Speech act theory Speech act theory Semantics of languages Semantics of languages KQML KQML FIPA ACL FIPA ACL Comparison.
Computer Science 24/02/20161 Agent Communication FIPA Performatives CPSC /CPSC Rob Kremer Department of Computer Science University of Calgary.
다중 에이전트의 의사소통 모델에 관한 연구 - KQML 언어의 의미론을 중심으로 - 인지과학 협동과정 김 경수.
Agent Communication Michael Floyd SYSC 5103 – Software Agents November 13, 2008.
POSTA ELECTRONICA Ana-Maria Tache Ioana Cristina Ciufu.
Software Agent Technology
LECTURE 9: Agent Communication
Service-Oriented Computing: Semantics, Processes, Agents
Do software agents know what they talk about?
Agent communication Lecture outline
Februarie 2018 ASE Bucuresti
Funcţii Excel definite de utilizator (FDU) în VBA
Inteligenta Artificiala
LOREDANA POPASAV.
SOFTWARE Tipuri de software.
Service-Oriented Computing: Semantics, Processes, Agents
Service-Oriented Computing: Semantics, Processes, Agents
Arhitectura serviciilor web
Les meilleures photos de
Şomerul…..
Paxos Made Simple Autor: Puşcaş Radu George
Sisteme multi-agent Curs 2 Universitatea “Politehnica” din Bucuresti Adina Magda Florea
Gestionarea datelor stiintifice
Sisteme multi-agent Universitatea “Politehnica” din Bucuresti anul universitar Adina Magda Florea
Retele de calculatoare
Sistemul de salarizare pentru funcţionarii publici şi cele mai recente tendinţe ale reformei Germania.
CONVERSII INTRE SISTEME DE NUMERATIE
WebSite Social Tema 2 WebSite Social.
SUBNETAREA.
Curs 6: Introducere în programarea SAS
Funcții C/C++ continuare
prof. mrd. Negrilescu Nicolae Colegiul National Vlaicu Voda
Universitatea Politehnica Bucuresti Anul universitar
Crearea si gazduirea serviciilor
INTERNET SERVICII INTERNET.
SOAP Simple Object Access Protocol
Inteligenta Artificiala
Communication in Multi-Agent Systems
Îmbunătăţirea serviciilor publice prin intermediul Chartelor de Servicii: Elaborarea şi implementarea Planurilor de Acţiune pentru Îmbunătăţirea Serviciilor.
A great way to create a channel of communication
SOAP -Simple Object Access Protocol-
Software open source in industria software
Stiluri / tipare arhitecturale
Utilizarea tehnologiei prin metoda proiectelor
Comunicare in medii electronice
Inteligenta Artificiala Universitatea Politehnica Bucuresti Anul universitar Adina Magda Florea
Service-Oriented Computing: Semantics, Processes, Agents
Presentation transcript:

Aplicatii Web bazate pe semantica, agenti si servicii http://turing.cs.pub.ro/webs_07 Universitatea Politehnica Bucuresti Anul universitar 2007-2008, Master Adina Magda Florea

Curs 5 Agenti si arhitecturi agenti Sisteme multi-agent (SMA) Comunicare in SMA

1. Structura conceptuala a agentilor Rationalitatea unui agent Ce inseamna rationalitatea unui agent Cum putem masura rationalitatea unui agent? Sa gasim o masura a performantei 3

Un agent este situat in mediu Perpece mediul prin sensori si actioneaza asupra lui prin efectori Scop: proiectarea unui program – functie care realizeaza corespondenta sensori - efectori Agent = architectura + program Mediu accesibil vs. inaccesibil determinist vs. non-determinist static vs. dinamic discret vs. continu 4

Modelare agent E = {e1, .., e, ..} P = {p1, .., p, ..} A = {a1, .., a, ..} Agent reactiv see : E  P action : P  A env : E x A  E (env : E x A  P(E)) Componenta decizie Agent action P A Componenta Componenta perceptie executie see action Mediu env (E) 5

Modelare agent Mai multi agenti reactivi seei : E  Pi A1,…, Ai,.. actioni : Pi  Ai env : E x A1 x … An  P(E) A1,…, Ai,.. P1,…, Pi,.. (de obicei identice) Agent (A1) Componenta decizie action Agent (A2) Componenta Componenta perceptie executie Agent (A3) see action Mediu env 6

Nu folosesc reprezentari simbolice sau rationament Unitati simple de prelucrare care percep mediul si reactioneaza la schimbarile din mediu Nu folosesc reprezentari simbolice sau rationament Inteligenta nu este situata la nivel individual ci distribuita in sistem, rezulta din interactiunea entitatilor cu mediu – “emergence” 7

Modelare agent E = {e1, .., e, ..} P = {p1, .., p, ..} A = {a1, .., a, ..} S = {s1, .., s, ..} Agent cu stare see : E  P next : S x P  S action : S  A env : E x A  P(E) Componenta S decizie Agent action, next P A Componenta Componenta perceptie executie see action Mediu env (E) 8

Modelare agent Mai multi agenti cognitivi seei : E  Pi S1,…, Si,.. nexti : Si x P  Si actioni : Si x I  Ai interi : Si  I env : E x A1 x … An  P(E) S1,…, Si,.. A1,…, Ai,.. P1,…, Pi,.. (nu intotdeauna identice) I = {i1, .., ik,…} Agent (A1) Componenta decizie Componenta interactiune inter action, next Agent (A2) Componenta Componenta perceptie executie Agent (A3) see action Mediu 9 env

Modelare agent Agenti cu stare si scopuri goal : E  {0, 1} Agenti cu utilitate utility : E  R Mediu nedeterminist env : E x A  P(E) Probabilitatea estimata de un agent ca rezultatul unei actiuni (a) executata in e sa fie noua stare e’ 10

Modelare agent Agenti cu utilitate Utilitatea estimata (expected utility) a unei actiuni a intr-o stare e, dpv al agentului Principiul utilitatii estimate maxime Maximum Expected Utility (MEU) 11

Cum modelam? Curatirea unei camere Agent reactiv Agent cognitiv Agent cognitiv cu utilitate Ce actiuni selectez? Ce se face daca rezultatul actiunilor nu este cunoscut/sigur? 12

Agenti cognitivi Modelul uman al perspectivei asupra lumii  caracterizare agent utilizand reprezentari simbolice si notiuni mentale knowledge - cunostinte beliefs - convingeri desires, goals – dorinte, scopuri intentions - intentii commitments - angajamente obligations - obligatii De ce se utilizeaza aceste notiuni? 13

2. Arhitecturi de agenti Arhitecturi pentru agenti cognitivi Arhitecturi pentru agenti reactivi 14

Arhitectura BDI Specificatii de nivel inalt Means-end analysis Beliefs (convingeri) = informatii pe care agentul le are despre lume Desires (dorinte) = stari pe care agentul ar vrea sa le vada realizate Intentions (intentii) = dorinte (sau actiuni) pe care agentul s-a angajat sa le indeplineasca Rolul intentiilor 15

Arhitectura BDI 16 percepts Belief revision Beliefs B = brf(B, p) Knowledge B = brf(B, p) Opportunity analyzer Deliberation process Desires D = options(B, D, I) Intentions Filter Means-end reasonner I = filter(B, D, I) Intentions structured in partial plans  = plan(B, I) Library of plans Plans Executor 16 actions

Bucla de control a agentului B = B0 I = I0 D = D0 while true do get next perceipt p B = brf(B,p) D = options(B, D, I) I = filter(B, D, I)  = plan(B, I) execute() end while 17

Strategii de angajare Optiune aleasa de agent ca intentie – agentul s-a angajat pentru acea optiune Persistenta intentiilor Interbare: Cat timp se angajeaza un agent fata de o inetntie? Angajare oarba (Blind commitment) Angajare limitata (Single minded commitment) Angajare deschisa (Open minded commitment) 18

19 Bucla de control BDI angajare oarba B = B0 I = I0 D = D0 while true do get next perceipt p B = brf(B,p) D = options(B, D, I) I = filter(B, D, I)  = plan(B, I) while not (empty() or succeeded (I, B)) do  = head() execute()  = tail() if not sound(, I, B) then end while Bucla de control BDI angajare oarba 19

20 Bucla de control BDI angajare limitata B = B0 I = I0 D = D0 while true do get next perceipt p B = brf(B,p) D = options(B, D, I) I = filter(B, D, I)  = plan(B, I) while not (empty() or succeeded (I, B) or impossible(I, B)) do  = head() execute()  = tail() if not sound(, I, B) then end while Bucla de control BDI angajare limitata 20

21 Bucla de control BDI angajare deschisa B = B0 I = I0 D = D0 while true do get next perceipt p B = brf(B,p) D = options(B, D, I) I = filter(B, D, I)  = plan(B, I) while not (empty() or succeeded (I, B) or impossible(I, B)) do  = head() execute()  = tail() end while Bucla de control BDI angajare deschisa if reconsider(I, B) then Replan 21

22 Nu exista o unica arhitectura BDI PRS - Procedural Reasoning System (Georgeff) UMPRS si JAM – arhitecturi BDI (http://www.marcush.net/IRS/irs_downloads.html) JACK – platforma de dezvoltare C-BDI – BDI – nucleu Jack (http://www.aosgrp.com/index.html) JASON – arhitectura BDI (http://jason.sourceforge.net/JasonWebSite/Jason%20Home.php) 22

Arhitectura reactiva Arhitectura de subsumare - Brooks, 1986 23 (1) Luarea deciziilor = {Task Accomplishing Behaviours} Fiecare comportare (behaviour) = o functie ce realizeaza o actiune TAB – automate finite Implementare: situation  action (2) Mai multe comportari pot fi activate in paralel 23

Arhitectura de subsumare Un TAB este reprezentat de un modul de competenta (c.m.) Fiecarte c.m. executa un task simplu c.m. opereaza in paralel Nivele inferioare au prioritate fata de cele superioare c.m. la nivel inferior monitorizeaza si influenteaza intrarile si iesirile c.m. la nivel superior  subsumtion architecture 24

25 Sensors Effectors Competence Module (2) Explore environ Module (0) Avoid obstacles Effectors Module (1) Move around Input (percepts) Output (actions) Competence Module (1) Move around Supressor node Inhibitor node Competence Module (0) Avoid obstacles 25

Comportare arhitectura subsumare (c, a) – conditie-actiune; descrie comportarea R = { (c, a) | c  P, a  A} - multimea reguli de comportare   R x R – relatie binara totala de inhibare function action( p: P) var fired: P(R), selected: A begin fired = {(c, a) | (c, a)  R and p  c} for each (c, a)  fired do if   (c', a')  fired such that (c', a')  (c, a) then return a return null end 26

(1) Daca detectez obstacol atunci schimb directia Ne aflam pe o planeta necunoscuta care contine aur. Mostre de teren trebuie aduse la nava. Exista mai multi agenti autonomi care nu pot comunica intre ei. Nava transmite semnale radio: gradient al campului Comportare (1) Daca detectez obstacol atunci schimb directia (2) Daca am mostre si sunt la baza atunci depune mostre (3) Daca am mostre si nu sunt la baza atunci urmez directia baza (4) Daca gasesc mostre atunci le iau (5) Daca adevarat atunci ma misc in mediu (1)  (2)  (3)  (4)  (5) 27

(1)  (2)  (3)  (4)  (5)  (6) Agentii pot comunica indirect: - Depun si culeg boabe radioactive - Pot seziza aceste boabe radioactive (1) Daca detectez obstacol atunci schimb directia (2) Daca am mostre si sunt la baza atunci depune mostre (3) Daca am mostre si nu sunt la baza atunci depun boaba radioactiva si urmez directia baza (4) Daca gasesc mostre atunci le iau (5) Daca gasesc boabe radioactive atunci iau una si urmez directia baza (6) Daca adevarat atunci ma misc in mediu (1)  (2)  (3)  (4)  (5)  (6) 28

Swarms Swarm intelligence – comportarea colectiva a sistemelor descentralizate si cu auto-organizare Agenti reactivi, emergenta comportarii colective furnici pasari vaci Swarm robotics ACO = ant colony optimization = algoritm de optimizare – furnici artificiale care construiesc solutia prin miscarea pe graful problemei: depun feromoni artificiali Proiectul Swarm http://www.swarms.org/ 29

3. Comunicare in SMA Comunicare indirecta Comunicare directa de nivel inalt 30

Comunicare indirecta In general pt agenti reactivi Comunicare prin semnale V(x)=V(x0)/dist(x,x0) Comunicare prin "urme" lasate in mediu x0  S S - stimulus Agent A (stimulus genreaza comportare P) Agent B 31

Comunicare indirecta Comunicare in sisteme tip "blackboard" 32 Control Blackboard KS KSAR KS KS KS 32

Comunicare directa ACL = Agent Communication Languages SMA – limbaje de nivel inalt Presupun in general agenti BDI ACL = Agent Communication Languages Comunica cunostinte  RC Intelegerea mesajului in context  ontologii Comunicare vazuta ca o actiune – acte de vorbire (de comunicare) 33

Acte de vorbire 34 Un act de comunicare: Categorii ilocutionale J. Austin - How to do things with words, 1962, J. Searle - Speech acts, 1969 Un act de comunicare: locutie = fraza spusa de locutor ilocutie = intelesul dorit spre a fi comunicat de locutor (performativa) prelocutie = actiunea care rezulta din locutie Maria i-a spus lui Gigel: "Te rog inchide usa" locutie ilocutie continut prelocutie: usa inchisa Categorii ilocutionale Asertive Directive Comisive Permisive Prohibitive Declarative Expresive 34

3 straturi ale comunicarii Primitive si protocol Limbaje pentru continut KIF Prolog Clips SQL DL FIPA-SL, FIPA-KIF Ontologii DAML OWL ACL Content language Ontology 35

KIF 36 Knowledge Interchange Format (KIF) Facts (salary 015-46-3946 john 72000) (salary 026-40-9152 michael 36000) (salary 415-32-4707 sam 42000) Asserted relation (> (* (width chip1) (length chip1)) (* (width chip2) (length chip2))) Rule (=> (and (real-number ?x) (even-number ?n)) (> (expt ?x ?n) 0)) Procedure (progn (fresh-line t) (print "Hello!") (fresh-line t)) 36

ACL Cele 3 straturi separa: Content language Ontology ACL Cele 3 straturi separa: continutul si semantica mesajului semantica comunicarii (acte vorbire) – independenta de domeniu Un ACL are o semantica formala bazata pe un formalism logic 2 ACL-uri care s-au impus: KQML FIPA-ACL 37

KQML 38 Content Communication Message Tpuri de performative KQML de baza - protocol retea - act de vorbire Optional - limbajul continutului - ontologie Parametrii comunicarii - identitate emitator si receptor - identificator unic asociat comunicarii Content Communication Message Tpuri de performative Queries - ask-one, ask-all, ask-if, stream-all,... Generative - standby, ready, next, rest, discard, generate,... Response - reply, sorry ... Informational - tell, untell, insert, delete, ... Capability definition - advertise, subscribe, recommend... Networking - register, unregister, forward, route, ... 38

KQML - exemple 39 (ask-one :sender joe :receiver ibm-stock :reply-with ibm-stock :language PROLOG :ontology NYSE-TICKS :content (price ibm ?price) ) (tell :sender willie :receiver joe :reply-with block1 :language KIF :ontology BlockWorld :content (AND (Block A) (Block B) (On A B)) ) A ask-one(P) B tell(P1,P2,...) ask-all(P) tell(P) A B stream-all(P) B tell(P1) A tell(P2) eos 39

Agent facilitator 40 point-to-point tell(P) ask(P) A B subscribe(ask(P)) tell(P) A B recommend(ask(P)) advertise(ask(P)) tell(P) ask(P) reply(B) advertise(ask(P)) tell(P) recruit(ask(P)) reply(A) B A A B 40

Semantica KQML 41 tell(A,B,X) Logica modala Bel(A,P) Know(A,S) Want(A,S) Int(A,S) Preconditii: starea agentului emitator si a celui receptor pt a trimite si receptiona un mesaj Postconditii – statrea emitatorului si receptorului dupa primirea cu succes a unui mesaj Conditie de finalizare – dupa incheierea mesajului si realizarea intentiei asociate tell(A,B,X) Pre(A): Bel(A,X)  Know(A, Want(B, Know(B, Bel(A,X)))) Pre(B): Int(B, Know(B, Bel(A,X))) Post(A): Know(A, Know(B, Bel(A,X))) Post(B): Know(B, Bel(A,X)) Completion: Know(B, Bel(A,X)) 41

FIPA ACL (inform :sender (agent-identifier :name i) Asemanator cu KQML Primitive (putin) diferite Semantica semnificativ diferita (inform   :sender (agent-identifier :name i)   :receiver (set (agent-identifier :name j))   :content     "weather (today, raining)"   :language Prolog) 42

FIPA - exemple 43 (request :sender (agent-identifier :name i) :receiver (set (agent-identifer :name j) :content ((action (agent-identifier :name j) (deliver box7 (loc 10 15)))) :protocol fipa-request :language fipa-sl :reply-with order56 ) (agree sender (agent-identifier :name j) :receiver (set (agent-identifer :name i) (deliver box7 (loc 10 15))) (priority order56 low)) :in-reply-to order56 ) 43

FIPA - primitive FIPA – acte de comunicare Informative - query_if, subscribe, inform, inform_if, confirm, disconfirm, not_understood Distributie taskuri - request, request_whenever, cancel, agree, refuse, failure Negociere - cfp, propose, accept_proposal, reject_proposal 44

FIPA ACL 45 SL (Semantic Language) B  - belief C  - desire U  - uncertain belief Bif  = B  V B~  Preconditii – conditiile necesare pt agentul emitator; nu neaparat trimite mesaj Rational effect – efectul sperat la receptor; nu neaparat realizat <A, inform(B, )> Pre: BA   BA (BifB   UifB ) Post: BB  45

FIPA ACL Inform indica faptul ca agentul A: <A, inform(B, )> Pre: BA   BA (BifB   UifB ) Post: BB  Inform indica faptul ca agentul A:  crede ca  este adevrat, are intentia ca B sa creada de asemenea  adevarat, si Nu crede ca B crede ceva despre adevarul lui    Daca B primeste mesajul de Inform atunci: B stie ca A crede ca  este adevarat, si, A doreste ca B sa creada ca  este adevrat Daca B ajunge sa creada ca este adevrat depinde de increderea lui B in A. 46

FIPA - Protocoale FIPA-query, FIPA-request, FIPA-contract-net, ... 47 Defineste o serie de protocoale standard FIPA-query, FIPA-request, FIPA-contract-net, ... 47

FIPA - Request Pt exceptii – meta-protocol 48

Contract net Initiator si contractori (potentiali) 49

FIPA - Contract net Pt exceptii – meta-protocol 50