Multi-Agent Systems University “Politehnica” of Bucarest Spring 2010 Adina Magda Florea curs.cs.pub.ro.

Slides:



Advertisements
Similar presentations
How to ask for things politely when writing a formal letter
Advertisements

Airport Procedures 101. #1 Arrive to the airport Many people take a taxi or get a friend to drop them off to avoid having to pay to park at the airport.
Intelligent Architectures for Electronic Commerce Part 1.5: Symbolic Reasoning Agents.
AOSE Agent-Oriented Programming. Introduction A class of programming language that often embodies the various principles proposed by theorists. –Many.
Artificial Intelligence Universitatea Politehnica Bucuresti Adina Magda Florea
PROBABILITY. Uncertainty  Let action A t = leave for airport t minutes before flight from Logan Airport  Will A t get me there on time ? Problems :
Programing Concept Ken Youssefi/Ping HsuIntroduction to Engineering – E10 1 ENGR 10 Introduction to Engineering (Part A)
CS 582 / CMPE 481 Distributed Systems
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.
Component-Level Design
Programming Concepts (Part A) Ping Hsu. What is a program? WHITE CAKE RECIPE 1.Preheat oven to 350 degrees F (175 degrees C). 2.Grease and flour a 9x9.
Ai in game programming it university of copenhagen Welcome to... the Crash Course Probability Theory Marco Loog.
Functions SOL 8.14, 8.16, and 8.17.
 Before you go to the airport to pick up your student: ◦ check the airline website and/or call the airline and confirm that the flight is on time. ◦
Introduction to linguistics II
Object Oriented Software Development
PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved. Slide 1 Process.
Etour is an integrated information system that aims at collecting, organizing, managing, distributing and selling services of a tourist enterprise and.
Library Large Conference Room (L210)
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
The mean of a set of observations is their ordinary average, whereas the mean of a random variable X is an average of the possible values of X The mean.
Examples of TPS 1 In this section, we examine the: components of a TPS the examples of real-time transaction processing batch transaction processing.
Data Modeling for Integrating SAP with other Applications.
Agent Model for Interaction with Semantic Web Services Ivo Mihailovic.
EEL 5937 Agent communication EEL 5937 Multi Agent Systems Lecture 10, Feb. 6, 2003 Lotzi Bölöni.
Chapter 6 Programming Languages. © 2005 Pearson Addison-Wesley. All rights reserved 6-2 Chapter 6: Programming Languages 6.1 Historical Perspective 6.2.
مهندسی مجدد فرآیندهای تجاری
Chapter 6 Programming Languages © 2007 Pearson Addison-Wesley. All rights reserved.
Copyright © 2010 Certification Partners, LLC -- All Rights Reserved Perl Specialist.
Lecture 18: Object-Oriented Design – Interaction and State Diagrams Anita S. Malik Adapted from Schach (2004) Chapter 12.
Lecture 13-17, chitkara university.  Gives a conceptual framework of the things in the problem space  Helps you think – focus on semantics  Provides.
Lamport’s Logical Clocks & Totally Ordered Multicasting.
Fariba Sadri - ICCL 08 Agent Examples 1 Agents Some Examples Fariba Sadri Imperial College London ICCL Summer School Dresden August 2008.
Lecture 5 Multi-Agent Systems Lecture 5 University “Politehnica” of Bucarest Adina Magda Florea
Copyright © 2003 ProsoftTraining. All rights reserved. Perl Fundamentals.
Chapter 5 Conditionals and Loops. © 2004 Pearson Addison-Wesley. All rights reserved5-2 The switch Statement The switch statement provides another way.
EEL 5937 Agent communication EEL 5937 Multi Agent Systems Lotzi Bölöni.
Business Case Scenario XYZ Airlines is an up and coming airline in Asia which has been steadily growing these past few years. Currently, the ticket sales.
Stuck Flying Standby. Have you ever flown standby? What are some of the reasons that people would fly standby?
Year 2 Block A. 2A1 I can use place value and number facts to solve problems and explain my methods to the class, I know that I can add numbers in any.
System Maintenance Modifications or corrections made to an information system after it has been released to its customers Changing an information system.
Logical Clocks. Topics r Logical clocks r Totally-Ordered Multicasting.
ADVERB CLAUSES. Time : When :Doris will leave for the airport when the bus arrives. Until :Tom waits in the airport until his flight is announced. While.
Copyright © 2011 Pearson Education Process Specifications and Structured Decisions Systems Analysis and Design, 8e Kendall & Kendall Global Edition 9.
Dr. Bea Bourne 1. 2 If you have any trouble in seminar, please call Tech Support at: They can assist if you get “bumped” from the seminar.
1 The Relational Data Model David J. Stucki. Relational Model Concepts 2 Fundamental concept: the relation  The Relational Model represents an entire.
Unit One 1.Travelling by Air. 作宾语 v. + doing d________ e________ f________ h________ k________ l________ m________ p________ s________ i________.
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall Process Specifications and Structured Decisions Systems Analysis and Design, 8e Kendall.
Introduction to Simulation What is a simulation? A system that represents or emulates the behavior of another system over time; a computer simulation is.
FJ1 - Take Action: Job Change/Transfer/Pay Rate Change Process Diagram.
Year 2 Place value & calculation. 2Pv&C1 6. I can add and subtract a two-digit number and ones number using concrete objects, pictorial representations.
I Travel Booking Training
CMSC 691M Agent Architectures & Multi-Agent Systems
Year 2 Block A.
Swiss Air Reservations Phone Number for More Flight Services
Air Canada is the flag carrier and largest airline of Canada by fleet size and passengers carried.
HOW TO CONTACT DELTA AIRLINES PHONE NUMBER 1.Regions. You can reach us with these reservations phone numbers when you are calling from the United States,
Integrating Learning of Dialog Strategies and Semantic Parsing
User Guide Portman Concur
BUSINESS CENTER AIRFARE APPROVAL REVIEW
BPMN - Business Process Modeling Notations
Chapter 6: Programming Languages
Why do Technology Implementations Fail?
Auxiliary Verbs with Adverbs of Degree
Step 1: Enter your Timekeeper Employee number as normal.
Presentation transcript:

