Скачать презентацию Sisteme multi-agent Curs 2 Universitatea Politehnica din Bucuresti Скачать презентацию Sisteme multi-agent Curs 2 Universitatea Politehnica din Bucuresti

1ce3608da2b036e0b4ad342e1166021a.ppt

  • Количество слайдов: 37

Sisteme multi-agent Curs 2 Universitatea “Politehnica” din Bucuresti 2005 - 2006 Adina Magda Florea Sisteme multi-agent Curs 2 Universitatea “Politehnica” din Bucuresti 2005 - 2006 Adina Magda Florea [email protected] pub. ro http: //turing. cs. pub. ro/blia_06

Modele arhitectura de agenti n n Structura conceptuala a agentilor Arhitecturi de agenti cognitivi Modele arhitectura de agenti n n Structura conceptuala a agentilor Arhitecturi de agenti cognitivi Arhitecturi de agenti reactivi Arhitecturi stratificate

1. Structura conceptuala a agentilor 1. 1 Rationalitatea unui agent n n n Ce 1. Structura conceptuala a agentilor 1. 1 Rationalitatea unui agent n n n Ce inseamna rationalitatea unui agent Cum putem masura rationalitatea unui agent? O masura a performantei 3

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

1. 2 Modelare agent Decision component action Perception component see Agent Execution component action 1. 2 Modelare agent Decision component action Perception component see Agent Execution component action Environment E = {e 1, . . , e, . . } P = {p 1, . . , p, . . } A = {a 1, . . , a, . . } Agent reactiv see : E P action : P A env : E x A E (env : E x A P(E)) env 5

Modelare agent Mai multi agenti reactivi see : E P env : E x Modelare agent Mai multi agenti reactivi see : E P env : E x A 1 x … An P(E) inter : P I action : P x I A I = {i 1, …, i, . . } Decision component action Perception component see Agent (A 1) Interaction component inter Execution component action Agent (A 2) Agent (A 3) Environment env 6

Modelare agent Agenti cognitivi Agenti cu stare n action : S x I Ai Modelare agent Agenti cognitivi Agenti cu stare n action : S x I Ai n next : S x P S n inter : S x P I n S = {s 1, …, s, …} see : E P n env : E x A 1 x … An P(E) 7

Modelare agent Agenti cu stare si scopuri goal : E {0, 1} Agenti cu 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’ 8

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

Cum modelam? n Iesirea din labirint – Agent reactiv – Agent cognitiv cu utilitate Cum modelam? n Iesirea din labirint – Agent reactiv – Agent cognitiv cu utilitate Probleme: n Ce actiuni selectez n Ce se face daca rezultatul actiunilor nu este cunoscut n Cum se iau in considerare schimbarile din mediu 10

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

Interactions Information about itself Communication Reasoner Other agents Planner Control Output Scheduler& Executor State Interactions Information about itself Communication Reasoner Other agents Planner Control Output Scheduler& Executor State - 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 Input Environment General cognitive agent architecture 12

2. 2 Modele LPOI n n Reprezentare simbolica + inferente – demonstrarea teoremelor pt 2. 2 Modele LPOI n n 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 13 At(0, 3) n

Modele LPOI (b) Utilizarea calcului situational = descrie schimbari utilizand formalismul logic n Situatie Modele LPOI (b) Utilizarea calcului situational = descrie schimbari utilizand formalismul logic n Situatie = starea rezultata prin executarea unei actiuni Result(Action, State) = New. State 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 14

Avantaje LPOI Dezavantaje Avem nevoie de un alt model 15 Avantaje LPOI Dezavantaje Avem nevoie de un alt model 15

Arhitecturi 2. 3 BDI n n n n Specificatii de nivel inalt Means-end analysis Arhitecturi 2. 3 BDI n n n n 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 BDI – teoria rationamentului practic - Bratman, 1988 Rolul intentiilor 16

