Inteligenta Artificiala

Slides:



Advertisements
Similar presentations
DISTRIBUTED COMPUTING PARADIGMS
Advertisements

1DAML PI meeting, October DAML and Agents DAML and Agents Breakout Session DAML PI Meeting 17 October 2002 Tim Finin.
ARCHITECTURES FOR ARTIFICIAL INTELLIGENCE SYSTEMS
FIPA Interaction Protocol. Request Interaction Protocol Summary –Request Interaction Protocol allows one agent to request another to perform some action.
5-1 Chapter 5: REACTIVE AND HYBRID ARCHITECTURES.
Overview UML Extensions for Agents UML UML Agent UML (AUML) Agent UML (AUML) Agent Interaction Protocols Agent Interaction Protocols Richer Role Specification.
Sisteme multi-agent Universitatea “Politehnica” din Bucuresti anul universitar Adina Magda Florea
Faculty of Management and Organization Emergence of social constructs and organizational behaviour How cognitive modelling enriches social simulation Martin.
Specifying Agent Interaction Protocols with AUML and OCL COSC 6341 Project Presentation Alexei Lapouchnian November 29, 2000.
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.
INTERACTION AND COMMUNICATION. Coordination A property of interaction among a set of agents performing some activity in a shared state. The degree of.
Multiagent Systems and Societies of Agents
2009 Pag Pag. 2 Agenda 1.Obiectivul proiectului 2.Parteneri 3.Autentificare versus identificare 4.Schema generala 5.Probleme de rezolvat / rezolvate.
BDI Agents Martin Beer, School of Computing & Management Sciences,
Agents Communication Languages (ACL) Dumitru Roman Digital Enterprise Research Institute
Multi-Agent Systems University “Politehnica” of Bucarest Spring 2011 Adina Magda Florea curs.cs.pub.ro.
Computer Science 30/08/20151 Agent Communication BDI Communication CPSC /CPSC Rob Kremer Department of Computer Science University of Calgary.
Topic 5: Communication and Negotiation Protocols
2APL A Practical Agent Programming Language March 6, 2007 Cathy Yen.
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.
© Enn Tyugu1 Algorithms of Artificial Intelligence Lecture 9: Intelligent agents E. Tyugu Spring 2003.
DISTRIBUTED COMPUTING PARADIGMS. Paradigm? A MODEL 2for notes
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Multi-Agent Systems University “Politehnica” of Bucarest Spring 2011 Adina Magda Florea curs.cs.pub.ro.
AOSE Multi-Agent Interaction. Agents and Interaction Interaction forms the basis of an agents collaborative problem solving capabilities. –Agents are.
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.
ICT Today´s lecture 14:15Agent Technologies by Ismar Slomic 15:15 Practical Architecture Work at Telenor by Jan Øyvind Aagedal 16:15 Group exercise is.
Lecture 2 Multi-Agent Systems Lecture 2 Computer Science WPI Spring 2002 Adina Magda Florea
Agent Overview. Topics Agent and its characteristics Architectures Agent Management.
Intelligent Agents: Technology and Applications Agent Communications IST 597B Spring 2003 John Yen.
Software Agents & Agent-Based Systems Sverker Janson Intelligent Systems Laboratory Swedish Institute of Computer Science
Lecture 9 Multi-Agent Systems Lecture 9 University “Politehnica” of Bucarest Adina Magda Florea
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.
Intelligent Agents Chapter 2. How do you design an intelligent agent? Definition: An intelligent agent perceives its environment via sensors and acts.
Agent Communication Michael Floyd SYSC 5103 – Software Agents November 13, 2008.
LECTURE 9: Agent Communication
Service-Oriented Computing: Semantics, Processes, Agents
Do software agents know what they talk about?
CMSC 691M Agent Architectures & Multi-Agent Systems
Conception de modèles pour la simulation
Agent communication Lecture outline
CHAPTER 3 Architectures for Distributed Systems
Februarie 2018 ASE Bucuresti
Intelligent Agents Chapter 2.
Service-Oriented Computing: Semantics, Processes, Agents
Service-Oriented Computing: Semantics, Processes, Agents
Arhitectura serviciilor web
Paxos Made Simple Autor: Puşcaş Radu George
Sisteme multi-agent Curs 2 Universitatea “Politehnica” din Bucuresti Adina Magda Florea
Sisteme multi-agent Universitatea “Politehnica” din Bucuresti anul universitar Adina Magda Florea
Retele de calculatoare
Aplicatii Web bazate pe semantica, agenti si servicii
Introduction to Multi-Agent Systems
Communication in Multi-Agent Systems
A great way to create a channel of communication
SOAP -Simple Object Access Protocol-
Stiluri / tipare arhitecturale
Inteligenta Artificiala Universitatea Politehnica Bucuresti Anul universitar Adina Magda Florea
Service-Oriented Computing: Semantics, Processes, Agents
Artificial Intelligence Chapter 25. Agent Architectures
AGENT FRAMEWORK By- Arpan Biswas Rahul Gupta.
Semantic Web Towards a Web of Knowledge - Projects
Semantic Resolution in a Simple E-Commerce Application
#01 Client/Server Computing
Habib Ullah qamar Mscs(se)
Presentation transcript:

Inteligenta Artificiala Universitatea Politehnica Bucuresti Anul universitar 2010-2011 Adina Magda Florea http://turing.cs.pub.ro/ia_10 si curs.cs.pub.ro

Curs nr. 12 Agenti inteligenti

1. De ce agenti? Sisteme complexe, pe scara larga, distribuite Sisteme deschise si heterogene – construirea independenta a componentelor Distributia resurselor Distributia expertizei Personalizare Interoperabilitatea sistemelor/ integrare sisteme software exsitente (legacy systems) 3

Agent? Termenul agent este frecvent utilizat in: Sociologie, biologie, psihologie cognitiva, psihologie sociala si Stiinta calculatoarelor  IA Ce sunt agentii? Ce sunt agentii in stiinta calculatoarelor? Aduc ceva nou? Cum difera agentii software de alte programe? 4

2. Definitii ale agentilor in stiinta calculatoarelor Nu exista o definitie unanim acceptata De ce este greu de definit? IA, agenti inteligenti, sisteme multi-agent Aparent agentii sunt dotati cu inteligenta Sunt toti agentii inteligenti? Agent = definit mai mult prin caracteristici, unele pot fi considerate ca manifestari ale unui comportament inteligent 5

Definitii agenti “De cele mai multe ori, oamenii folosesc termenul agent pentru a referi o etitate care functioneaza permanent si autonom intr-un mediu in care exsita alte procese si/sau alti agenti” (Shoham, 1993) “Un agent este o entitate care percepe mediul in care se afla si actioneaza asupra acestuia” (Russell, 1997)

“Agent = un sistem (software sau hardware) cu urmatoarele proprietati: autonomie – agentii opereaza fara interventai directa a utilizatorui si au un anumit control asupra actiunilor si starilor lor; Actiune autonoma flexibila reactivitate: agentii percep mediul si reactioneaza corespunzator al schimbarile din acesta; pro-activitate: agentii, pe langa reactia la schimbarile din mediu, sunt capabili sa urmareasca executia scopurilor si sa actioneze independent; abilitati sociale – agentii interactioneaza cu alti agenti sau cu utilizatorul pe baza unui limbaj de comunicare. (Wooldridge and Jennings, 1995) 7

3. Caracteristici agenti 2 directii de definitie Definirea unui agent izolat Definirea agentilor in colectivitate  dimensiune sociala  SMA 2 tipuri de definitii Nu neaparat agenti inteligenti Include o comportare tipica IA  agenti inteligenti 8

Caracteristici agenti Actioneaza pentru un utilizator sau un program Autonomie Percepe mediul si actioneaza asupra lui reactiv Actiuni pro-active Caracter social Functionare continua (persistent software) Mobilitate inteligenta? Scopuri, rationalitate Rationament, luarea deciziilor cognitiv Invatare/adaptare Interactiune cu alti agenti – dimensiune sociala Alte moduri de a realiza inteligenta? 9

SMA – mai multi agenti in acelasi mediu Interactiuni intre agenti - nivel inalt Interactiuni pentru- coordonare - comunicare - organizare Coordonare  motivati colectiv  motivati individual scopuri proprii / indiferenta scopuri proprii / competitie pentru resurse scopuri proprii si contradictorii / competitie pentru resurse scopuri proprii / coalitii 10

Structuri organizationale  centralizate vs decentralizate Comunicare  protocol  limbaj - negociere - ontologii Structuri organizationale  centralizate vs decentralizate  ierarhie/ piata abordare "agent cognitiv" 11

3.1 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 (Shoham, 1993) De ce se utilizeaza aceste notiuni? Comparatie cu IA 12

3.2 Agenti reactivi 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” 13