Multi-Agent Systems University “Politehnica” of Bucarest Spring 2010 Adina Magda Florea curs.cs.pub.ro

Agent oriented programming (AOP) 1An agent scenario 2 An AOP system 3 AGENT-0 4 Program example

3 n Plane ticket reservation Agents:  P – passenger  C – sales agent (program)  S supervisor of C n Confirm reservation – commitment to issue a boarding pass 1 An agent scenario

4 March n P to C: Please inform me what flights you have from San Francisco to New York on April 18. C to P: Flight #354 departs at 08:30. flight #293 departs at 10:00, flight #441 departs at noon,  n P to C: Please book me on #354. n C to P: That is sold out. n P to C: Please book me on #293. n C to P: That is confirmed: your reservation number is Airline reservation

5 n P to C: Please book me also on #441. n C to P: That conflicts with #293: I am not allowed to double book a passenger. n P to C: Please get permission to do so. C to S: I request permission for the following double booking:  n S to C: Permission denied. n C to P: Sorry, I cannot get approval. April 18, at the airport n P to C: My name is P; I have a reservation for flight =293. n C to P: Here is your boarding pass. Airline reservation

2 An AOP system A complete AOP system: o A formal language to define mental states o A programming language to define and program agents; o Speech-act theory; o Language semantics – mental states o A process of "agentification" 6

3 Agent Components of mental states n Beliefs n Agent actions n Capabilities or Abilities n Obligations or commitments n Decisions – commitments to itself 7

3.2 Representing beliefs, commitments and capabilities Time Temporal logic language, discrete time holding(robot,cup) t Action No distinction between actions and states Executing an action – the corresponding fact raise-arm(robot) t is true Instant actions 8

Beliefs Modal operator B, B t a  “At time t agent a believes that  “, -  - belief B 3 a B 10 b like(a,b) 7 “At time 3 agent a believes that at time 10 agent b will believe that at time 7 a liked b.” Obligations OBL t a,b  “At time t agent a is obligated (committed) to agent b about .” Decisions Commitments/obligations to itself DEC t a   def  OBL t a,a  9