BDI n Componenta filozofica n Arhitectura software – IRMA - Intelligent Resource-bounded Machine Architecture BDI n Componenta filozofica n Arhitectura software – IRMA - Intelligent Resource-bounded Machine Architecture – PRS - Procedural Reasoning System n Componenta logica – Rao & Georgeff, Wooldrige – (Int Ai ) (Bel Ai ) 17

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

Proprietati ale intentiilor n conduc means-end analysis n limiteaza deliberare n persista n influenteaza Proprietati ale intentiilor n conduc means-end analysis n limiteaza deliberare n persista n influenteaza convingerile Bucla de control a agentului B = B 0 I = I 0 D = D 0 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 19

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

B = B 0 Bucla de control BDI I = I 0 D = B = B 0 Bucla de control BDI I = I 0 D = D 0 angajare limitata while true do get next perceipt p B = brf(B, p) D = options(B, D, I) Dropping intentions that are impossible I = filter(B, D, I) or have succeeded = plan(B, I) while not (empty( ) or succeeded (I, B) or impossible(I, B)) do = head( ) execute( ) = tail( ) get next perceipt p B = brf(B, p) if not sound( , I, B) then = plan(B, I) Reactivity, replan end while 21

 B = B 0 Bucla de control BDI I = I 0 D B = B 0 Bucla de control BDI I = I 0 D = D 0 while true do angajare deschisa 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( ) get next perceipt p B = brf(B, p) if reconsider(I, B) then D = options(B, D, I) I = filter(B, D, I) = plan(B, I) Replan end while 22

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

Arhitectura de subsumare n n n Un TAB este reprezentat de un modul de Arhitectura de subsumare n n n Un TAB este reprezentat de un modul de competenta (c. m. ) Fiecarte c. m. executa un task simplu – comportare concreta c. m. opereaza in paralel Nivele inferiroare fata de cele superioare c. m. la nivele inferioare c. m. la nivele superioare subsumtion architecture 24

Competence Module (2) Explore environ Input (percepts) Sensors Competence Module (1) Move around Output Competence Module (2) Explore environ Input (percepts) Sensors Competence Module (1) Move around Output (actions) Effectors Competence Module (0) Avoid obstacles Module 1 can monitor and influence the inputs and outputs of Module 2 M 1 = move around while avoiding obstacles M 0 M 2 = explores the environment looking for distant objects of interests while moving around M 1 § Incorporating the functionality of a subordinated c. m. by a higher module is performed using suppressors (modify input signals) and inhibitors (inhibit output) Competence Module (1) Move around Supressor node Inhibitor node Competence Module (0) Avoid obstacles 25

Comportare (c, a) – conditie-actiune; descrie comportarea R = { (c, a) | c Comportare (c, a) – conditie-actiune; descrie comportarea R = { (c, a) | c P, a A} comportare - multimea reguli de 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

Ne aflam pe o planeta necunoscuta care contine aur. Mostre de teren trebuie aduse 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) Care sunt premisele pt ca acest comportament sa functioneze? (distributie a aurului? ) Daca distributia este reala? 27

Agentii pot comunica indirect: - Depun si culeg boabe radiocative - Pot seziza aceste 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) 28

4. Arhitecturi stratificate n n Comportare reactiva si pro-activa Cel putin 2 straturi Horizontal 4. Arhitecturi stratificate n n Comportare reactiva si pro-activa Cel putin 2 straturi Horizontal layering - i/o horizontal Vertical layering - i/o vertical Action output Layer n perceptual input … Layer 2 Layer 1 Horizontal Action output Layer n … … Layer 2 Layer 1 Vertical perceptual input 29

Horizontal layering n n n comportari, n niveluri Comportarea globala poate fi inconsistenta Interactiuni Horizontal layering n n n comportari, n niveluri Comportarea globala poate fi inconsistenta Interactiuni intre niveluri: mn (m = nr actiuni pe nivel) Necesita un sistem de control Vertical layering n n Interactiuni intre niveluri m 2(n-1) Nu sunt tolerante la defecte (daca un nivel se defecteaza) 30