14 Problema inteleptilor Dilema prizonierului Regele picteaza cate o pata alba si spune ca cel putin o pata este alba Dilema prizonierului Rezultatele pentru A si B (in puncte ipotetice) in functie de actiunile fiecaruia Player A / Player B Tradeaza Coopereaza 2 , 2 5 , 0 0 , 5 3 , 3 A king wishing to know which of his three wise men is the wisest, paints a white spot on each of their foreheads, tells them at least one spot is white, and asks each to determine the color of his spot. After a while the smartest announces that his spot is white reasoning as follows: ``Suppose my spot were black. The second wisest of us would then see a black and a white and would reason that if his spot were black, the dumbest would see two black spots and would conclude that his spot is white on the basis of the king's assurance. He would have announced it by now, so my spot must be white."  In formalizing the puzzle, we don't wish to try to formalize the reasoning about how fast other people reason. Therefore, we will imagine that either the king asks the wise men in sequence whether they know the colors of their spots or that he asks synchronously, ``Do you know the color of your spot" getting a chorus of noes. He asks it again with the same result, but on the third asking, they answer that their spots are white. Needless to say, we are also not formalizing any notion of relative wisdom. The two players in the game can choose between two moves, either "cooperate" or "defect". The idea is that each player gains when both cooperate, but if only one of them cooperates, the other one, who defects, will gain more. If both defect, both lose (or gain very little) but not as much as the "cheated" cooperator whose cooperation is not returned. The whole game situation and its different outcomes can be summarized by table 1, where hypothetical "points" are given as an example of how the differences in result might be quantified. 14

15  Problema prazilor si vanatorilor     Abordare cognitiva vanatorii au scopuri, prazile nu Detectia prazilor Echipa vanatori, roluri Comunicare/cooperare  Abordare reactiva Prazile emit semnale a caror intensitate scade pe masura cresterii distantei de vanatori Vanatorii emit semnale care pot fi percepute de alti vanatori Fiecare vanator este atras de o prada si respins de alt semnal de la un vanator Problem definition: coordinating the actions of the predators so that they can surround the prey animals as fast as possible, a surrounded prey animal being considered dead. The prays and the predators (both are agents) move over a space represented in the form of a grid. The objective is for the predators to capture the pray animals by surrounding them as in the figure above. The following hypotheses are laid down: 1. The dimension of the environment is finite 2. The predator and pray animals move at fixed speeds and generally at the same speed. 3. The pray animals move in a random manner by making Brownian movements 4. The predators can use the corner and edges to block a pray animal's path 5. The predators have a limited perception of the world that surrounds them, which means that they can see the prey only if it is in one of the squares at a distance within their field of perception 15

3.3 Agenti emotionali Inteligenta afectiva Actori virtuali Emotii: recunoasterea vorbirii gesturi, sinteza de vorbire Emotii: Aprecierea unei situatii sau a unui eveniment: bucurie, suparare; valoarea unei situatii care afecteaza pe alt agent: bucuros- pentru,, gelos, invidios, suprat-pentru; Aprecierea unui eveniment viitor: speranta, frica; Aprecierea unei situatii care confirma o asteptare: satisfactie, dezamagire Controlarea emotiilor prin temperament 16

Legaturi cu alte discipline Economic theories Decision theory OOP AOP Markets Autonomy Rationality Distributed systems Communication MAS Learning Mobility Proactivity Cooperation Organizations Reactivity Character Artificial intelligence and DAI Sociology Psychology 17

4. Directii de studiu si cercetare Arhitecturi agent Reprezentare cunostinte: sine, alti agenti, lume Comunicare: limbaje, protocol Planificare distribuita Cautare distribuita, coordonare Luarea deciziilor: negociere, piete de marfuri Invatare Structuri organizationale Implementare: Programarea agentilor: paradigme, limbaje Platforme multi-agent Middleware, mobilitate, securitate 18

5. Modele arhitecturale de agenti Structura conceptuala a agentilor Arhitecturi de agenti cognitivi Arhitecturi de agenti reactivi

5.1 Structura conceptuala a agentilor 1.1 Rationalitatea unui agent Ce inseamna rationalitatea unui agent Cum putem masura rationalitatea unui agent? O masura a performantei 20

Modelare agent reactiv 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) 21

Modelare agenti reactivi Mai multi agenti reactivi seei : E  Pi 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 22

Modelare agent cognitiv 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) 23

Modelare agenti cognitivi Mai multi agenti cognitivi seei : E  Pi 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 24 env

Modelare agent cognitiv 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’ 25

Modelare agent cognitiv 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) Masura a performantei 26

Exemplu Cum modelam? Curatirea unei camere Agent reactiv Agent cognitiv Agent cognitiv cu utilitate 27