Capabilities CAN t a  “At time t agent a is capable of .” CAN 5 robot open(door) 8 “At time 5 the robot can ensure that the door is open at time 8.” ABLE is the immediate version of CAN. time(  ) –time(open(door) t )=t ABLE a   def CAN time(  ) a  10

n Linear discrete time n BeliefsB a t  n Actionsraise_arm(robot) t n Obligations / commitmentsOBL a,b t  (CMT a,b t  ) n DecisionsDEC a t  = OBL a,a t  n CapabilitiesCAN a t  11 Summary of mental categories in AGENT0

Basic loop Every agent executes: 1. Read current message and update current mental state, including beliefs and commitments 2. Execute commitments at time t Interpretor

Actions: n private actions n communicative actions n conditional actions Conditional action - mental condition n The agent may commit to private actions or to communicative actions 13 Interpretor - cont

Hypotheses for message passing n The platform can send messages to other agents n The interpretor can find out when a message is received Clock hypotheses n The clock initiate the 2 steps – equal intervals Length of time interval - timegrain. n A loop iteration < timegrain 14 Interpretor - cont

Initialize mental state and capabilities Define rules for making new commitments Update mental state Execute commitment for current time Clock Representation of mental state and capabilities Outgoing message Incoming message A flow diagram of the generic agent interpreter Control Data

Fact statements n Fact statements : facts, actions (t (employee smith acm)) (NOT (t (employee jones acm))) ::= ( ( *)) ::= | now | | (+ ) | (- ) | (  ) ; may be if in a commitment rule ::=m | h | d | y ; m (minute) =60, h (hour) 3600, etc Agent language

Action statements Private actions (DO t p-action) Communicative actions (INFORM t a fact) fact – fact statement (REQUEST t a action) action - action statement (REQUEST 1 a (DO 10 update-database)) (REQUEST 1 a (REQUEST 5 b (INFORM 10 a fact))) 17

(UNREQUEST t a action) (REFRAIN action) ::= (DO ) | (INFORM ) | (REQUEST ) | (UNREQUEST ) | (REFRAIN ) | (IF ) 18

Conditional actions When arriving at moment t examine the mental state of the agent The agent and the time are implicitly considered in the statement – therefore are omitted (IF (B (t1 (employee smith ibm))) (INFORM t a (t1 (employee smith ibm)))) (IF ) 19

::= (IF ) ::= | (OR *) ::= | (AND *) ::= (B ) | ((CMT ) ) | (NOT ) 20

n Variables ?x (  )?!x (  ) Ex:(IF (NOT ((CMT ?x) (REFRAIN sing))) (DO ?!t sing)) (IF (B (t (emp ?x ibm))) (INFORM a (t (emp ?x ibm)))) ::= ? | ?! ::= | ::= 21

n Commitment rules Conditions to enter a commitment n Mental conditions n Message conditions Message conditions = a combination of message pattern Message pattern( ) : INFORM, REQUEST, UNREQUEST, REFRAIN : or, depinds on type Commitment rule (COMMIT ( )*) Ex: (COMMIT (?a REQUEST ?action) (B (now (myfriend ?a))) (?a ?action)) 22 OR AND ::= (B ) | ((CMT ) ) | (NOT )

n Commitment rules ::= (COMMIT ( )*) ::= | (OR *) ::= | (AND *) ::= ( INFORM ) | ( REQUEST ) | ( UNREQUEST ) | ( REFRAIN ) | (NOT ) 23

A commitment rule adds a commitment to execute an action (COMMIT ( )*) if: n is true for the received message n is true for the current mental state n Agent can do all action i n Agent is not committed to REFRAIN action i n if action i = REFRAIN action1, the agent will not commit to action1 then, for all i, makes a commitment to agent i to execute action i. 24

Agent program n Set up the timegrain n Define capabilities n Define initial beliefs n Write commitment rules ::= timegrain := CAPABILITIES := ( )* INITIAL BELIEFS := * COMMITMENT RULES := * 25

Basic loop of AGENT0 1. Read current message and update mental states, (1a) Update beliefs (1b) Update commitments 2. Execute commitments at time t (1a) Beliefs are updated: n As the result of receiving an INFORM message n As the results of executing a private action - A BDI agents believes that John works at Intel as the result of a private action retrieve - A BDI agents believes that John works at Intel as the result of an INFORM message 26

