Professor Fuhua Lin. Scenario: Domestic Robot Bartender The domestic robot is ordered by its owner to get him beer from the refrigerator. However, the.

Slides:



Advertisements
Similar presentations
MFA for Business Banking – Security Code Multifactor Authentication: Quick Tip Sheets Note to Financial Institutions: We are providing these QT sheets.
Advertisements

Peer-to-peer and agent-based computing P2P Algorithms.
Exam Technique PAPER TWO
Narration Essay A Sample Structure.
FIPA Interaction Protocol. Request Interaction Protocol Summary –Request Interaction Protocol allows one agent to request another to perform some action.
Interprocess Communication CH4. HW: Reading messages: User Agent (the user’s mail reading program) is either a client of the local file server or a client.
Department of Homeland Security January 31, 2012.
“What do you want me to do now?”
101.  Take a look at this code and tell me what generation of programming language is used here. It is important that you can EXPLAIN how you came up.
Creating an Amazon Simple Service Account. 1- Sign Up for an Amazon Account 2- Verify Sending Account or Domain 3- Send Test Message 4- Request.
How students check the progress of their applications Applicants can follow their progress by using Track. When each university or college makes a decision.
Substitute FAQs SubFinder Overview. FAQs Do I have to have touch-tone service to use SubFinder? No, but you do need a telephone that can be switched from.
A CHAT CLIENT-SERVER MODULE IN JAVA BY MAHTAB M HUSSAIN MAYANK MOHAN ISE 582 FALL 2003 PROJECT.
Automating Tasks With Macros. 2 Design a switchboard and dialog box for a graphical user interface Database developers interact directly with Access.
Follow these instructions to pay your dues. Get into your web browser Like Internet Explorer Now you need type in this address in the Address bar. Example.
Voice Mail Instruction for University of Arkansas Campus
“There is one, single, overriding message when it comes to contacting leads generated from online lead sources. Every second counts.” Internet Lead Response.
LawyerCABIN : Trademark Register your trademark A trademark of company is one of the most important business assets you'll ever own. It is base of brand-creation.
PROACTIS: Supplier User Guide Contract Management.
Instructions for Submitting FY12 ( ) Title I Data Office of School Improvement Grant Programs March 2012.
Media Buying Simulation: An Introduction to Real World Media Buying and Selling.
Information for Providers West Virginia Mental Health Planning Council This information was developed to raise awareness of Psychiatric Advance Directives.
Application Training — Lead Management System. Slide 2 Module Agenda Module Break-upDuration (minutes) Lesson 1: Introduction to Lead Management System10.
Mechanics of Futures Markets
Instructions for Submitting FY12 ( ) Title I Data Office of School Improvement Grant Programs March 2012.
Distributed Transactions March 15, Transactions What is a Distributed Transaction?  A transaction that involves more than one server  Network.
Recovery-Oriented Computing User Study Training Materials October 2003.
-III Outlook How To Topics CS-3505 Outlook form Office 2003 Wb_ -II.ppt.
Introduction to the WebBoard Terry Dennis. The WebBoard - Our Connection The WebBoard URL is
Enrolment Services – Class Scheduling Fall 2014 Course Combinations.
Plan My Move & MilitaryINSTALLATIONS May, 2008 Relocation Personnel Roles and Responsibilities MC&FP.
© The McGraw-Hill Companies, 2006 Chapter 4 Implementing methods.
HOW WEB SERVER WORKS? By- PUSHPENDU MONDAL RAJAT CHAUHAN RAHUL YADAV RANJIT MEENA RAHUL TYAGI.
Interaction Modeling Interaction model describes how objects interact to produce useful results. Interactions can be modeled at different levels of abstraction:
Lecture 2 Process Concepts, Performance Measures and Evaluation Techniques.
Employee FAQs SubFinder Overview. FAQs Do I have to have touch-tone service to access the SubFinder system? No, but you do need a telephone that can be.
Doc.: IEEE /0115r1 Submission July 2012 Mika Kasslin, NokiaSlide 1 Design Principles for Entity Responsibilities Notice: This document has been.
The Capabilities of AdminP Carilyn E. Daniel KMAS Consulting.
1. Profile settings 2. Messaging system 3. Downloading files 4. Uploading files 5. Creating groups 6. Calendar events.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Processing unknowns (mapping.) June, 2015 The new XR-7.
Analysis of a Protocol for Dynamic Configuration of IPv4 Link Local Addresses Using Uppaal Miaomiao Zhang Frits W. Vaandrager Department of Computer Science.
Online Bid Submission in Bid4Michigan Screen Walk Tutorial Compiled by Christine Mitchell 1/4/2011.
CBP Program – Business Etiquette
Module 2 Task Part 1.The first task consists of undertaking this Tutorial to ensure you understand (or have reviewed) all the basic .
Division of Alcoholic Beverages and Tobacco Beverages Shipped To/Within Florida.
1 Chapter 5 Modeling System Requirements Finding the Use Cases Page
Mtivity Client Support System Quick start guide. Mtivity Client Support System We are very pleased to announce the launch of a new Client Support System.
XP New Perspectives on Microsoft Office Access 2003 Tutorial 10 1 Microsoft Office Access 2003 Tutorial 10 – Automating Tasks With Macros.
Client/Server Socket Programming Project
Chapter 7 Problem Solving with Loops
1. 2 Workflows: Create a Distribution List in ORPIN  Click on My Documents in the menu bar.  Click on Distribution List Maintenance.  Click the “Add.
Reliable Client-Server Communication. Reliable Communication So far: Concentrated on process resilience (by means of process groups). What about reliable.
Medical Eligibility Verifications 1. Medical Eligibility: Verifications Introduction After completing this course, you will be able to: Recognize shared.
Medical Law and Bioethics Unit 1 Seminar Dimitria Adkins, MS, CT(ASCP)IAC.
A PC Wakes Up A STORY BY VICTOR NORMAN. Once upon a time…  a PC (we’ll call him “H”) is connected to a network and turned on. Aside: The network looks.
Antidio Viguria Ann Krueger A Nonblocking Quorum Consensus Protocol for Replicated Data Divyakant Agrawal and Arthur J. Bernstein Paper Presentation: Dependable.
Using Workflow With Dataforms Tim Borntreger, Director of Client Services.
Process Control Management Prepared by: Dhason Operating Systems.
Data Link Layer.
MCSA Windows Server 2012 Pass Upgrading Your Skills to MCSA Windows Server 2012 Exam By The Help Of Exams4Sure Get Complete File From
DLA AVIATION REVERSE AUCTION PROGRAM
What Are They? Who Needs ‘em? An Example: Scoring in Tennis
Sona Systems Training for Students
Writing Functions( ) (Part 5)
CIS 16 Application Development Programming with Visual Basic
Allocating IP Addressing by Using Dynamic Host Configuration Protocol
Royal Mail Group: Testing and Innovation Incentive.
Royal Mail Group: Testing and Innovation Incentive.
Bellwork 8 minutes 7 minutes 9 minutes 10 minutes 12 minutes
Presentation transcript:

Professor Fuhua Lin

Scenario: Domestic Robot Bartender The domestic robot is ordered by its owner to get him beer from the refrigerator. However, the robot has been programmed by the department of health to avoid giving too much beer to its owner. The limit is ten (10) beers per day. As a result, the robot will obey its master and get him beer as long as he is not over the limit for the number of beers he can consume for the day. Beers are ordered from one of three particular supermarkets by the robot. Each supermarket uses a different price for the beer they sell each day. If there is beer in the fridge, the robot will get one and server it to its master when ordered. However, if there is no beer in the fridge, the robot will take the following actions: Find out which of the three contracted supermarket has the lowest price for beer that day. The robot will then place an order to this supermarket with the lowest price for beer. The supermarket will accept the order and deliver the beers to the owner’s address, where they are then placed in the refrigerator. The robot will then serve the owner a beer. This scenario will repeat itself until the owner reaches the limit for the number of beers he can consume for the day as determined by the department of health.

Design The system includes a robot agent, the owner agent and three supermarket agents, as a result, when the system start up all five agents will be started. The robot agent is responsible to server its owner agent beers, until he reaches the limit that he is allowed to consume for the day, as prescribe by the department of health. The supermarket agents are responsible for providing the robot agent with the price for beer when it is requested and delivering the beers ordered by the robot to the robot’s owner residence if its supermarket was selected to provide the order for beers. To accomplish the scenario described, the system will make use of the communication support available in Jason of the well known Contact Net protocol (CNP).

The Scenario in Prometheus Notations