5.2 Arhitecturi de agenti cognitivi 5.2.1 Comportare rationala IA si Teoria deciziei IA Teoria deciziei Problema 1 = deliberare/decizie vs. actiune/proactivitate Problema 2 = limitarea resurselor 28

29 General cognitive agent architecture Interactions Information about itself - what it knows - what it believes - what is able to do - how it is able to do - what it wants environment and other agents - knowledge - beliefs Communication Reasoner Other agents Planner Control Scheduler& Executor Output State Input General cognitive agent architecture Environment 29

5.2.2 Modele LPOI 30 (a)Reguli de deductie Reprezentare simbolica + inferente – demonstrarea teoremelor pt a afla ce actiuni va face agentul Abordare declarativa (a)Reguli de deductie Predicate At(x,y), Free(x,y), Wall(x,y), Exit(dir), Do(action) Fapte si axiome despre mediu At(0,0) Wall(1,1) x y Wall(x,y)  Free(x,y) Reguli de deductie At(x,y)  Free(x,y+1)  Exit(east)  Do(move_east) Actualizare automata a starii curente si test pt starea scop At(0,3) 30

Modele LPOI (b) Utilizarea calcului situational = descrie schimbari utilizand formalismul logic Situatie = starea rezultata prin executarea unei actiuni Result(Action,State) = NewState At(location, situation) At((x,y), Si)  Free(x,y+1)  Exit(east)  At((x,y+1), Result(move_east,Si)) Scop At((0,3), _) + actiuni care au condus la scop means-end analysis 31

Avantaje LPOI Dezavantaje Avem nevoie de un alt model 32

5.2.3 Arhitecturi 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 33

Arhitectura BDI 34 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 34 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 35

(Commitment strategies) Strategii de angajare (Commitment strategies) 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) 36

37 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 Reactivity, replan 37

38 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 Dropping intentions that are impossible or have succeeded Reactivity, replan 38

39 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 39

Nu exista o unica arhitectura BDI PRS - Procedural Reasoning System (Georgeff) dMARS UMPRS si JAM – C++ JACK – Java JADE - Java JADEX – XML si Java, JASON – Java 40

