Home
CEREBRO AmI Infrastructure Event Calculus Rule
Contents
1. Ned PrepareBreakfast 2 400 10 HoldsAt PossActivity Ned BrushTeeth DS 0 10 HoldsAt PossActivity Ned TakeShower DS 57 10 gt Happens Do DasplayMs BigBrother criy SCR1 p10 gt Happens Do DisplayMsg BagBrother ogl SCRI 10 11
2. specific time during the execution Also 200 is the actual time of occurrence study the EC axiomatizations to get an understanding of how these event types are constructed After pressing the OK button the Reasoner will react as if this event actually occurred in the environment Notice that for each event three different reasoning steps are executed in general different tasks are considered in each step RR Problems Javadoc Declaration EJ Console 3 Search ReasonerMain Java Application C Program Files Java jre7 bin javaw exe May 28 2013 7 20 01 PM gt Parsing Completed gt gt gt Running Model 1 from to 1 for timepoints 1 Reasoning time from timepoint t to t 1 is 29 msec Send an event manually simulated event press Enter gt Asserting Happens DoorOpens Ned HallBedroom 22 1 7p Asserting Happens ResetAlert NoActivity all 1 1 Seeing message to EvMngService Happens ResetAlert NoActivity all 1 1 gt gt gt RunniXg Model 1 from 1 to 2 for timepoints 1 ReasQning me from timepoint t 1 to t 2 is 22 msec AsserXing Happens ChangeSystemPhaseTo Deliberate 2 gt gt gt Running Mod 1 from 2 to 3 for timepoints 1 Reasoning time frNm timepoint t 2 to t 3 is 27 msec gt A erting Neppens ChangeSystemPhaseTo Act 3 gt gt gt Running Wiodel 1 frm 3 to 4 for timepoints 1 Reasoning time from timegoint t 3 to t 4 is 23 msec gt Asse
3. the confidence value is 88 due to the time of the day and the fact that he has not taken breakfast yet This can be checked at the eclipse console which shows the following message Probabilistic Estimation component found that the current evidence is tm ts Pr PB tm ts 0 88 Probabilistic Estimation component sends Happens UpdateActivityConf Ned PrepareBreakfast 100 DS 88 1 Notice that in the PrepareBreakfastBNRecognition xml file tm is the id for TimeOfTheDay Morning and ts is the id for taking shower in the last 900 seconds Moreover the probabilistic component also checks which are the most probable actions that Ned is expected to perform This information is extracted from the PrepareBreakfastBNComposition xml file The probabilities as they appear in the console are Probabilistic Estimation component found that the current evidence is of cg gt The probabilities of the actions that have not been performed yet are as follows Pe veg ly tors bea oe 85 55256 Pe eg2 lor Leg tou 6 12 166 Pr crili lort beg TOJI 6 29269 Pr ot ToO beg lot 65 00234999999999 Pr ogl tofi req Tat y 84 0049 Pr og2 Joty eg Lot 56 93 140000000004 Soe End of Trist Of pending aACELONS A As evidence now are the relevant fluents specifically that the neither the fridge nor the groceries cupboard are open and that Ned hasn t been in the toilet in the last 3
4. this folder aji Indigo a Name a workspace 4 ks di metadata k a os PrepareBreakfastBNComposition xml i basic domain axiomatization ec metadata ae s PrepareBreakfastBNRecognition xml s JESS EC Reasoner ver4 Frep g y brush teeth axiomatization ec 4 J JESS EC Reasoner ver ReadMe bt settings ear setti B bin _ DomainDefinitions tt b ii TakeShowerBNRecognition xml B ECH initial state ec d bin s iles z E prepare breakfast axiomatization ec z J EC files J Lissi 2011 i Jb Lissi 2011 ie spatial reasoning ec s J Lissi2012 B syst J Lissi2012 em ec a Lissi2013 oe 4 Lissi2013 5 take shower axiomatization ec l 4 P deliverable z a deliverable 4 a LISSIvanKasteren s d LISSIvanKasteren J BN graphs J BN graphs P TASEvanKasteren d TASEvanKasteren di Mueller 2006 d Mueller 2006 di My test cases J My test cases lib e Choose the Probabilistic Estimation method Inside the ReasonerMain class locate the following command MonitorService commModule new MonitorService ui XXX and change parameter XXX to be either 1 WS Implements a weighted sum function Requires no extra files as all weights are encoded in the Event Calculus axiomatizations 2 BN Implements estimation based on belief networks The appropriate xml files need to be in the BN graphs folder 3 DS Not implemented yet It will include the Dempster Shaffer component e Make su
5. 00 seconds As a result and according to his profile the most probable action to perform is opening the groceries cupboard followed by the opening of the fridge notice that the percentage of closing these devices is very low as the system knows that are already closed At the end the Reasoner s UI displays that PrepareBreakfast is a recognized activity and that opening the groceries cupboard is a probable action This is because the estimation is above the 80 threshold this value can change from the Monitoring class Additionally at the Act reasoning cycle it asks for a message to be presented on screen SCR1 By this we show how we can use inferrencing to perform actions in the environment All predicates starting with Do _ denote actions that the reasoner asks the infrastructure to be executed the Event Manager receives such messages and forwards them to the appropriate component HoldsAt RecActivityStartTime Ned PrepareBreakfast 2 100 4 HoldsAt RecActivity Ned PrepareBreakfast 2 4 HoldsAt PossActivity Ned PrepareBreakfast DS 88 4 gt Happens Do DisplayMsg BigBrother og1 SCRI1 4 Happens StartsInteractingWith Ned Fridge 203 1 It turns out that Ned decided to open the fridge first rather than opening the groceries cupboard Reasoning proceeds in a similar way as before Now two actions are probable to happen next closing the fridge or opening the groceries store Probabilistic Estima
6. At RecActivityStartTime Ned TakeShower 14 100 15 HoldsAt RecActivityEndTime Ned TakeShower 14 636 15 gt Happens RetractPossActivity Ned TakeShower 15 Notice that even though the possible activities are retracted the recognized activities remain in order to keep the history of what the user has performed This can change in the system ec file just uncomment the last axioms Inside the RecActivity predicates the 14 argument is the unique ID that correlates the predicates of this activity if at some other time point TakeShower is again recognized a different ID will be assigned to correlate the new triplet of RecActivity predicates b Narrative 2 Use of BNs and request for devices to perform actions Apply the following narrative using the Belief Networks BN methodology DoorOp ens Ned HallKrechen 100 StartsInteractingWith Ned Fridge 203 1 CupboardOpens Ned Groceries 301 1 DoorOpens Ned HallBathroom 400 1 Happens Happens Happens Pe m Happens Some remarks about the outputs are below only some of the conclusions are shown Happens DoorOpens Ned HallKitchen 100 1 Ned enters the Kitchen and PrepareBreakfast becomes a possible activity as he has not taken breakfast in the last 14400 seconds see prepare breakfast axomatization ec Then the probabilistic component evaluates the conditional probabilities of the Belief Networks and concludes that
7. CEREBRO Aml Infrastructure Event Calculus Rule based Reasoner User s Manual Theodore Patkos 1 Setting up the components before execution Connection with the Event Manager Find the EvMngServiceAddress txt file inside the JESS EC Reasoner folder and make sure the Port IP address of the Event Manager is correct Ji Indigo Name di workspace d settings dJ metadata bin a JESS EC Reasoner ver4 M EC files J lib W sre M supplementary material _ classpath _ project ba Documentation new docx ha Documentation docx jr Draft Documentation pdf ECJessReasoner bat EvMngServiceAddress txt fw LISSI README docx motherEng tt B src rar 7 temp clp fw User Manual docx m Run Eclipse and load the Reasoner Some packages that are loaded for the connection with the LiSSi infrastructure use paths that are only valid when executing the program with Eclipse Specify the Event Calculus file Inside the ReasonerMain class specify the path of the main Event Calculus file to load E g commModule InitializeECDomain EC files Lissi2013 deliverable LISSIvanKasteren ec false Important All supplementary files that are loaded from this file need to exist inside a folder having the same name as this file For instance in the previous example they should be in a folder named LISSIlvanKasteren In addition if there are BN graph files xml files they should be in a folder BN graphs inside
8. ce if we use BNs as our probability estimation method we can read related probabilities such as Probabilistic Estimation component found that the current evidence is tm ts Pre PB tm Les pHO 88 Probabilistic Estimation component sends Happens UpdateActivityConf Ned PrepareBreakfast 300 DS 88 1 Probabilistic Estimation component found that the current evidence us lof beg 6t The probabilities of the actions that have not been performed yet are as follows Peteqliil ory bea poc jH 8 55256 Pe eg2 loty beg 10t y G12 166 Prc lor icq TORII 6 97269 Pr Of lok Seg lot 65 0023 4999999999 Pr ogl of cg gt 84 0049 Pr og2 lot eg lot y 56 93 140000000004 seas End Of Lust of pending aCELONS oA The first two lines state that the Prepare Breakfast PB activity has been recognized with 88 confidence given the current evidence information see the related xml files for explanation about the IDs The rest of the output is about the percentage of the actions that the user is expected to perform next For example Ned will most likely open the groceries cupboard og1 or open the fridge of1 3 Execution Examples Next we provide two narratives to test the files that are given with the Reasoner along with explanations on key points to understand the behavior of the system a Narrative 1 How Possible and Recognized Activities are initiated and terminated Apply the f
9. imulated event press Enter will appear on the Console The user can receive important information both from the Eclipse Console and the Reasoner s UI R Problems Javadoc Declaration EJ Console 3 Search ReasonerMain Java Application C Program Files Java jre7 bin javaw exe May 28 2013 7 02 35 PM BE gt Parsing Completed gt gt gt Running Model 1 from to 1 for timepoints 1 Reasoning time from timepoint t to t 1 is 19 msec Send an event manually simulated event press Enter Event Calculus Jess based Reasoner o 8 3l File Options Help EC Axioms Jess Rules Output Output for a total of 1 active models C Models produced T Model 14 TE Run 1 timepoints Add event or observation Flush Display only changes Adding Events Manually This is a useful functionality for debugging the axiomatizations In order to test the different use cases the user can enter events fake or simulated events without interacting with the devices of the infrastructure To do so press enter in the Eclipse Console A pop up window will appear Input 2 New event or observation for the Monitor Service eg Happens E1 01 02 1 Happens Event 1 cone Enter the event you want to simulate e g Happens DoorOpens Ned HallBedroom that 1 is needed to denote that the event will happen now Any other timepoint will mean a
10. oldsAt HoldsAt HoldsAt PossActivity Ned TakeShower DS 63 10 PossActivityStartTime Ned TakeShower 100 10 ACtaveATert NoAcEivaity 900 100 10 ActiveAlert NOACTIVity 430 100 410 Pn An Happens DoorOpens Ned HallToilet 636 1 Now the user goes to another room he has not closed the Bathroom door but his interaction with the Toilet door allows the Reasoner to understand that the user is no longer in the Bathroom The Reasoner can understand that Ned is no longer taking shower but it needs to determine the confidence value for this activity even though it has ended SS ES Se SS gt Happens DoorOpens Ned HallToilet 636 13 gt Happens ChangesRoom Ned Toilet 636 13 gt Happens EndPossActivity Ned TakeShower 636 TS6 LeftOnTime 1 13 gt Happens ResetAlert NoActivity all 1 13 Because the user stayed in the Bathroom the amount of time it usually takes him to have a shower as well as because it is morning and according to his profile he takes showers in the morning we are now 8 certain that the possible activity actually occurred Therefore it needs to change from possible to recognized even though it has just ended a recognized activity may trigger other actions S665 002 14 lt gt Happens UpdateActivityConf Ned TakeShower 636 DS 100 14 gt Happens BeginRecActivity Ned TakeShower 100 14 S59 Se oe SSS HoldsAt RecActivity Ned TakeShower 14 15 Holds
11. ollowing narrative using the Weighted Sum WS methodology Happens DoorOpens Ned HallBedroom 0 1 Happens DoorOpens Ned HallBathroom 100 1 Happens TriggerAlert NoActivity 240 340 1 Happens TriggerAlert NoActivity 480 580 1 Happens DoorOpens Ned HallToilet 636 1 Some remarks about the outputs are below only some of the conclusions are shown Happens DoorOpens Ned HallBedroom 0 1 No activity is triggered See that the Reasoner infers that Ned cannot access the other rooms this is because their doors are closed Happens DoorOpens Ned HallBathroom 100 1 os t 5 Sos HoldsAt ActiveAlert NoActivity 480 100 5 HoldsAt ActiveAlert NoActivity 900 100 5 HoldsAt ActiveAlert NoActivity 240 100 5 HoldsAt PossActivityStartTime Ned TakeShower 100 5 HoldsAt PossActivityStartTime Ned BrushTeeth 100 5 HoldsAt PossActivity Ned TakeShower TS8 NoShowerYet 3 5 HoldsAt PossActivity Ned BrushTeeth BT3 Morning 3 ro HoldsAt PossActivity Ned TakeShower TS2 Morning 2 5 gt Happens UpdateActivityconf Ned BrishTe th 1 00 DS 50 5 gt Happens UpdateActivityConf Ned TakeShower 100 DS 63 5 The user approaches the Bathroom two activities become possible TakeShower TS and BrushTeeth BT The EC axiomatization provides two justifications for the TS i e TS8 and TS2 and one for the BS i e BT3 with their corresponding confidence
12. rXing Happens ChangeSystemPhaseTo Percee 4 Send an event manually simuNted event press Sefer ay The event we manually added Other events triggered by the reasoner Event Calculus Jess based Reasoner Lo 2 a 220 1 Note File Options Help EC Axioms Jess Rules Output CI Models produced Model 1 Run Output for a total of 1 active models 1 timepoints Add event or observation Flush Reading and understanding the outputs The Reasoner s UI informs us about the current state of the world as well as the events that have happened this output can be sent as String to interested components For instance we can see which recognized or possible activities are or have been happening their start and end times the confidence values the justification for these confidence values etc see the related journal paper for information about these aspects A sample output is as follows HoldsAt LastLocation Ned Kitchen 300 5 HoldsAt CannotAccessRoom Ned Bathroom 5 HoldsAt PossActivity Ned PrepareBreakfast PB1 Morning 1 5 HoldsAt PossActivity Ned PrepareBreakfast DS 88 6 HoldsAt PossActivityStartTime Ned PrepareBreakfast 300 6 HoldsAt RecActivity Ned PrepareBreakfast 5 6 HoldsAt RecActivityStartTime Ned PrepareBreakfast 5 300 6 In addition the Eclipse console can provide other interesting information For instan
13. re the DomainDefinitions txt file is up to date and consistent with the EC axiomatization The reasoner will read this file during initialization in order to ask about the current state of all sensors devices that exist in the environment workspace di p di EN graphs di metadata S e ee basic domain axiomatization ec di JESS EC Reasoner werg l i aes p P Z brush teeth axiomatization ec settings B bi L DomainDefinitions tt If initial state ec Jj EC files eee nce Z prepare breakfast axiomatization ec i Lissi 2011 i i a spatial reasoning ec dJ Lissi2012 a Z system ec J Lissi2013 a Z i Z take shower axiomatization ec di deliverable E di LISSIvanKasteren di EN graphs di TASEvanKasteren You are now ready to start the Reasoner 2 Familiarization with the Uls When you first run the Reasoner from inside Eclipse it will first try to connect with the Event Manager then it will read and parse all related files xml and ec files it will open the reasoner s UI and then it will send queries to all sensors devices to ask about their current state This last step will take 5 seconds All relevant information regarding these steps is printed on the Eclipse Console If everything is correct no errors and only three warnings will appear on the Console If not check the connections with the Event Manager service and the paths of the required EC files A message Send an event manually s
14. tion Component found that the current evidence 19s Or Ofl Teg Igt The probabilities of the actions that have not been performed yet are as follows Pe egit or Ofl reg LOLI 2499200 Pr CQgZ Or OFL egy 1oelJ 6 89596 Peer lor sofLy beg boul y 9508645 10 Prctegd ot FL co lot 87 926e3000000001 Prog lor ofl hog hot 66 lt 0 7402 Sci ae End Of bust Of pending ACCIONS asa Notice that now both the fact that the fridge is open and that the OpenFridge action has been performed are considered as evidences in order to calculate the percentagies of the remaining actions Happens DoorOpens Ned HallBathroom 400 1 Finally the user decides to go to the bathroom New possible activities are considered i e TakingShower and BrushingTeeth and the PrepareBreakfast activity ends Notice though that even though this latter activity is not active any more the Reasoner sends messages for the most probable actions that the user was expected to make this works as a reminder for the user in case he forgot to perform some task in this case he forgot to close the fridge SSS oo 0 Sa HoldsAt PossActivityStartTime Ned TakeShower 400 10 HoldsAt PossActivityStartTime Ned BrushTeeth 400 10 HoldsAt RecActivityStartTime Ned PrepareBreakfast 2 100 10 HoldsAt RecActivity Ned PrepareBreakfast 2 10 HoldsAt InteractsWith Fridge 10 HoldsAt RecActivityEndTime
15. weights i e 3 2 3 respectively Moreover some alerts have been initiated that are relevant to these activities Based on the weights the WS function returns the probabilities for these activities to be the actual ones It returns 63 for TS and 50 for BT HoldsAt PossActivity Ned BrushTeeth DS 50 6 HoldsAt PossActivity Ned TakeShower DS 63 6 gt Happens ChangeSystemPhaseTo Act 6 The activity values appear as conclusions None activity is recognized though since the confidence is below the threshold of 80 Happens TriggerAlert NoActivity 240 340 1 Nothing happens for the next 4 minutes 240 sec therefore an alert is triggered This has as a result for the BT activity to end because the user cannot be reasonably brushing his teeth for more than 4 minutes Se et yee ol gt Happens ChangeSystemPhaseTo Perceive 7 gt Happens TriggerAlert NoActivity 240 340 7 gt Happens EndPossActivity Ned BrushTeeth 340 BT7 InactiveTooLong 3 7 Yet the system again calculates the new confidence value for BT based on the new observation an activity could be recognized even at the time it ends see next action gt Happens UpdateActivityConf Ned BrushTeeth 340 DS 50 8 Finally the possible activity is retracted and only TS is possible to be happening in the bathroom t 9 pane oe eet gt Happens RetractPossActivity Ned BrushTeeth 9 SSS LO ee HoldsAt H
Download Pdf Manuals
Related Search
Related Contents
USER MANUAL - Bravo Embroidery USA Haier LE50H3280 User's Manual Orientation - FSFN Computer Training Actimove® GenuFlex bientôt GenuStep 指南的封面 60x120MM APAT - chierici.biz WEDECO Aquada - Advanced Pump Technologies Agilent PSA Series Spectrum Analyzers E4406A Vector Signal Manual do Utilizador Bedienungsanleitung Zeolith-Gas-Wärmepumpe Copyright © All rights reserved.
Failed to retrieve file