Touring. Machine n Horizontal layering – 3 niveluri de realizare a actiunilor n Nivel Touring. Machine n Horizontal layering – 3 niveluri de realizare a actiunilor n Nivel reactiv - set de reguli situatie-actiune rules pt mediu Nivel planificare - comportare pro-activa n - biblioteca de planuri n n Nivel modelare - reprezinta mediul, agentul si ceilalti agenti - stabileste scopuri - scopurile sunt trimise nivelului/stratului inferior Sistem de control 31

perceptii Subsistem perceptie Nivel modelare Nivel planificare Nivel reactiv Subsistem actiune actiuni Subsistem control perceptii Subsistem perceptie Nivel modelare Nivel planificare Nivel reactiv Subsistem actiune actiuni Subsistem control 32

Inte. RRa. P Stratificata n BDI Principii n 2 niveluri n Atat controlul cat Inte. RRa. P Stratificata n BDI Principii n 2 niveluri n Atat controlul cat si BC sunt stratificate n Controlul este bottom-up n Fiecare nivel foloseste rezultatele nivelului inferior Fiecare nivel de control este format din: - modul recunoastere situatie / activare scop (SG) - modul planificare (PS) n 33

Cooperative planning layer I n t e R R a P Local planning layer Cooperative planning layer I n t e R R a P Local planning layer Behavior based layer World interface actions SG SG SG Sensors Social KB PS Planning KB PS World KB PS Effectors Communication percepts 34

BDI model in Inte. RRa. P options Beliefs Goals Social model Cooperative situation Cooperative BDI model in Inte. RRa. P options Beliefs Goals Social model Cooperative situation Cooperative goals Mental model Local planning situation Local goals World model Sensors Situation Routine/emergency sit. Reactions filter Options Intentions Effectors SG Cooperative option Cooperative intents Local option Local intentions Reaction Response Operational primitive Joint plans PS Local plans Behavior patterns plan 35

§ § § § BDI Architectures § First implementation of a BDI architecture: IRMA § § § § BDI Architectures § First implementation of a BDI architecture: IRMA [Bratman, Israel, Pollack, 1988] M. E. BRATMAN, D. J. ISRAEL et M. E. POLLACK. Plans and resource-bounded practical reasoning, Computational Intelligence, Vol. 4, No. 4, 1988, p. 349 -355. § PRS [Georgeff, Ingrand, 1989] M. P. GEORGEFF et F. F. INGRAND. Decisionmaking in an embedded reasoning system, dans Proceedings of the Eleventh International Joint Conference on Artificial Intelligence (IJCAI 89), 1989, p. 972 -978. § Successor of PRS: d. MARS [D'Inverno, 1997] M. D'INVERNO et al. A formal specification of d. MARS, dans Intelligent Agents IV, A. Rao, M. P. Singh et M. Wooldrige (eds), LNAI Volume 1365, Springer-Verlag, 1997, p. 155 -176. Subsumption architecture [Brooks, 1991] R. A. BROOKS. Intelligence without reasoning, dans Actes de 12 th International Joint Conference on Artificial Intelligence (IJCAI-91), 1991, p. 569 -595. 36

§ § Turing. Machine [Ferguson, 1992] I. A. FERGUSON. Turing. Machines: An Architecture for § § Turing. Machine [Ferguson, 1992] I. A. FERGUSON. Turing. Machines: An Architecture for Dynamic, Rational, Mobile Agents, Thèse de doctorat, University of Cambridge, UK, 1992. Inte. RRa. P [Muller, 1997] J. MULLER. A cooperation model for autonomous agents, dans Intelligent Agents III, LNAI Volume 1193, J. P. Muller, M. Wooldrige et N. R. Jennings (eds), Springer-Verlag, 1997, p. 245 -260. BDI Implementations The Agent Oriented Software Group n Third generation BDI agent system using a component based approached. Implemented in Java n http: //www. agent-software. com. au/shared/home/ JASON n http: //jason. sourceforge. net/ 37