5.3 Arhitecturi de agenti reactivi Arhitectura de subsumare - Brooks, 1986 (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 41

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 42

43 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 M1 = move around while avoiding obstacles  M0 M2 = explores the environment looking for distant objects of interests while moving around  M1 Incoroprarea functionalitatii unui c.m. subordonat de catre un c.m. superior se face prin noduri supresoare (modifica semnalul de intrare) si noduri inhibitoare (inhiba iesirea) Supressor node Inhibitor node Competence Module (0) Avoid obstacles 43

44 Comportare (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 44

(1) Daca detectez obstacol atunci schimb directia Ne aflam pe o planeta necunoscuta care contine aur. Mostre de teren trebuie aduse la nava. Nu se stie daca sunt aur sau nu. Exsita 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 campul de gradient (4) Daca gasesc mostre atunci le iau (5) Daca adevarat atunci ma misc in mediu (1)  (2)  (3)  (4)  (5) 45

(1)  (2)  (3)  (4)  (5)  (6) 46 Agentii pot comunica indirect: - Depun si culeg boabe radiocative - 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 campul de gradient (4) Daca gasesc mostre atunci le iau (5) Daca gasesc boabe radioactive atunci iau una si urmez campul de gradient (6) Daca adevarat atunci ma misc in mediu (1)  (2)  (3)  (4)  (5)  (6) 46

6. Comunicare in SMA Comunicare indirecta Comunicare directa ACL Limbaje pentru continut Teoria actelor de vorbire KQML FIPA and FIPA-ACL Protocoale de interactiune

Comunicare in SMA Comunicare agenti 48 nivel scazut nivel inalt Implica interactiuni Protocoale de comunicare Protocoale de interactiune – conversatii = schimb structurat de mesaje Scop  comunicarea permiet agentilor: coordinarea actiunii si comportarii schimbarea starii altor agenti determina agenti sa faca actiuni 48

6.1 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 49

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

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

6.2.1 ACL 52 Concepts (distinguish ACLs from RPC, RMI or CORBA, ORB): An ACL message describes a desired state in a declarative language, rather than a procedure or method invocation ACLs handle propositions, rules, and actions instead of objects with no associated semantics - KR ACLs are mainly based on BDI theories: BDI agents attempt to communicate their BDI states or attempt to alter interlocutor's BDI state – Cognitive Agents ACLs are based on Speech Act Theory – Communicative Acts ACLs refer to shared Ontologies Agent behavior and strategy drive communication and lead to conversations - Protocols 52

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

6.2.2 Primitive ACL 54 Bazate pe acte de comunicare / acte de vorbire J. Austin - How to do things with words, 1962, J. Searle - Speech acts, 1969 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 Pot include definitii de protocoloale 54

KQML 55 Content Communication Message Tipuri 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 Tipuri 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 - advartise, subscribe, recommend... Networking - register, unregister, forward, route, ... Queries - These performatives are used to send questions for evaluation somewhere. Generative - Used for controlling and initiating the exchange of messages. Response - Used by a agent in order reply to queries. Informational - Informational performatives are used to transfer information. Capability definition - Allows an agent to learn about the capabilities of other agents and to announce its own to the agent community. Networking - Networking performatives make it possible to pass directives to underlying communication layers. 55

KQML - exemple 56 querie informational (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 ask-all(P) tell(P) A B tell(P1,P2,...) stream-all(P) B tell(P1) A tell(P2) eos 56 informational

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

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

FIPA - exemple 59 (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 ) 59

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 60

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

FIPA - Request 62

FIPA - Contract net 63

6.3.3 Limbaje pentru continut KIF Prolog Clips SQL FIPA-SL, FIPA-KIF

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))

6.3.4 Protocoale de interactiune Perimit agentilor realizarea de conversatii = schimburi structurate de mesaje Finite automata Conversations in KQML Petri nets FIPA IP standards : more in coordination lecture FIPA-query: the receiver agent is requested to perform some kind of inform action FIPA-request: the receiver agent is requested to perform some action FIPA-contract-net: an agent (manager) solicits proposals from other agents (contractors) by specifying the task and the conditions placed by the manager upon the execution of the task. The contractor's proposal includes the preconditions that the contractor is setting out for the task (e.g., price, time, etc.)

Automate finite COOL, Barbuceanu,95 Winograd, Flores, 1986 67 A:B<<ask(do P) B:A<<accept(do P) proposeS(P) B:A<<refuse(do P) acceptR(P) rejectR(P) B:A<<result(do P) B:A<<fail(do P) counterR(P) counterS(P) Winograd, Flores, 1986 rejectS(P) acceptS(P) 67

Conversatii in KQML Definite Clause Grammars S  s(Conv, P, S, R, inR, Rw, IO, Content), {member(P, [advertise, ask-if]} s(Conv, ask-if, S, R, inR, Rw, IO, Content)  [ask-if, S, R, inR, Rw, IO, Content] | [ask-if, S, R, inR, Rw, IO, Content], {OI is inv(IO)}, r(Conv, ask-if, S, R, _, Rw, OI, Content) r(Conv, ask-if, R, S, _, inR, IO, Content)  [tell, S, R, inR, Rw, IO, Content] | problem(Conv, R, S, inR, _, IO) Labrou, Finin, 1998 68

Retele Petri Ferber, 1997 69 A wants to do P, B does not want A cannot do P B does not want to do(P) DA DB B is willing to do(P) Request do(P) AR1 Refuse do(P) BR Accept/request do(P) Finite state automata are of great practical value for specifying the structure of conversations when they appear in an isolated manner, that is, when a conversation can be summarized as a single process. However, agents are sometimes involved in several conversations simultaneously, and they have to manage these multiple conversations. It is then easier to describe the nature of these interactions by using Petri nets. Each agent is described by a Petri subnet, the positions in which correspond to the internal states of the agent (or of the task in hand). The transitions correspond either to synchronizations due to the receipt of a message or to conditions of application of actions, such as the essential or preparatory conditions for the associated speech acts. Messages being routed are represented by supplementary locations which link agents A and B in such a way as to form a single net. Locations DA and DB describe the initial states in which the agents find themselves before the beginning of the conversation, and locations FA1 and FA2 and FB represent the end of conversation states. Starting from state DA, agent A sends a request to B and moves into the state AR, which represents waiting for a response. If B cannot do P, it send a refusal to A, which then goes into state FA1, which indicates that A must look elsewhere to have A carried out. If B can do P, it sends an acceptance message to A, which again goes into a wait for a response state. During this time, B is in state BR, while trying to carry out the action P. If it can do it, it sends a notification of end of accomplishment, which places agent A in state FA2. If not, it indcates that it can not do P. In both cases, it goes ito the terminal state FB Success AR2 Fail to do(P) Completed(P) Impossible to do(P) Notification of end(P) FB FA Failure SA Satisfaction 69