Basic loop of AGENT0 (1b) Commitments are updated KB n Commitments (agent action) (a1 (rotate wheelbase ?degrees)) n Capabilities (privateaction mental-cond). ( (rotate wheelbase ?degrees) (NOT(CMT ?a (REFRAIN rotate)))) The mental condition prevents commitments to uncompatible actions 27

Commitment strategy (when to drop commitments) Existing commitments are dropped: As the result of an UNREQUEST message or n As the result of a change in beliefs When beliefs are updated, the interpretor checks the commitments to private actions and removes commitments for which mental-cond of the capability is not true any more - It should send a message – AGENT0 does not enforce this n Drop commitment – independent of agent's program n Add commitment – depends on commitment rules 28

Conditions for an agent to execute an action n REQUEST or UNREQUEST to any agent n May inform any agent n May inform itself n Private action - if mental-cond is true at time moment t n A agent is free not to execute an action provided it is not committed to this action Conditional action (IF mental-cond action) 29

(2) Commitment execution n In KB every commitment has an associated time moment t In (2) agent “executes” all commitments ( now - timegrain, now ]. n “executes” depends on the type of action:  INFORM, REQUEST, UNREQUEST – sends a message  REFRAIN – no effect  DO, IF – beliefs, commitments, mental-cond 30

5 Program example n An AGENT-0 program for the initial scenario n Relevant activity – issue a boarding pass n Reservation confirmaton is a commitment to issue a boarding pass 31

5.1 Macro definitions (issue_bp pass flightnum time)  (IF (AND (B ((- time h) (present pass))) (B (time (flight ?from ?to flightnum)))) (DO time – h (physical_issue_bp pass flightnum time))) (query_which t asker askee q)  (REQUEST t askee (IF (B q) (INFORM (+ t 1) asker q))) (query_whether t asker askee q)  (REQUEST t askee (IF (B q) (INFORM (+ t 1) asker q))) (REQUEST t askee (IF (B (NOT q)) (INFORM (+ t 1) asker (NOT q)))) 32 Private action

5.2 Initial beliefs Flights (time (flight from to number)) Available seats (time (remaining_seats time1 flight_number seats) 5.3 Capabilities Issue tickets and update available seats ((issue_bp ?a ?flight ?time) true) ((DO ?time (update_remaining_seats ?time1 ?flight_number ?additional_seats)) (AND (B (?time (remaining_seats ?time1 ?flight_number ?current_seats))) (?current_seats >= |?additional_seats|))) 33

5.4 Commitment rule (COMMIT (?cust REQUEST (issue_bp ?pass ?flight ?time)) (AND (B (?time (remaining_seats ?flight ?n) (?n > 0) (NOT ((CMT ?anyone) (issue_bp ?pass ?anyflight ?time)))) (myself (DO (+ now 1) (update_remaining_seats ?time ?flight -1))) (?cust (issue_bp ?pass ?flight ?time))) 34 (COMMIT ( )*)

5.5 Dialog pasager - agent smith (query_which lmarch/l:00 smith airline (18april/?!time (flight sf ny ?!num))) airline (INFORM lmarch/2:00 smith (18april/8:30 (flight sf ny #354))) airline (INFORM lmarch/2:00 smith (18april/10:00 (flight sf ny #293))) airline (INFORM lmarch/2:00 smith (18april/  smith (REQUEST lmarch/3:00 airline (issue_bp smith #354 18april/8:30)) smith (query_whether lmarch/4:00 smith airline ((CMT smith) (issue-bp smith #354 18april/8:30))) 35

airline (INFORM lmarch/5:00 smith (NOT ((CMT smith) (issue-bp smith #354 18april/8:30)))) smith (REQUEST lmarch/6:00 airline (issue-bp smith #293 18april/10,.00)) smith (query-whether lmarch/7:00 smith airline ((CMT smith) (issue-bp smith #293 18april/10:00))) airline (INFORM lmarch/8:00 smith ((CMT smith) (issue-bp smith #293 18april/10:00)))  smith (INFORM 18april/9:00 airline (present smith)) airline (DO 18april/9:00 (issue-bp smith #293 18april/10:00)) 36