Project File DomesticRobot.mas2j MAS domestic_robot { infrastructure: Centralised environment: HouseEnv(gui) // use "nogui" as parameter to not show the GUI agents: robot; owner; supermarket #3; }

Robot Agent : initial belief and rules /* Initial beliefs and rules */ // initially, I believe that there is some beer in the fridge available(beer, fridge). // my owner should not consume more than 10 beers a day :-) limit(beer,10). /* rules */ too_much(B) :-.date(YY,MM,DD) &.count(consumed(YY,MM,DD,_,_,_,B), QtdB) & limit(B,Limit) & QtdB > Limit. all_proposals_received(CNPId) :-.count(introduction(participant,_), NP) & // number of participants.count(propose(CNPId,_), NO) & // number of proposes received.count(refuse(CNPId), NR) & // number of refusals received NP = NO + NR. /* Initial goals */ Stock(Beer, N) Robot agent At(robot, Place) To determine whether the owner already drank the maximum number of beers allowed per day. This verification is based on the number of consumed beliefs. When the robot gives a beer to the owner it adds a belief to Remember that; this belief has the form +consumed(Year, Month, Day, Hour, Minute, Second, beer) In has(owner, beer)

Robot Agent (cont’):plans to achieve the goal:!has(owner, beer) /* Plans */ +!has(owner, beer) : available(beer, fridge) & not too_much(beer) <- !at(robot, fridge); open(fridge); get(beer); close(fridge); !at(robot, owner); hand_in(beer); ?has(owner, beer); // test a goal // remember that another beer has been consumed.date(YY, MM, DD);.time(HH, NN, SS); +consumed(YY, MM, DD, HH, NN, SS, beer). +!has(owner, beer) : not available(beer, fridge) // Contact the Supermarket and order beer based on the lowest contract price <- !startCNP(1, fix(computer)). +!has(owner, beer) : too_much(beer) & limit(beer, L) <-.concat("The Department of Health does not allow me to give you more than ", L, " beers a day! I am very sorry about that!",M);.send(owner, tell, msg(M)). Robot agent At(robot, fridge) Open(fridge) Get(beer) Hand_in(beer) close(fridge) Move_towards(Place) Achieve: order(beer, N) tell: too_much(beer) At(robot, owner)

Robot walks to a place until it perceives either at(robot, fridge) or at(robot, owner) -!has(_,_) : true <-.current_intention(I);.print("Failed to achieve goal '!has(_,_)'. Current intention is: ",I). +!at(robot,P) : at(robot,P) <- true. +!at(robot,P) : not at(robot,P) <- move_towards(P); !at(robot,P). // when the supermarket makes a delivery, try the 'has' goal again +delivered(beer,_Qtd,_OrderId)[source(Supermarket)] : true <- +available(beer, fridge);.print("Beer has just been delivered"); !has(owner, beer). External action Goal deletion Walk until … Main the goal At(robot, Place)

Robot agent (con’t) Perceive the beer stock and Belief updating // when the fridge is opened, the beer stock is perceived and thus the available belief is updated +stock(beer, 0) : available(beer, fridge) <- -available(beer, fridge). +stock(beer, N) : N > 0 & not available(beer, fridge) <- -+available(beer, fridge). +?time(T) : true <- time.check(T). Important topic!

CNP Protocol // Additions from CNP protocol // start the CNP +!startCNP(Id, Task) <-.print("Waiting participants...");.wait(2000); // wait participants introduction +cnp_state(Id, propose); // remember the state of the CNP.findall(Name, introduction(participant, Name), LP);.print("Sending CFP to ", LP);.send(LP, tell, cfp(Id, Task)); // the deadline of the CNP is now + 4 seconds, so // the event +!contract(Id) is generated at that time.at("now +4 seconds", { +!contract(Id) }). Generate the event +!contract(Id) 4 seconds from now.

Robot agent // receive proposal // if all proposal have been received, don't wait for the +propose(CNPId,_Offer) : cnp_state(CNPId, propose) & all_proposals_received(CNPId) <- !contract(CNPId). // receive +refuse(CNPId) : cnp_state(CNPId,propose) & all_proposals_received(CNPId) <- !contract(CNPId).

Robot agent // this plan needs to be atomic so as not to accept // proposals or refusals while +!contract(CNPId) : cnp_state(CNPId, propose) <- -+cnp_state(CNPId, contract);.findall(offer(O, A), propose(CNPId, O)[source(A)],L);.print("Offers are ", L); L \== []; // constraint the plan execution to at least one offer.min(L, offer(WOf, WAg)); // sort offers, the first is the best.print("Winner is ",WAg," with ", WOf); !announce_result(CNPId, L, WAg); -+cnp_state(CNPId, finished).

// nothing to do, the current phase is not +!contract(_). -!contract(CNPId) <-.print("CNP ", CNPId, " has failed!"). +!announce_result(_, [], _). // announce to the winner +!announce_result(CNPId,[offer(_,WAg)|T], WAg) <-.send(WAg,tell,accept_proposal(CNPId)); !announce_result(CNPId, T, WAg);.print("Order the beer with the winner"); !order_beer(WAg). // announce to others +!announce_result(CNPId,[offer(_, LAg)|T], WAg) <-.send(LAg, tell, r eject_proposal(CNPId)); !announce_result(CNPId, T, WAg).

+!order_beer(WAg) <-.send(WAg, achieve, order(beer,5));.print("Placing Order with ", WAg, " now!"); !at(robot,fridge). // go to fridge and wait there.

Owner Agent // The owner agent simply gets a beer, drinks a beer and randomly communicates with the robot agent to get the time. /* Initial goals */ !get(beer). // initial goal: get a beer !check_bored. // initial goal: verify whether I am getting bored +!get(beer): true <-.send(robot, achieve, has(owner, beer)). +has(owner, beer) : true <- !drink(beer). -has(owner, beer) : true <- !get(beer) robot owner Achieve: has(owner, beer) sip(beer) Has(owner, beer) tell: toomuch(beer)

Owner Agent // while I have beer, sip +!drink(beer) : has(owner, beer) <- sip(beer); !drink(beer). +!drink(beer) : not has(owner, beer) <- true. +!check_bored : true <-.random(X);.wait(X* ); // i get bored at random times.send(robot, askOne, time(_), R); // when bored, I ask the robot about the time.print(R); !!check_bored. +msg(M)[source(Ag)] : true <-.print("Message from ",Ag,": ",M); -msg(M).

Owner agent (con’t) // while I have beer, sip +!drink(beer) : has(owner, beer) <- sip(beer); !drink(beer). +!drink(beer) : not has(owner, beer) <- true. +!check_bored : true <-.random(X);.wait(X* ); // i get bored at random times.send(robot, askOne, time(_), R); // when bored, I ask the robot about the time.print(R); !!check_bored. +msg(M)[source(Ag)] : true <-.print("Message from ",Ag,": ",M); -msg(M).

Supermarket Agent The supermarket agent starts with an initial belief of a random price for its service offered to the robot agent. Once the robot agent initiates the CNP auction each supermarket agent sends its price to the robot. Depending on the price of the service sent to the robot, the robot agent either sends back a message indicating whether the supermarket agent won or loss the auction. The supermarket agent responds by printing a message of whether it won or loss. If it won it waits for a message from the robot agent asking for a delivery of 5 more beers.

Supermarket Agent last_order_id(1). // initial belief // gets the price for the product, a random value between 100 and 110. price(_Service, X) :-.random(R) & X = (10*R)+100. plays(initiator, robot). /* Plans */ // send a message to the initiator introducing myself as a participant +plays(initiator, In) :.my_name(Me) <-.send(In, tell, introduction(participant, Me)). robot Supermarket 1 Deliver(beer, N) tell: delivered(beer, N, Ordered) Supermarket 2 Supermarket 3 cnp tell: introduction(participant, Me)

tell: propose(CNPId, Offer) Supermarket Agent // answer to Call For +cfp(CNPId,Task)[source(A)] : plays(initiator, A) & price(Task, Offer) <- +proposal(CNPId,Task,Offer); // remember my proposal.send(A, tell, propose(CNPId, Offer)). robot Supermarket 1 Deliver(beer, N) tell: delivered(beer, N, Ordered) Supermarket 2 Supermarket 3 cnp tell: introduction(participant, Me)

Supermarket +accept_proposal(CNPId) : proposal(CNPId, Task, Offer) <-.print("My proposal '",Offer,"' won CNP ", CNPId, " for ",Task,"!"). // do the task and report to +reject_proposal(CNPId) <-.print("I lost CNP ", CNPId, "."); -proposal(CNPId, _, _). // clear memory // plan to achieve the goal "order" for agent Ag +!order(Product, Qtd)[source(Ag)] : true <- ?last_order_id(N); OrderId = N + 1; -+last_order_id(OrderId); deliver(Product, Qtd);.send(Ag, tell, delivered(Product, Qtd, OrderId)). tell: propose(CNPId, Offer) robot Supermarket 1 tell: delivered(beer, N, Ordered) Supermarket 2 Supermarket 3 cnp tell: introduction(participant, Me)

Testing results

Screenshot 2

Jason eclipse plugin The run instructions are very simple for this simulation. Eclipse was used with the Jason plugin which can be found at the following url: The plugin is dropped into the eclipse plugin directory. After opening the project in eclipse the user simply needs to right click on the DomesticRobot.mas2j and select run in Jason. This will initialize all the agents and display the GUI with the console which prints out the statements programmed into the agents.