Home

Extending the Knowledge Machine

image

Contents

1. LA Usage n s de ds Bk aS a Sei We ae ek a KAS Sr ad 12 Results and future work A Dictionary B New concepts in KM 37 37 38 38 41 41 41 43 45 45 45 47 51 51 52 59 59 59 59 60 69 69 71 73 75 79 Chapter 1 Introduction 1 1 Background The inspiration for this master s thesis has largely been two courses in artificial intelligence given at Link ping Institute of Technology in 2003 and 2004 While the latter of the two specifically treated the area of interest of this thesis knowledge representation the first course gave an overview of artificial intelligence and the programming language Lisp Knowledge of Lisp has later been found to be indispensable for performing the work on the thesis 1 2 Purpose and delimitations The purpose of this master s thesis is to change and extend a knowledge rep resentation system called The Knowledge Machine KM to handle larger classes of reasoning tasks associated with reasoning about actions and change The purpose is not to change the basic structure of the KM system described in section 2 4 or to make a completely new implementation of the KM language Thus the limitations of the system discussed in the user manual CPc have not been considered Instead only changes and 1 3 READING GUIDELINES extensions to the system related to the situation mechanism part of KM have been implemented Additionally a starting point for work o
2. subevent a Start pouring water called start pouring with next event test the on fire of the object of Self False next event args t the subevent of Self called stop pouring args NIL the subevent of Self 10 3 USAGE called continue a Continue called continue with next event test the on fire of the object of Self False next event args t the subevent of Self called stop pouring args NIL the subevent of Self called continue a Stop pouring water called stop pouring Light and extinguish fire plan has superclasses Plan every Light and extinguish fire plan has object a Wood first subevent the subevent of Self called light fire subevent a Light fire plan called light fire with object the object of Self next event the subevent of Self called extinguish fire a Extinguish fire plan called extinguish fire with object the object of Self First water is poured on the wood do and next a Start pouring water do and next a Stop pouring water Next a Light and extinguish fire plan is executed do plan a Light and extinguish fire plan with object The wood The water pouring will result in the wood first being dry and then wet for three situations The Light and extinguish fire plan is started immediately after the Stop pouring water action its first part being a Lig
3. 2 4 Structure of the KM System 3 212 eee a ei 25 A au 25 m tonsil ee a a ng Bae 3 Limitations and extensions 3 1 Limitations of KM 0 nn 3 2 Extensions a Rn KR ae 4 Postdiction AL Inspiration u Jc delat ide u ae ee a 4 2 Implementation ind ae Bea Ns Ge BS Bett MISA A E 5 Checking effects and preconditions 5 1 Inspiration and implementation 52 Usage See oF er a ere AS dd de Ben ae SKAR te oS vii NOR HH NOW 19 20 21 21 24 29 29 29 31 CONTENTS 6 Changes to action definitions affecting instance slot value relations 6 1 Inspiron so Sa e A a es Ge eos De AR 6 2 Implementation ss Mo aie win So ls whee Ges Be a 0 37 USO Si ae a he a eee A aera eee a eH Md ee 7 Non deterministic direct effects Vel Inspiration u ra u am Kara a re eh a ol asco 7 2 Implementation dal do a5 dea wa SE we eae SE ee AA Tee USAGES do ane ok nik at ho eta Spee ed ee we LE ae AA 8 Concurrent actions 8 1 Taspirati n 2 4 28 A a ak er er 8 2 Implementation gs 2 a ea amt ees 8 9 SADE aa a a a a el Rd Er a 9 New way of modelling actions AC v T spitatioi ee old RE EEE UT 9 2 Implementation 2 2 do AR AAA A e run 9 3 ABER EI urn a AP ints ih Ae a ie ee a e ne 10 Failed actions and sequences of actions VOS Tnspiration send ne e o o yii 10 2 Implementation fo e se a A rch hae ae ee Se adie nS ee e ohh ln ee Genen 11 Situation levels 11 1 Inspiration and implementation
4. lt class gt has lt slot1 gt lt expr11 gt lt expr12 gt lt slot2 gt lt expr21 gt lt expr22 gt The slots slot may be regarded as binary relations which hold between the instances of the class and other instances The expressions expr 2 1 BASICS OF KM evaluate to zero or more instances Even though KM statements can usually be translated into standard first order logic notation KM does not use such a notation as the above example clearly shows By not using FOL notation the authors of KM have intended to make knowledge base construction easier However as stated most KM expressions may be translated into FOL notation In the above case the equivalent would be Vx y isa x class A y expri x slot x y where expr x is a function which returns the value of lt expr gt for some instance x of class and isa x c is true if x is a member of class c The properties of a particular instance is described in a similar manner lt instance gt has instance of lt classi gt lt classn gt lt slot1 gt lt expri1 gt lt expr12 gt lt slot2 gt lt expr21 gt lt expr22 gt In this case the slot relations hold between the instance and the values acquired by evaluating the expressions The values of the instance of slot are the names of the classes to which the instance belongs The FOL equivalent is VI y y expri 1 slot I y Here expr
5. preserving this way of modelling and handle interactions in the action def initions themselves However for each action all other actions which could potentially interact with it would have to be included in the action defi nition In the case of actions with duration all possible combinations of overlapping would also have to be covered The task of representing actions in this way is further complicated if non deterministic effects are taken into consideration Gus01 presents an alternative to this way of representing actions which has been applied to KM Instead of directly affecting what is re garded to be real features i e instance slot combinations of the world actions affect what is referred to as influences The values of the real 9 2 IMPLEMENTATION features are then determined by rules relating to the influences They are thus only indirectly affected by the actions To apply this to KM slots are divided into four types e The equivalent of influences are directly affected by the actions and their values should be both projected and postdicted They are there fore represented by Inertial Fluent slots e Rule based slots with default values should not have their values pro jected or postdicted but the values should be allowed to vary between situations They should therefore be Fluent e In the case of rule based slots with no default values values should be fetched from earlier situations but on
6. I returns the value of lt expr gt for the instance I Classes can have properties of their own which are not inherited by their members Most importantly classes may have superclasses and subclasses representing supersets and subsets of members of the class Class properties are declared in the following way lt class gt has superclasses lt superclass1 gt lt superclassn gt lt slot1 gt lt expri1 gt lt expr12 gt lt slot2 gt lt expr21 gt lt expr22 gt 5 The slots superclasses and subclasses are inverses of each other and declaration is only needed one way If for instance the class Car is declared to be the subclass of Vehicle then Vehicle will be the superclass of Car Thus a class for bananas could be described in the following way Banana has superclasses Fruit every Banana has colour Yellow shape Bent The FOL equivalents would be superclasses Banana Fruit Vb isa b Banana colour b xY ellow A shape b xBent The prefix in Yellow and Bent above is an example of the KM naming conventions classes begin with an upper case letter eg Banana slots begin with a lower case letter eg colour named instances begin with a prefix eg Yellow anonymous instances begin with a _ prefix eg _Carl3 variables begin with a prefix eg x As the naming conventions propose there are two kinds of instances in KM named and anonymous ones The latte
7. Start lighting fire has del list triple Things going on lighting fire the lighting fire of Things going on add list triple Things going on lighting fire True Stop lighting fire has superclasses Event every Stop lighting fire has del list triple Things going on lighting fire the lighting fire of Things going on 97 add list triple Things going on lighting fire False Start pouring water has superclasses Event every Start pouring water has del list triple Things going on pouring water the pouring water of Things going on add list triple Things going on pouring water True Stop pouring water has superclasses Event every Stop pouring water has del list triple Things going on pouring water the pouring water of Things going on add list triple Things going on pouring water False There is also an object The wood The wood has dry if in curr or any of n prev situations 3 the pouring water of Things going on True 9 3 USAGE then False else True on fire if the lighting fire of Things going on True and the dry of Self True then True else if the dry of Self False then False The rules contained in the slots of The wood signify that the wood is dry if water has not been poured on it for the last three situations and that the wood is on f
8. True and 90 contradict the preconditions of _Fix engine4 and _Remove colour6 51 Chapter 9 New way of modelling actions 9 1 Inspiration The introduction of concurrent actions presented in chapter 8 allows for some more modelling flexibility by letting more than one action be per formed between two situations However representing actions being ex ecuted during several situations and actions only partly overlapping each other is still not easily done Gus01 deals with this and more specifically problems associated with the forms of interactions arising from allowing actions that depend on each other to overlap Another topic covered by Gus01 is delayed effects of actions Rep resenting actions with delayed effects is somewhat difficult in the original version of KM It is to some degree possible to let slot values depend on the state of the world in an earlier situation but encoding rules of this kind is rather cumbersome 9 2 IMPLEMENTATION 9 2 Implementation Imagine a scenario with two action classes Light fire and Pour water and an instance The wood of the class Wood Light fire has superclasses Action every Light fire has object a Wood pcs list triple the object of Self dry True del list triple the object of Self on Tire False add list triple the object of Self on fire True Pour water has superclasses Action every Pour water has ob
9. and as in the case of the local values the system produces an error message and deletes all values of the slot in the current situation At this point the values found so far are saved in the knowledge base Then values are fetched from the instance s classes and unified in As before if the slot is single valued the system produces an error message and deletes all values of the slot in the current situation The reason for saving the values before getting the class values is that not doing so would sometimes result in indefinite looping As mentioned before the projected values are unified with the local and subslot values only if the slot is multivalued If it is single valued projection will result in a single value provided it is successful The system tries to unify that single value with what has already been found If it does not succeed the projected value is discarded Lastly for both kinds of slots the produced value or values are saved in the knowledge base The slot value computation may be expressed in a FOL like manner In the basic case where the situation mechanism is not used i e where all slots may be regarded as Non Fluent it can be written in the following way ANS xIslot instance x uni fy i f sv OW N V ALU ES slot Ug m uni fy i f sv SU BSLOT V ALU ES slot Ur m uni fy i f sv INHERITED V ALU ES slot where OW N VALUES x own value instance slot x SUBSLOT V ALUES x subslot slot sub A su
10. friends and they can have many friends of their own The default cardinality is N to N 1 to 1 and N to 1 slots are denoted single valued whilst the other two kinds are called multivalued inverse For instance is father of and has father are each other s in verses The default inverse of slot is slot of subslots specifies more specific slots For instance sweaters might be a subslot of clothes superslots is the inverse of subslots i e more general slots Slots do not have to be explicitly declared If no declaration is provided for a certain slot its domain and range won t be restricted and it will acquire the default cardinality and inverse There are two main commands used for retrieving information from the knowledge base showme lt instance gt and the lt slot gt of lt instance gt For the time being it is sufficient to say that the showme command simply displays what facts about the specified instance are currently stored in the knowledge base whilst the other one computes the value of the specified slot in the given instance In what way this is done is further explained in section 2 3 In the banana example given earlier the command showme The banana would produce the answer The banana has instance of Banana whilst the colour of The banana would return Yellow since The banana is a banana and all bananas are yellow 2 2 Situation Mechanism Apart from its basic functionality
11. from table 11 1 73 Chapter 12 Results and future work This thesis has resulted in a new version ofthe KM system that can handle some new kinds of tasks related to reasoning about actions and change However the new version does not include simulation of multiple possible futures Summarising the features introduced in the version resulting from this thesis include the following Instance slot combinations whose slots are Inertial Fluent now have their values projected backwards postdicted from one situation to the previous provided that the action connecting the situations does not affect the instance slot combination The system can now alert the user during a slot value computation if the values found for the instance slot combination are incompatible with the effects of the preceding action s or the preconditions of the next action s Changes made to actions after they have been performed may now affect instance slot value relations It is now possible to model non deterministic direct effects of actions In the new version two situations may be connected by more than one action i e concurrent actions are allowed e Actions being performed during several situations actions partly overlapping each other and actions with delayed effects are much more easily modelled e Thanks to the introduction of situation levels and joining situations the new version provides an eflicient means of determining in what way
12. instance slot value relations vary as well as what instance slot value relations are common to a set of situations Additionally the thesis shows that modelling failure and sequences of ac tions can be done mainly within the original version of KM As described throughout the thesis some possible extensions have been thought of but not implemented These could be the subject of future work and they include the following e Continuous change chapter 3 e When performing an action in a situation following an action with non deterministic direct effects the preconditions of the action to be performed might only be satisfied if one or some of the sets of effects of the non deterministic action are allowed to hold In such cases the user could be notified and given the choice to let the designated set of effects hold section 7 2 e Making sure the check of effects reacts if an action carrying non deterministic direct effects has no valid set of effects section 7 2 e Introducing postdiction for Rule Based Inertial Fluent slots thus eliminating the need for this special kind of slot section 9 2 75 Appendix A Dictionary Action An action connects two situations and may cause the values of certain instance slot combinations to change It may also carry pre conditions Botany Knowledge Base project It was as part of this project that the first version of KM was created Cardinality A slot may carry a certain c
13. modelling delayed effects of actions In KM even though an action s definition may be changed after it has been performed the changes won t affect any instance slot value relations 3 2 EXTENSIONS If the action is executed again using for instance the do lt action gt com mand a new situation is created in which the effects are asserted leaving the old next situation unaffected Since instance slot value relations may be added or removed at any time in the global or any other situation instance slot value relations may sometimes contradict the effects and preconditions of the actions which have been performed However KM is unable to detect such contradictions and will take no notice of the effects and preconditions once the actions have been performed 3 2 Extensions A number of possible ways of extending KM have been considered partly inspired by the limitations discussed in section 3 1 e Projection back in time postdiction e Check of effects and preconditions e Changes to action definitions affecting instance slot value relations e Non deterministic direct effects e Concurrent actions e New way of modelling actions e Failed actions and sequences of actions e Situation levels e Continuous change Each of these is discussed briefly below and those implemented are further described in the following chapters As described in section 2 2 KM allows a situation to be followed by more than one other situation
14. non deterministic add values appear in the next situation Thus if an action carries non deterministic add and delete effects an error message is not given if at least one delete value is missing in the next situation and at least one add value is present However the missing delete value and the present add value may have their origin in different sets of effects If that is the case there is really no valid set of effects However the system will not detect this Recall that postdiction presented in chapter 4 is performed if the next action does not affect the instance slot combination of the query Using non deterministic direct effects an action may affect an instance slot com bination even though performing the action does not result in the instance slot combination taking on new values For instance tossing a regular die see section 7 3 will result in it showing one of its six sides However it cannot be expected to be known in advance what the result of the toss will be Clearly what side is shown is affected by the action and the result should not be postdicted to previous situations It should be pointed out that all sets of effects should contain the same instance slot combinations If an instance slot combination is left out in some set of effects it will receive the value NIL in the situation following the action and it won t be affected by checking of effects The FOL formulation of action performing presented in s
15. pings universitet Copyright Svenska Detta dokument halls tillg ngligt pa Internet eller dess framtida ers ttare under en l n gre tid fran publiceringsdatum under f ruts ttning att inga extra ordin ra omst ndigheter uppstar Tillgang till dokumentet inneb r tillst nd f r var och en att l sa ladda ner skriva ut enstaka kopior f r enskilt bruk och att anv nda det of r ndrat f r ickekommersiell forskning och f r undervisning verf ring av upphovsr tten vid en senare tidpunkt kan inte upph va detta tillst nd All annan anv ndning av dokumentet kr ver upphovsmannens medgivande F r att garantera ktheten s kerheten och tillg ngligheten finns det l sningar av teknisk och administrativ art Upphovsmannens ideella r tt innefattar r tt att bli n mnd som upphovsman i den om fattning som god sed kr ver vid anv ndning av dokumentet p ovan beskrivna s tt samt skydd mot att dokumentet ndras eller presenteras i s dan form eller i s dant sammanhang som r kr nkande f r upphovsmannens litter ra eller konstn rliga anseende eller egenart F r ytterligare information om Link ping University Electronic Press se f rlagets hemsida http www ep liu se English The publishers will keep this document online on the Internet or its possible replacement for a considerable time from the date of publication barring exceptional circumstances The online availability of the document implies a permanent permissio
16. situations manual CPb describes that the original version of KM explicitly prohibits the direct effects of actions to be disjoint i e non deterministic This has been the main inspiration for looking into the question of introducing non deterministic direct effects in KM 7 2 Implementation Non deterministic direct effects are represented using the new built in class Set of effects An instance of this class should contain an add list and a delete list specifying a set of effects A number of sets of effects are then contained in the sets of effects slot of an action sets of effects is a new built in slot If an action is associated with a sets of effects slot carrying a value it is presumed to carry all its effects in that slot and regular add and delete lists are disregarded When the action is performed only what is common to all sets of effects 7 2 IMPLEMENTATION is asserted in the next situation When the effects of an action containing non deterministic direct effects are checked for contradictions to the values of an instance slot combination found during querying in the next situation an error message is given only if the values from the query are inconsistent with all the sets of effects of the action If one or more of the sets of effects support the values found by the query the values are regarded to be consistent with the action In other words the system reacts if all non deterministic delete values or none of the
17. slot combina 8 2 IMPLEMENTATION tion those add effects are not taken into account Instead the instance slot combination is given the value NIL This means that executing of actions is changed in general not only in the case of concurrent actions In the original version of KM an action may cause an instance slot combination with a single valued slot to take on more than one value The problem is not detected until a query is passed for the instance slot combination and the value is then changed to NIL However there is obviously no limitation on the number of delete effects affecting a single valued slot In FOL performing actions in the case where preconditions are asserted and not checked can be expressed in the following way Vs s p a holds in pes list a p s A next situation s s a holds in p s Vs s p a holds in ncs list a p s A next situation s s a holds in p s Vs s p a p ADD PROPOSITION S a s A next situation s s a holds in p s Vs s p a p DEL PROPOSITION S a s A next situation s s a holds in p s where ADD PROPOSITION S a s remove multiple pr opositions f or single valued slots remove contradictions ALL ADD PROPOSITIONS a s ALL ADD PROPOSITIONS a s plaction a f fects instance slot a instance slot A proposition contains instance slot p i s A actions contain proposition add list s p DEL PROPOSITIONS a s Ip
18. the object of Self 8 3 USAGE driving True del list set triple the object of Self engine broken the engine broken of the object of Self triple the owner of the object of Self angry True add list triple the object of Self engine broken False every Remove colour has object a Car action colours a Colour pcs list set triple the object of Self colours the action colours of Self triple the object of Self speed 0 ncs list triple the object of Self driving True del list triple the object of Self colours the action colours of Self 49 add list triple the owner of the object of Self angry True The changes made to Remove colour include two new preconditions one normal and one negated requiring the car not to be moving when colour is removed and a new add effect representing that removing colour from the car for some reason makes the owner angry Like Remove colour Fix engine requires the car to be still Additionally the engine must be broken A Fix engine action causes the engine to be not broken and if the owner is angry the anger is removed Now situation mode is entered and a Paint action is performed do and next a Paint with object The car action colours Green Next a Fix engine action is executed do a Fix engine with object The car Since the do command is
19. thus providing the possibility of modelling multiple possible futures However such modelling is outside the area of interest of this master s thesis and thus each situation is allowed to have at 25 most one next situation Note that this does not affect the FOL formulas associated with performing actions presented in section 2 2 Projection back in time also known as postdiction has been imple mented and is covered in chapter 4 In short values are fetched from a future situation if the preceding action does not affect them If projected and postdicted values cannot be combined with values from other sources the values from the other sources are used and an error message is passed As described in section 3 1 contradictions may appear between instance slot value relations on the one hand and the effects and preconditions of actions on the other In the new version resulting from this thesis this is handled in connection to querying by passing error messages when contra dictions are discovered The possibility of letting changes to action definitions affect instance slot value relations has been implemented by changing the way actions are performed Simply put if the situation in which a certain action is performed already has a next situation no new situation is created Instead the effects of the action are made to hold in the existing next situation The situations manual CPb stating that the original version of KM explici
20. unless computation is explicitly requested Thus Yellow and Purple are not automatically projected from _Situation7 to _Situation8 However if a request for the value is passed in _Situation8 by giving the command the colours of The car it will result in the answer Yellow Pur ple Blue Orange Slot value requests may be more complex than the ones presented above Suppose for instance that Blue carries the slot nuance with the value Sky Then in _Situation8 the command the nuance of the colours of The car will give the answer Sky Slot value commands may be even more complex which is described in CPc and CPb 2 4 Structure of the KM System The KM system can be divided into three main parts command processing computation and knowledge base handling CPa This division is not explicitly described in the code or the manuals but appears apparent when the code is examined As mentioned commands in KM are matched to a list containing command patterns and instructions on how to handle the different kinds of commands The function responsible for performing the matching is called kmO 2 5 UsE OF KM So FAR In terms of amount of code the computation part is the largest of the three and the main area of interest for this thesis As the name suggests it is where the reasoning in KM is performed for instance slot value com putation The last of the three parts is responsible for maintaining and handling the K
21. www ai sri com project SHAKEN January 2005 Link pings universitet Avdelning Institution Division Department AIICS Datum Date Dept of Computer and Information Science 2005 03 14 581 83 Link ping Spr k Language Svenska Swedish X Engelska English Rapporttyp Report category Licentiatavhandling xX Examensarbete C uppsats D uppsats vrig rapport URL f r elektronisk version http www ep liu se exjobb ida 2005 dd d 026 ISBN ISRN LITH IDA EX 05 026 SE Serietitel och serienummer ISSN Title of series numbering Zn Author Title Extending the Knowledge Machine F rfattare Markus Ingevall Titel Ut kning av The Knowledge Machine Sammanfattning Abstract This master s thesis deals with a frame based knowledge representa tion language and system called The Knowledge Machine KM de veloped by Peter Clark and Bruce Porter at the University of Texas at Austin The purpose of the thesis is to show a number of ways of changing and extending KM to handle larger classes of reasoning tasks associated with reasoning about actions and change ed oe Knowledge representation reasoning about actions and change The eywords Knowledge Machine KM GS UN gre NI Oty Ne E ry xa we Oy a x Ca ry LINK PING UNIVERSITY gt ELECTRONIC PRESS eso Link
22. Final thesis Extending the Knowledge Machine by Markus Ingevall LITH IDA EX 05 026 SE 2005 03 14 Final thesis Extending the Knowledge Machine by Markus Ingevall LiTH IDA EX 05 026 SE Supervisor Professor Erik Sandewall IDA at Link pings universitet Examiner Professor Erik Sandewall Department of Computer and Information Science at Link pings universitet ill Abstract This master s thesis deals with a frame based knowledge representation language and system called The Knowledge Machine KM developed by Peter Clark and Bruce Porter at the University of Texas at Austin The purpose of the thesis is to show a number of ways of changing and extending KM to handle larger classes of reasoning tasks associated with reasoning about actions and change Keywords Knowledge representation reasoning about actions and change The Knowledge Machine KM Acknowledgements I would like to thank my supervisor and all members of the Cognitive Autonomous Systems Lab for their support during my work as well as Ola Leifler who has provided the KIIEX template used for producing this thesis Contents 1 Introduction Ik Background zn ru gone re a Ten pa 1 2 Purpose and delimitations 1 3 Reading guidelines y 2 es rear SE ang ae 2 Description of KM 21 gt Basics Oof KM 248 2 245 Sal Ba Fld Gece ae 2 2 Situation Mechanism acu sr 0 08 Aa a na es 2 3 Querying the knowledge base
23. KM provides a situation mechanism based on but not identical to Situation Calculus CPb An introduction to Situation Calculus may be found in RNO3 Its main concept is a situ ation describing the state of the world at a certain moment The normal knowledge base which facts are entered into by default is regarded as the global situation and its facts are common to all other situations i e if something holds in the global situation it holds in all other situations as well In KM terms the global situation is the default supersituation How ever other situations may be supersituations as well in which case what is true in a supersituation also holds in all its underlying situations its subsituations Facts may also be situation specific which means that they hold in a certain situation but not necessarily in any other Situations are instances of the built in class Situation and may be ordered in time by being connected to each other A situation can have several next situations but only one previous This reflects the notion that two or more situations cannot be followed by a single one whilst multiple possible futures are allowed Next and previous situations are specified using the built in slots next situation and prev situation respectively 2 2 SITUATION MECHANISM In order for some slots to be situation dependent and others to be situation independent they need to be grouped into different categories This is done u
24. M knowledge base i e what has been entered into the sys tem Apart from these three parts there are some auxiliary functions used for loading and saving knowledge base files and resetting the knowledge base and two others used for displaying the version number and licence 2 5 Use of KM so far KM has mainly been used in three projects The first of these was the Botany Knowledge Base project which was conducted from 1986 to 1994 and which generated the first early version of KM According to the project home page bkb05 the goal was to create a laboratory for research on Al tasks that require extensive knowledge such as novel problem solving language understanding and learning Between 1999 and 2003 KM was used by the SRI team participating in the Rapid Knowledge Formation RKF project The aim of the project was to enable experts of different fields untrained in Al to construct knowl edge bases efficiently and accurately The SRI team made up of Boeing Information Sciences Institute ISI at University of Southern California Northwestern University Stanford University University of Massachusetts at Amherst University of Texas at Austin University of West Florida Massachusetts Institute of Technology and Pragati Systems developed the SHAKEN system The group home page sri05 is still maintained in contrast to the project home page As part of the project the possibility of creating and executing rather elaborate plans wa
25. Suppose there is an instance Kalle associated with five slots and nine situations The slot values vary between the situations as shown in ta ble 11 1 T signifying True and F signifying False Making a joining situation for situation 1 2 and 3 with respect to all the slots in Kalle is 11 2 USAGE Situation hungry cold happy tired old 1 oo lo OK W WD HHHHHHHHH Heat ee ae Headed eg SAS eed HHHHHHHHH Table 11 1 Slot values done by passing the following command make joining situation _Situationi _Situation2 _Situation3 Kalle hungry cold happy tired old This produces the following message The situations _Situationi _Situation2 _Situation3 have been joined in situation _Situationi0 The joining situation is unambiguous with respect to at least the following triple Kalle hungry set True triple Kalle cold set True triple Kalle old set True As expected the created situation is unambiguous with respect to hun gry cold and old which carry the same value in situations 1 2 and 3 If all nine situations are included instead the joining situation will be unambiguous with respect to only hungry and old A situation level for for instance cold and happy is made using this command make situation level Kalle cold Kalle happy This will give rise to six joining situations encompassing situations 1 and 2 3 4 5 and 6 7 and 8 and 9 respectively as can be deduced
26. VALUES 2 holds in2 slot instance x sit vis sit unify if svu LOCAL V ALU ES slot Uk m uni fy if su SU BSLOT V ALU ES slot Ur m uni fy if sv IN H ERITED V ALU ES slot Ux m yly PROJECTED V ALU ES single valued slot Ug m z z POSTDICTED VALUES A 7single valued slot where PROJECTED VALUES unify if sv x fluent status slot Inertial Fluent A sit xGlobal prev situation sit sit A sit Z vis sitA holds in2 slot instance x sit vis sit U sit POST DICTED V ALUES unify if su 2 fluent status slot Inertial Fluent A sit xGlobal A next situation sit sit A sit E vis sitA af fected by action instance slot sit A holds in2 slot instance x sit vis sit U sit and single valued slot ANS VALUES A single valued slot A uni fiable VALUES PROJECTED V ALU ES POSTDICTED V ALU ES gt ANS VALUES UKM PROJECTED V ALUES UKM POST DICTED V ALU ES single valued slot uni fiable V ALU ES PROJECTED V ALU ES POSTDICTED V ALU ES gt ANS VALUES 31 LOCAL V ALUES SUBSLOT V ALUES and INHERITED V ALUES are the same as before holds in2 prop sit vis sit is a variant of holds in which takes into account what situations have already been visited As expected next situation sit sit is true if and only if sit is the next situ ation of sit af fected by action instance slot sit holds if and only if the instance slot combination is affec
27. ardinality describing in what way it can connect frames to each other Chronological minimization A limitation of KM described in the situ ations manual CPb Class A kind of frame representing a group of individuals sharing some properties Continuous change A limitation of KM described in the situations man ual CPb Disjunctive ramifications A limitation of KM described in the situa tions manual CPb the same thing as non deterministic indirect ef fects Domain The domain of a slot is the most general class es allowed for an instance using the slot Fluent status The fluent status of a slot determines in what way its values should persist between situations Frame Frames are the basic unit of representation in KM They may be either instances or classes Halo project An ongoing project in which KM is used by one of the participating teams Instance A kind of frame An instance may be anonymous or named Inverse Every slot has an inverse representing the opposite relation The default inverse of slot is slot of Lisp The programming language used for implementing KM Non deterministic effects Effects with unknown outcome They may be direct or indirect Postdiction The idea that facts known to hold in the future may be pre sumed to hold at the current point in time provided they have not been made to hold on the way Projection The idea that facts known to hold earlier may be presumed to hold at t
28. b instance x INHERITED VALUES alisa instance c A member value c slot x own value instance slot value is true if and only if the knowledge base contains the relation instance slot value subslot slot sub means that sub is a subslot of slot and member value class slot value holds if and only if the slot value relation holds for all members of class own value 2 3 QUERYING THE KNOWLEDGE BASE subslot slot sub and member value are not defined in the KM manual but are used here to make it to easier to explain the slot value computation procedure The same holds for uni fy if sv set slot which attempts to unify the members of the given set provided that the slot is single valued ANS is used to denote the result of the query Ux m is a means of expressing KM s unification of sets When sets are unified each set member is unified with at most one member of another set Members of the same set are not unified The resulting set will thus contain at least the same number of members as the smallest of the unified sets When two instances are unified during set unification just as in the case of separate unification of instances both of them must not be named instances and their slot values must be equal or unifiable However for two instances to be unified during set unification an additional condition must hold The classes of one of the instances must subsume or equal the classes of the other instance i e the instances
29. class and an empty Finish action class Remove has superclasses Action every Remove has object a Block tower a Tower pcs list triple the object of Self clear Yes del list triple the object of Self on the on of the object of Self triple the tower of Self parts the object of Self triple the object of Self parts of the parts of of the object of Self triple the on of the object of Self clear No add list triple the on of the object of Self 10 3 USAGE clear Yes triple the object of Self on Floor Finish has superclasses Action There is also an Unstack plan plan class Unstack plan has superclasses Plan every Unstack plan has object a Tower first subevent the subevent of Self called remove subevent a Remove called remove with object the Block with parts of the Tower object of Self clear Yes tower the Tower object of Self next event test the number of the parts of the Tower object of Self 1 next event args t the subevent of Self called finish args NIL the subevent of Self called remove a Finish called finish Suppose there are four blocks arranged in a tower This scenario is set up in the following way MyTower has instance of Tower parts BlockA BlockB BlockC BlockD 63 BlockA
30. currency in the form presented above somewhat extends modelling flexibility However actions being performed during several situations and actions having delayed effects are still not easily represented Chapter 9 shows in what way KM has been modified to facilitate this kind of mod elling San97a and to some degree San97b discuss success and failure of actions as well as sequences of actions It has motivated investigating how to model this in KM the conclusion being that no major changes are needed and that in fact KM allows for more kinds of sequences than the ones presented in San97a What has been found out is covered in chapter 10 The last of the implemented extensions was inspired by a discussion on whether there would be a point in organising situations on different levels of detail in other words letting the values of instance slot combinations sometimes vary within situations What has been concluded is covered in chapter 11 The last of the presented extensions continuous change has not been implemented After looking into the issue it was concluded that trying to implement continuous change would not be worth the effort when put in relation to other possible extensions Table 3 1 aims to show what aspects of the system have been affected by the implemented extensions querying Out knowledge base construc tion In or both 27 Extensions Postdiction Check of effects and preconditions Changes
31. e set of trajectories whose features belong to F and carry constant values in the interval 11 1 INSPIRATION AND IMPLEMENTATION One reason for making such a change would be to let the user extract the parts of the knowledge base relating to a certain set of instance slot combinations while disregarding the rest Thus for each combination of instance slot combinations a situation level could be made in which shifts between situations would occur only when one or more of the included instance slot combinations changed their values and in which only those instance slot combinations could be affected In this way parts of the knowledge base irrelevant to the user at a certain time could be filtered away However this would not achieve increased expressivity Instead one would have to adapt actions to situation levels and the use of rules in situation levels would have to be restricted to include only the specified instance slot combinations Therefore situation levels of this kind have not been implemented However it has been considered worth implementing a different kind whose purpose is simply to show in what way a set of instance slot combinations vary and thus not to create partitions of the knowledge base Such a situation level is created by passing the command make situation level lt instance1 gt lt slot1 1 gt lt slot1 2 gt lt instance2 gt lt slot2 1 gt lt slot2 2 gt O The system will then divide al
32. ection 2 2 is not in itself affected by the extension which is the subject of this chapter However add list a p now holds if p appears in the regular add list of the action or if the action contains sets of effects and all sets of effects contain p The equivalent holds for del list a p Suppose an action with non deterministic direct effects is performed and then the user tries to perform a different action carrying some precon ditions In such a case the situation could arise that the preconditions are 43 not satisfied but would be if one of the sets of effects of the first action were allowed to hold The user could then be informed and asked whether the suitable set of effects should be used or not However this has not been implemented 7 3 Usage An example is used here to demonstrate non deterministic direct effects Imagine a die with six sides numbered one to six and a tossing action causing the die to leave the tosser s hand while making a sound and ending up showing one of its six sides There are three slots number up representing the number on the up side of the die makes sound and in hand The slots may be Fluent or Inertial Fluent There is also a Toss action class with the following definition Toss has superclasses Action every Toss has sets of effects a Set of effects with add list set triple The die number up 1 triple The die makes sound Yes del list triple The die
33. f Slot fluent status Inertial Fluent cardinality N to 1 citizen of B has instance of Slot fluent status Inertial Fluent cardinality N to 1 23 The person has citizen of A if the age of Self gt 17 and the citizen of B of Self Yes then No else Yes citizen of B if the age of Self gt 17 and the citizen of A of Self Yes then No else Yes new situation The person has age 17 citizen of A Yes citizen of B Yes next situation The person has age 18 Here when queries are passed for citizen of A and citizen of B KM will return No as a response to the first query and Yes as a response to the second one It should be noted that the direct effects of actions are explicitly not allowed to be disjunctive It is thus not possible to model non deterministic actions Another limitation of KM is that it does not offer any means of mod elling continuous change other than by representing it in the form of several discrete actions Such a representation is not sufficient in all cases Fur thermore KM makes a clear distinction between actions and situations not allowing modelling of things happening during the execution of an ac tion i e actions are presumed to be instantaneous In addition to this execution of actions is limited to one at a time Thus concurrent actions are not allowed Additionally there is no efficient way of
34. formed in a non predefined order An example of this is given in sec tion 10 3 Unfortunately the original version of KM does not allow the parts of a plan to be plans in themselves but only actions However this has been changed in the new version which means that it is possible to combine plans to form higher level plans Even though the failed slot is not required in order to model sequences of actions it has been included and does serve a purpose It is imaginable that one would like to be able to replace one action with another but still be able to change back to the old one In other words one might want to link several actions to a pair of situations but only have the system consider one or some of them at a time This is what happens automatically if permit concurrent actions is set to nil 10 3 Usage The following example has been inspired by blo05 Imagine a tower con sisting of blocks which should be unstacked Only one block the one on top may be removed from the tower at a time The fluent status of the following slots is other than Fluent instrument has fluent status Non Fluent 61 object has fluent status Non Fluent tower has fluent status Non Fluent plan has fluent status Non Fluent parts has fluent status Rule Based Inertial Fluent on has fluent status Rule Based Inertial Fluent clear has fluent status Rule Based Inertial Fluent There is a Remove action
35. has instance of Block on BlockB clear Yes BlockB has instance of Block on BlockC clear No BlockC has instance of Block on BlockD clear No BlockD has instance of Block on Floor clear No An Unstack plan is executed by passing the command do plan a Unstack plan with object MyTower Passing a showme MyTower command now illustrates what the plan has achieved MyTower has instance of Tower in situation _Situationi MyTower has parts BlockA BlockB BlockC BlockD object of _Unstack plan2 tower of _Remove3 10 3 USAGE in situation _Situation5 MyTower has parts BlockB BlockC BlockD lt gt BlockA object of _Unstack plan2 tower of _Remove6 in situation _Situation9 MyTower has parts BlockC BlockD lt gt BlockB object of _Unstack plan2 tower of _Remove10 in situation _Situation11 MyTower has parts BlockD lt gt BlockC object of _Unstack plan2 Remove actions are thus performed until only one block remains in the tower Whether a Remove action should be considered to have failed if no blocks are stacked on each other any longer or if blocks are still stacked on each other is just a matter of perspective In the former case the stop condition of the sequence above would be failure whilst in the second case it would be success However
36. he current point in time Range The range of a slot is the most general class es allowed for its filler Rapid Knowledge Formation project A project that was conducted from 1999 to 2003 in which one of the participating teams used KM Situation The main concept of KM s situation mechanism Situation action dichotomy One limitation of KM described in the sit uations manual CPb Slot Slots are used in KM to represent relations between frames 77 Slot value A value contained by a slot Subclass The subclass of a class represents a subset of its members i e the subclass is more specific than the original class Subslot Subslots relate to slots in the same way as subclasses relate to classes Superclass The superclass of a class represents a superset of its members i e the superclass is more general than the original class Superslot Superslots relate to slots in the same way as superclasses relate to classes Variable Variables can be used in KM to make it easier to formulate expressions 79 Appendix B New concepts in KM In order of appearance in the thesis check effects and pcs dont check effects and pcs Set of effects sets of effects Rule Based Inertial Fluent in all n prev situations n lt expr gt in curr and all n prev situations n lt expr gt in all n prev situations m situations back n lt expr gt in any of n prev situations n lt expr gt in curr or any of n prev s
37. he do and next and try do and next commands work the same way as do and try do respectively except that the system stays in the new situation after performing the action Actions may be regarded to have indirect as well as direct effects of which only the latter are stated in the action descriptions The indirect effects or ramifications are determined in KM by conditions or rules associated with the affected slots For instance suppose there is an action type Switch on Its direct effect might be that a certain switch changes position whilst as an indirect effect is that an electric current appears in a certain wire Indirect effects may give rise to other indirect effects as well For instance the electric current might make a certain light go on As this example aims to show it is difficult if not impossible to know all the effects of an action if rules are used One problem of using rules and thus allowing ramifications is that actions might have contradictory effects Section 3 1 explains this further Below is an example with the aim of illustrating in what way the situa tion mechanism works First the following class and instance declarations are entered every Vehicle has has wheels True Car has superclasses Vehicle 2 2 SITUATION MECHANISM The car has instance of Car True has instance of Truth value Red has instance of Colour Blue has instance of Colour Yello
38. holds if and only if the knowledge base contains the relation instance slot value for situation sit or any of its supersituations It should be noted that when using the situation mechanism own value defined earlier is only applicable to Non Fluent slots which carry the same values in all situations If the situation mechanism is not used the fluent status does not affect the computation of slot values As mentioned earlier holds in prop sit is used to denote that prop holds in the situation sit For instance if a query for the values of the slot colours of the instance The car in the situation _Situation54 produces the result Red Blue then holds in slot The car Red _Situation54 and holds in slot The car Blue _Situation54 are true prev situation sit sit is true if and only if sit is the previous situation of sit and unifiable which can take an arbitrary number of sets is true if and only if the sets can be unified In the example from section 2 2 the command showme The car produces the following result The car has instance of Car has wheels True 2 3 QUERYING THE KNOWLEDGE BASE object of _Paint2 _Remove colour4 _Repaint6 in situation _Situationi The car has colours Red Blue speed 70 in situation _Situation3 The car has colours Red Blue Green in situation _Situation5 The car has colours Blue Green lt gt Red in situation _Sit
39. ht fire plan but does not result in the wood being on fire until it 67 is once again dry The lighting sub plan is followed by an Extinguish fire plan which puts out the fire Events and situations thus occur in the following order _Situation1 _Start pouring water2 _Situation3 _Stop pouring water4 _Situation5 _Start lighting fire9 _Situation12 _Continuel4 _Situation19 _Stop lighting fire22 _Situation23 _Start pouring water26 _Situation29 _Stop pouring water32 _Situation35 10 3 USAGE 69 Chapter 11 Situation levels 11 1 Inspiration and implementation The extension or rather extensions presented in this chapter arose as a result of a discussion on the nature of situations More specifically the question was if there would be a point in organising situations on dif ferent levels of detail in other words letting the values of instance slot combinations sometimes vary within situations This could be formulated as a situation being unambiguous with respect to possibly only some of the instance slot combinations namely the ones carrying the same value throughout the situation Formally this could be expressed in the following way e The value of a feature instance slot combination f at time point t is u f t e A trajectory on t ta2 for f is the set of values taken by f in the interval i e u f t ti Et lt to e A situation which is unambiguous with respect to F fi fo is th
40. ified before sit uations if such exist and only if that is not the case in the current situation In FOL notation the old way of determining the next situation of an action could be formulated per formed in a s Is next situation s s a whilst the new way corresponds to per formed in a s gt 3s be fore situation a s next situation s s a A 38 be fore situation a s Is next situation s s a 6 3 Usage The example given in section 2 2 is used here to illustrate how to make use of the extension to KM presented in this chapter After entering into situation mode an instance of the action class Paint is created a Paint with 39 object The car action colours Green It may be called _Paint2 represents the belief that a certain car is painted green and is performed by passing the command do and next _Paint2 Now suppose that at some later point in time it is found out or rather believed that the car was actually painted red To reflect this _Paint2 is changed in the following way _Paint2 now has action colours Red _Paint2 may now be reperformed by using either the do or the do and next command If do is chosen the action is performed and the system then returns to whatever was the current situation whilst in the case of do and next it ends up in the situation following the action As before if try do or try do and next are
41. in hand Yes a Set of effects with add list set triple The die number up 2 triple The die makes sound Yes del list triple The die in hand Yes a Set of effects with add list set triple The die number up 3 triple The die makes sound Yes del list triple The die in hand Yes 7 3 USAGE a Set of effects with add list set triple The die number up 4 triple The die makes sound Yes del list triple The die in hand Yes a Set of effects with add list set triple The die number up 5 triple The die makes sound Yes del list triple The die in hand Yes a Set of effects with add list set triple The die number up 6 triple The die makes sound Yes del list triple The die in hand Yes Note that the effect on makes sound and in hand is the same in all sets of effects Thus in the situation resulting from performing a Toss action the following holds for The die The die has in hand lt gt Yes makes sound Yes Since number up carries different values in the different sets of effects it has no value in the situation following the action Now suppose a query is passed for number up Its value will be NIL i e nothing but additionally an error message will be given stating that this value is incompatible with the effects of the preceding action If number up is given for instance the value 5 there will no err
42. ire if it is dry and a lighting action is going on The wood is explicitly not on fire if the wood is wet Imagine the following simple case do and next a Start lighting fire do and next a Stop lighting fire Now the on fire slot of The wood will have True in all situations except the first where the value will be unknown Notice that dry will always have a value in contrast to on fire Introducing a pouring action will complicate things somewhat do and next a Start lighting fire do and next a Start pouring water do and next a Stop lighting fire do and next a Stop pouring water In this case the wood is never on fire The same holds if the actions are performed concurrently do a Start lighting fire do and next a Start pouring water do a Stop lighting fire do and next a Stop pouring water 59 Chapter 10 Failed actions and sequences of actions 10 1 Inspiration The introduction of failed actions and sequences of actions has mainly been inspired by San97a The basic idea is that actions may succeed or fail and that this can be used to model sequences of actions where the actions to be performed are not predefined but depend on the outcome of each other More specifically there are two kinds of sequences In the first case the actions in the sequences are performed one by one until either an action fails or there are no more actions to perform In the second case the sto
43. ituations n lt expr gt in any of n prev situations m situations back n lt expr gt failed permit concurrent actions dont permit concurrent actions make situation level lt instances slots gt joined contained situations joining make joining situation lt situations gt lt instancestslots gt unambiguous wrt joined situations 81 Bibliography bkb05 Botany knowledge base project home page http www cs utexas edu users mfkb RKF projects bkb html January 2005 blo05 Blocks example http www cs utexas edu users pclark rkf sadl blocks km January 2005 CPal Peter Clark and Bruce Porter Km the knowledge machine inference engine 2 0 8 CPb Peter Clark and Bruce Porter KM The Knowledge Machine 1 4 0 KM s Situation Mechanism CPc Peter Clark and Bruce Porter KM The Knowledge Machine 2 0 Users Manual Gus01 Joakim Gustafsson Extending temporal action logic April 2001 hal05 Halo project home page http www projecthalo com January 2005 RNO3 Stuart Russell and Peter Norvig Artificial Intelligence A Mod ern Approach Prentice Hall 2003 San97a Erik Sandewall Logic based modelling of goal directed behavior In Electronic Transactions on Artificial Intelligence volume 1 pages 105 128 1997 San97b Erik Sandewall Relating high level and low level action descrip tions in a logic of actions and change 1997 sri05 Sri team home page http
44. ject a Wood del list triple the object of Self dry True add list triple the object of Self dry False 53 The wood has instance of Wood Performing actions of these kinds one after another does not present a problem However suppose a Light fire action and a Pour water action are executed simultaneously new situation do a Light fire with object The wood do and next a Pour water with object The wood Both The wood on fire True and The wood dry False will now hold which is clearly unintuitive A similar problem arises if actions are allowed to have duration i e connect nonadjacent situations and thus possibly partly overlap each other Suppose for instance that a Light fire action is executed and that a Pour water action is then started before the Light fire action has finished i e in a situation between its start and end situations In that case the wood will be on fire in the end situation of the Light fire action and be wet but still on fire in the end situation of the Pour water action This clearly shows that if actions are allowed to be performed simulta neously either between adjacent or nonadjacent situations the interactions between them need to be handled The standard way of modelling actions in KM is to let them directly affect real things in the world For instance Light fire changes the value of the on fire slot One could imagine
45. l normal situations into groups the val ues of the provided instance slot combinations being constant within each group For each group a joining situation is created with the included normal situations being specified in a joined slot The joining situations of a situation level contained in the contained situations slot are thus unambiguous with respect to all the provided instance slot combinations Joining situations are distinguished from normal situations by carrying the value True in the slot joining and differ from the normal ones by not being connected to other situations and thus not affecting slot value computation They can be produced not only as parts of situation levels but also by passing the command make joining situation lt situation1 gt lt situation2 gt lt instance1 gt lt slot1 1 gt lt slot1 2 gt lt instance2 gt lt slot2 1 gt lt slot2 2 gt saa 71 The purpose of creating joining situations in this way is to easily find out what instance slot value relations are common to a set of situations Pass ing the make joining situation command will make the system check which of the instance slot combinations have constant value in the sit uations The joining situation is thus unambiguous with respect to these combinations This is represented in the situation by the slot unambiguous wrt The provided situations are stored in the slot joined situations Since the system
46. laction a f fects instance slot a instance slot A proposition contains instance slot p i s A actions contain proposition del list s p actions contain proposition list type s p is true if and only if at least one of the add or delete lists depending on list type of the actions performed in 47 situation s contains p remove multiple propositions for single valued slots action a f fects instance slot a instance slot and proposition contains instance slot p i s all have intuitive functioning Action performing with check of preconditions is formulated equivalently Recall the FOL formula for postdicted values given in section 4 2 af fected by action instance slot sit used in it should now be interpreted as the instance slot combination being affected by at least one of the actions per formed in situation sit However the FOL formulation of the slot value computation procedure stays the same 8 3 Usage Recall the car example from section 2 2 In this section it is expanded to include an owner of the car represented by the Non Fluent slot owner and a new Fix engine action class Additionally some changes are made to the Remove colour action class The car has owner The owner Fix engine has superclasses Action every Fix engine has object a Car pcs list set triple the object of Self speed 0 triple the object of Self engine broken True ncs list triple
47. luded has been overlooked There might even be a need to introduce new actions joining situations which were earlier regarded as having no action between them In order to satisfy this need changes to action definitions must be allowed to affect instance slot value relations 6 2 IMPLEMENTATION 6 2 Implementation As described in section 2 2 when an action is performed in the original version of KM a new situation connected to the current situation is always created regardless of whether the action has already been performed or not There is no possibility of reperforming actions If one wanted to introduce such a possibility while retaining modelling of multiple possible futures there would be a need to create a new set of redo commands or the like to separate performing actions from reperforming them In the latter case no new next situations would be created However since a starting point for all extensions to KM described in this thesis is to allow each situation to have at most one next situation there is no need to introduce redo commands Instead the existing do commands are used in the new version but work in a somewhat different way In the original version an action is always executed in the current sit uation In the new version however if the action to be performed carries a situation in its before situation slot it is performed in that situation instead In other words actions are performed in their spec
48. ly if the rules do not produce a value Postdiction should never be carried out The reason for this is that slot values should only be fetched from later situations if the actions leading there do not affect the instance slot combinations Since one cannot know whether the value of this kind of slot is the result of actions through application of the rules or observations postdiction must be excluded Since the existing kind of slots do not fit these requirements a new kind of slot has been introduced Rule Based Inertial Fluent e As usual Non Fluent slots are used when the slot values should not vary between situations In FOL notation postdiction is now carried out in the following way POSTDICTED VALUES unify if sv x fluent status slot Inertial Fluent V fluent status slot Rule Based Inertial Fluent A sit xGlobal A next situation sit sit A sit E vis sitA af fected by action instance slot sit A holds in2 slot instance x sit vis sit U sit In order to make it easier to represent actions with delayed effects six new kinds of conditional operators have been introduced 59 in all n prev situations n lt expr gt is true if expr is true in all the n situations preceding the current situation in curr and all n prev situations n lt expr gt works like in all n prev situations except that the current situation is also checked in all n prev situations m situations back n m lt expr gt w
49. must be of the same kind or one of them has to be of a more general kind than the other If unification fails the KM system will report an error and no result will be given In order for the situation mechanism to be included some changes and additions are required The computation of slot values may now be ex pressed in the following way VALUES 2 holds in slot instance x sit unify if svu LOCAL V ALU ES slot Uk m uni fy if su SU BSLOT V ALU ES slot Ur m uni fy if sv IN H ERITED V ALU ES slot Ux m y y PROJECTED V ALUES single valued slot where LOC AL V ALU ES x fluent status slot xNon Fluent own value instance slot x V fluent status slot N on Fluent A own or super situation value instance slot x sit SUBSLOT VALUES 2 subslot slot sub A holds in sub instance x sit INHERITED VALUES alisa instance c A member value c slot x 17 PROJECTED VALUES unify if sv x fluent status slot Inertial Fluent A sit GlobalA prev situation sit sit A holds in slot instance x sit y and single valued slot ANS VALUES A single valued slot A uni fiable VALUES PROJECTED V ALU ES gt ANS VALUES Ukm PROJECTED V ALUES A single valued slot A uni fiable VALUES PROJECTED V ALUES gt ANS VALUES fluent status slot fs is true if and only if the fluent status of the slot is fs own or supersituation value instance slot value sit
50. n for anyone to read to download to print out single copies for your own use and to use it unchanged for any non commercial research and educational purpose Subsequent transfers of copyright cannot revoke this permission All other uses of the document are conditional on the consent of the copyright owner The publisher has taken technical and administrative measures to assure authenticity security and accessibility According to intellectual property law the author has the right to be mentioned when his her work is accessed as described above and to be protected against infringement For additional information about the Link ping University Electronic Press and its procedures for publication and for assurance of document integrity please refer to its WWW home page http www ep liu se Markus Ingevall Link ping 31st March 2005
51. n section 3 1 the original version of KM is not able to detect contradictions between instance slot value relations on the one hand and the effects and preconditions of actions on the other Contradictions related to effects and preconditions arise for four different reasons e The add list contains instance slot value relations which do not hold in the next situation e The delete list contains instance slot value relations which do hold in the next situation e The preconditions list contains instance slot value relations which do not hold in the preceding situation e The negated preconditions list contains instance slot value relations which do hold in the preceding situation As described in section 2 3 slot value computations in KM are only per formed if requested i e when queries are passed either directly from the 5 2 USAGE user or as part of other computations Therefore checking of effects and preconditions should be done in connection to querying In the version of KM resulting from the work done on this thesis con tradictions found during checking of effects and preconditions are handled simply by passing error messages The values of the instance slot combina tion passed to the query are not affected One could imagine changing the values in accordance with the actions in order to eliminate the contradic tions either automatically or after asking the user However suppose that the slot values found by a que
52. n this thesis has been to only take into consideration single world histories Therefore simulation of multiple possible futures as described in the situations manual CPb is excluded 1 3 Reading guidelines The intended reader of this master s thesis is a person interested either in knowledge representation in general or in working with or making changes to KM Chapter 2 describes the original version of KM including its use so far Limitations and extensions are then discussed in chapter 3 The thesis continues by covering the implemented extensions in the subsequent chapters and concludes by summarising the results and discussing future work Chapter 2 Description of KM 2 1 Basics of KM KM The Knowledge Machine is primarily the name of a frame based knowledge representation language developed by Peter Clark and Bruce Porter at the University of Texas at Austin CPc However KM is also used to denote the Lisp implementation of the language The basic unit of representation in KM is a frame which may contain slots Each slot is associated with values which may be atomic or expres sions referring to the same and or other frames The storage of frame slot values relations in the KM system is denoted the knowledge base There are two kinds of frames instances individuals and classes types of in dividuals In order to describe the properties of the members of a class expressions of the following form are used every
53. next command is used only in the case of Remove colour This is because the other action types lack preconditions One could use try do and next to perform them as well but it would never make any difference The first of the following three commands adds the value 90 to the speed slot of The car The second one creates a new situation without performing any action connects to the current one and enters it The third command adds the values Blue and Orange to the colours slot The car has speed 90 next situation The car has colours Blue Orange Section 2 3 uses the above example to explain in what way the system computes slot values 2 3 Querying the knowledge base As mentioned in section 2 1 the command the lt slot gt of lt instance gt returns the value of the slot in the specified instance CPc In KM the 2 3 QUERYING THE KNOWLEDGE BASE function used for handling commands is called km0 CPa It handles com mands by matching them to a list containing command patterns and in structions on how to handle commands of each kind In the case of slot value computation the function km slotvals from kb is called It uses a number of sources to compute the value e Prototypes e Projection e Subslots e Local values values from the current situation and its supersitua tions e Class inheritance The function first adds in values from prototypes However this thesis does not concern it
54. ng way Vs s p a holds in pes list a p s A next situation s s a holds in p s Vs s p a holds in ncs list a p s A next situation s s a holds in p s Vs s p a holds in add list a p s A next situation s s a holds in p s Vs s p a holds in del list a p s A next situation s s a holds in p s holds in prop s denotes that prop holds in situation s and next situation s s a means that s is the next situation of s and that the situations are con nected by action a The above formulas state that the propositions of the preconditions list are made to hold and the propositions of the negated preconditions list are made not to hold This corresponds to performing an action using the KM command do lt action gt However there is a possibility using the try do lt action gt command instead of performing an action only if the propositions of the preconditions list hold and the propositions of the negated preconditions list do not In this case the FOL notation changes into Vs s p1 p2 p3 a next situation s s a A holds in add list a p s A holds in pes list a pa s A holds in ncs list a p3 s A holds in p2 s A holds in p3 s holds in p s Vs s p1 p2 p3 a next situation s s a A holds in del list a p s A holds in pes list a pa s A holds in ncs list a p3 s A holds in p2 s A holds in p3 s gt holds in p1 3 T
55. olour are used An expression of this kind creates an anonymous instance of the specified class an instance which may later be unified with another in stance Self used in for instance the object of Self refers to the object itself in this case the action instance The triple expressions are primarily used in action definitions but can be used separately as well triple lt instance gt lt slot gt lt value gt represents the fact that the slot of the instance carries the specified value However it is not an assertion of the fact To enter the fact into the knowledge base one would write assert triple lt instance gt lt slot gt lt value gt This is equivalent to lt instance gt has lt slot gt lt value gt To enter situation mode the command new situation is passed to KM This creates an anonymous instance of Situation and the system enters it i e it is regarded as the current situation Asserting facts in the new situation is done in the same way as in the global situation One might for instance write The car has colours Red Blue speed 70 13 To perform each of the actions of the example once one could write do and next a Paint with object The car action colours Green try do and next a Remove colour with object The car action colours Red do and next a Repaint with object The car action colours Yellow Purple The try do and
56. only checks the provided instance slot combinations there is a possibility that a joining situation is actually unambiguous with respect to more combinations than the ones included in the unambiguous wrt slot In principle it would be possible to have the make joining situation command check all instance slot combinations in the knowledge base How ever this would give rise to extensive computations and it may be presumed that the user has no or little interest in other instance slot combinations than the ones provided Since joining situations do not affect slot value computation any class could be used to represent them However by using the Situation class make joining situation works without any adjust ment for joining situations as well as normal ones When creating a situation level for a certain set of instance slot com binations for which a situation level already exists the system by default overwrites the old situation level i e changes the values contained in its slots Thus no new instance of the Situation level class is created However the default setting can be changed by using the command dont overwrite situation levels which sets the value of the global variable overwrite situation levels to NIL This causes the system to create new instances of Situation level each time make situation level is passed The value of overwrite situation levels may be changed back to t by using overwrite situation levels 11 2 Usage
57. or message when a query is passed since the value is valid according to the sets of effects However if the value given is instead 7 or any value other than one to six an error message will appear Note that the reason for this is that there is no value present between one and six not that the value is 7 45 Chapter 8 Concurrent actions 8 1 Inspiration In some situations for instance when representing more than one agent one might like to be able to model actions being performed concurrently i e more than one action joining two situations 8 2 Implementation In the new version of KM produced as a result of this thesis concurrency for actions has been implemented by allowing two situations to be connected to each other by more than one action The actions are performed using the same commands as usual When an action is executed the system checks what instance slot combinations are affected by it and searches all concur rent actions for effects on the same instance slot combinations This results in one set of add effects and one set of delete effects together representing everything happening to the instance slot combinations between the two situations The add and delete effects are then checked for contradictions i e if an instance slot value relation occurs in both sets it is removed Additionally if the slot of an instance slot combination is single valued and there is more than one add effect affecting the instance
58. orks like in all n prev situations except that the system starts checking situations m situations back in time in any of n prev situations n lt expr gt checks the same situations as in all n prev situations but returns true if expr is true in any of them in curr or any of n prev situations n lt expr gt works like in any of n prev situations but first checks the current situation in any of n prev situations m situations back n m lt expr gt first moves back m situations 9 3 Usage The fire example presented in section 9 2 is used to illustrate the new way of modelling actions There are now two real kinds of slots and two influence slots on fire has instance of Slot fluent status Rule Based Inertial Fluent cardinality N to 1 dry has instance of Slot fluent status Fluent cardinality N to 1 9 3 USAGE lighting fire has instance of Slot fluent status Inertial Fluent cardinality N to 1 pouring water has instance of Slot fluent status Inertial Fluent cardinality N to 1 There are two kinds of actions a lighting action and a pouring action represented by one start event and one stop event each The instance used for handling the influence slots in the example is called Things going on but this is not a built in name Instead the user may decide how to handle the influence slots Start lighting fire has superclasses Event every
59. p condition is success instead of failure i e the actions are tried until an action succeeds or there are no more actions 10 2 Implementation When failed actions and sequences of actions were first considered for this thesis the approach taken was to introduce a built in slot failed to be used to represent failure of actions However it was later realised that failure 10 3 USAGE and sequences of actions could be modelled without the aid of such a slot in fact without making major changes to the KM code As part of the RKF project mentioned in section 2 5 a new command do plan was introduced in KM This command is not mentioned in the KM manuals but is included in the system A plan to be performed using do plan should always be associated with at least two slots first subevent specifying where to start and subevent containing the possible actions of the plan The subevent slot could actually be named something else but there does not seem to be any point in using a different name Bach action ofthe plan should be associated with a next event slot specifying the next action to be performed The choice of next action to perform may or may not depend on the outcome of a test specified in a next event test slot The do plan command offers a possibility of modelling not only the mentioned two kinds of action sequences but also loops Plans can there fore be used to represent higher level actions consisting of common actions per
60. p is on a table that in a later situation it is no longer there and that no action has been performed to remove the cup from the table In this case KM will draw the conclusion that the cup is on the table in all situations up to the one preceding the situation where the cup is known not to be on the table This is obviously too strong a conclusion to draw In other words KM assumes changes to take place as late as possible performing so called chronological minimization If an instance slot value relation is known to hold in a future situation and no action is known to have been performed making the relation hold then it could be assumed that the relation holds in earlier situations as well However KM is not capable of drawing such conclusions As mentioned in section 2 2 if rules are used in KM and thus ramifi cations are allowed this may give rise to contradictory effects of actions For instance suppose there is a person with dual citizenship of country A and B who has to choose one citizenship at the age of 18 Thus if she is a citizen of country A at the age of 18 then she will no longer be a citizen of country B and vice versa In such a case what is her citizenship at the age of 18 In KM the answer will depend on the modelling and in what order queries are passed The scenario could be set up in the following way age has instance of Slot fluent status Fluent cardinality N to 1 citizen of A has instance o
61. r are usually created by the system at run time while evaluating expressions whose FOL equivalents would include existential quantifiers 4 In contrast to named instances the anonymous ones may be unified with other instances When instances are unified in KM they are asserted to be equal i e they are asserted to refer to the same instance Obviously in order for unification to work the slot values of the instances being unified must not conflict i e must be equal or unifiable and as mentioned named instances may not be unified with each other as they are regarded to be unique To create a named instance of the Banana class defined earlier one might write 2 1 BASICS OF KM The banana has instance of Banana Slots are represented as instances of the built in class Slot and are associ ated with a number of built in slots which specify their properties There are six basic ones domain specifies the most general class es allowed for an instance using the slot range specifies the most general class es allowed for the filler of the slot cardinality can take one of four values 1 to 1 1 to N N to 1 or N to N Their meaning is most easily explained by giving examples of slots having the different kinds of cardinality namely spouse is father of has father and has friends A person can be married to at most one other person A father can have many children but each child only has one father A person can have many
62. rs slot of The car in _Situation5 will now produce an error message stating that the values in this case value found for the instance slot combination are incompatible with the effects of the preceding action _Repaint4 The error message is triggered by the absence of Purple Apart from adding the values Yellow and Purple to the colours slot _Repaint4 removes the value Green present in _Situation3 Therefore a query for the colours of The car in _Situation5 will produce an error message if Green has been added to the colours slot Since the Repaint action is performed using the do and next com mand the contents of the preconditions list are asserted to be true i e the instance slot value relation The car speed 0 is asserted to hold Cor respondingly The car driving True is asserted not to hold Setting the value of driving to True or the value of speed to something other than zero and then passing queries for the slots will result in error messages stating that the found values are incompatible with the preconditions of the next action _Repaint4 37 Chapter 6 Changes to action definitions affecting instance slot value relations 6 1 Inspiration During construction of a knowledge base one might need to make changes to action definitions after the actions have been performed The reason may be either that some parts of the definitions have been found to be wrong or irrelevant or that something that should be inc
63. ry are first checked against the effects of the preceding action Contradictions are found but are eliminated by changing the slot values Next the system checks the preconditions of the next ac tion and discovers contradictions In such a case the latter contradictions could very well have been caused by the changes done to the slot values They could be removed in the same way as the first contradictions but then they could reappear since there actually might be no set of slot values con sistent with both the effects of the preceding action and the preconditions of the next action Therefore the choice has been made to only let the system produce error messages when contradictions are detected and leave it to the user to change the knowledge base manually It should also be pointed out that when contradictions arise it is not obvious whether slot values actions or both should be changed It cannot be expected always to be desirable or necessary for the sys tem to search for contradictions related to the effects and preconditions of actions One might want to be able to switch off the checking mechanism This is done by passing the command dont check effects and pcs The checking mechanism can be switched on again using the command check effects and pcs Non Fluent slots are always excluded from checking of effects and preconditions since their values are global i e do not vary between situations 5 2 Usage Recall the example from sec
64. s introduced It is not covered in the manuals but is explained in chapter 10 Currently KM is being used in the Halo project hal05 whose goal is similar to that of the RKF project Since these projects have not been mainly concerned with reasoning about action and change they have not been a major source of inspiration for this master s thesis In fact nothing has been found indicating that extensions similar to those of this thesis have been made to KM before 21 Chapter 3 Limitations and extensions 3 1 Limitations of KM The KM manual CPc describes some known limitations not having to do with the situation mechanism As mentioned in section 1 2 these are not within the area of interest of this thesis Instead this thesis concerns itself with KM s situation mechanism The situations manual CPb contains a discussion on known limitations of the situation mechanism which include e Chronological minimization e Lack of projection back in time Disjunctive ramifications Modelling of continuous change e The situation action dichotomy As explained in section 2 2 for Inertial Fluent slots KM will search for values in all previous situations the reason for this being that if an instance slot value relation holds in a certain situation then it may be presumed to 3 1 LIMITATIONS OF KM hold in later situations as well provided that it is not contradicted Now suppose that in a certain situation it is known that a cu
65. self with prototypes and they will therefore not be explained further More information can be obtained in CPc The local values are obtained by merging values from the current situa tion and its supersituations in the cases of Fluent and Inertial Fluent slots If the slot is Non Fluent values are fetched only from the global situation The resulting values are unified together if possible and filtered through any constraints found If the slot is single valued and the unifica tion results in more than one value no consistent value can be found and the system therefore produces an error message and deletes all values of the slot in the current situation If the fluent status of the slot is Inertial Fluent and the query is not passed from the global situation the system tries to project values from previous situations or rather makes a kmO request for the value of the slot in the previous situation All previous situations are thus investigated by means of recursion The values found are filtered through any local constraints For each of the slot s subslots values are obtained by calling km0 The subslot values as well as projected values if the slot is multivalued are then unified with the local ones as far as possible Subslot values which cannot be unified with local values are simply added if the slot is multivalued 15 If it is single valued and the unification produces more than one value no consistent value can be found
66. sing the built in slot fluent status which can have one of three values Non Fluent Fluent or Inertial Fluent A Non Fluent slot carries the same value in all situations A Fluent slot has dif ferent values depending on the situation Lastly the value of an Inertial Fluent slot may vary between situations but it persists from one situation to the next if no change affecting the value takes place Note that using fluent status is KM s way of treating the frame problem i e how to ef ficiently represent the fact that in general most things don t change but stay the same from one situation to another The state of the world may change either due to explicit slot value manipulation or as a result of actions An action is an instance of the built in class Action and takes place between two situations The latter situation is created when the action is executed The action is regarded as being instantaneous and thus there is no situation corresponding to the execution of the action Actions are modelled using four lists represented by slots pcs list preconditions list ncs list negated preconditions list add list add list and del list delete list pcs list specifies what must hold for the action to take place and ncs list specifies what must not hold add list contains propositions which become true as a result of the action and del list contains propositions which become false In FOL notation this can be expressed in the followi
67. ted by the action performed in situation sit Note that if the slot is single valued and the projected and postdicted values cannot be unified with VALUES neither projected nor postdicted values are used 4 3 Usage The example from section 2 2 with the addition of the Inertial Fluent slot passengers may be used to show in what way postdiction works Suppose that situation mode is entered and that the next situation com mand is passed before performing a Paint action new situation next situation do and next a Paint with object The car action colours Green At this point the car is asserted to carry two passengers The car has passengers Lisa Kalle There are now three situations named _Situation1 _Situation2 and _Situation4 due to the way KM numbers anonymous instances In _Sit uation4 the car is green and carries the passengers Lisa and Kalle If a query is passed for the passengers slot in _Situationi the system post dicts the values Lisa and Kalle from _Situation4 through _Situa tion2 to _Situation1 On the other hand no value is returned for the colours slot since its value in _Situation4 is a result of the Paint action This reflects the assumption that what is true in a certain situation is true in earlier situations as well provided that no action has made it true 4 3 USAGE 33 Chapter 5 Checking effects and preconditions 5 1 Inspiration and implementation As mentioned i
68. the modelling is the same Note that three of the declared slots are Rule Based Inertial Fluent However they are not used in the way described in chapter 9 The reason for making them Rule Based Inertial Fluent is instead that allowing postdiction causes looping in the case of plans As mentioned in section 10 2 a minor change has been made to KM to allow the parts of a plan to be plans themselves Recall the fire example from section 9 3 It is expanded here to include an empty Continue event class and three plan classes 65 Continue has superclasses Event Light fire plan has superclasses Plan every Light fire plan has object a Wood first subevent the subevent of Self called start lighting subevent a Start lighting fire called start lighting with next event test the on fire of the object of Self True next event args t the subevent of Self called stop lighting args NIL the subevent of Self called continue a Continue called continue with next event test the on fire of the object of Self True next event args t the subevent of Self called stop lighting args NIL the subevent of Self called continue a Stop lighting fire called stop lighting Extinguish fire plan has superclasses Plan every Extinguish fire plan has object a Wood first subevent the subevent of Self called start pouring
69. tion 2 2 It is used here to demonstrate the checking of effects and preconditions After entering situation mode a Paint action is performed which adds Green to the colours slot of The 35 car do and next a Paint with object The car action colours Green The next step is to execute a Repaint action do and next a Repaint with object The car action colours Yellow Purple However Repaint now has a slightly different definition containing precon ditions and negated preconditions lists every Repaint has object a Car action colours a Colour pcs list triple the object of Self speed 0 ncs list triple the object of Self driving True del list triple the object of Self colours the colours of the object of Self add list triple the object of Self colours the action colours of Self The new lists may be regarded as representing the need for the car not to move while being repainted There are now three situations and two actions 5 2 USAGE _Situationi _Paint2 _Situation3 _Repaint4 _Situation5 Now the colours slot of The car is changed to only include Yellow The car now has colours Yellow The now has command has not been explained earlier It sets the value associated with a certain instance slot combination and removes all old values as opposed to the has command which merely adds values A query for the colou
70. tly prohibits the direct effects of actions to be disjoint i e non deterministic has inspired looking into the question of introducing non deterministic direct effects As mentioned in section 3 1 non determinism may occur in the original version of KM due to disjunctive ramifications Handling this kind of non determinism would require extensive computa tions considerably slowing down the system Therefore no effort has been put into it However it is imaginable that there may be a need to represent actions whose effects are partly but not completely known Suppose for in stance that it is known that a six sided die is tossed but that the result of the toss is unknown Even though one cannot say what number turned up it is known that it was either one two three four five or six Thus one of these values should be present in the next situation If it is not an error message is passed The extensions related to concurrent actions and a new way of modelling actions have both been inspired by Gus01 In the original version of KM two situations may be joined by only one action Concurrency is thus not a possibility It has however been introduced in the version resulting from this thesis and is covered in chapter 8 Apart from basic changes to the 3 2 EXTENSIONS system allowing more than action to join two situations requires handling conflicts between actions However actions are performed using the same commands as before Con
71. to action definitions affecting instance slot value relations Non deterministic direct effects Concurrent actions New way of modelling actions Failed actions and sequences of actions Situation levels Table 3 1 Extensions Out 2 P P PS PS In 2 P P PS P4 OS PS 3 2 EXTENSIONS 29 Chapter 4 Postdiction 4 1 Inspiration The idea of introducing postdiction is based mainly on the KM situations manual CPb and more specifically on the limitations described in it which are discussed in section 3 1 4 2 Implementation Recall that when calculating slot values the basic system takes into account values from earlier situations but only if those values are compatible with the values already found for the slot in the case of single valued slots The approach taken here is similar with the addition that postdicted values are also taken into consideration As mentioned in section 3 2 values are fetched from a future situation postdicted if the preceding action does not affect them When introducing postdiction if care had not been taken projection and postdiction could have interacted in such a way that situations would have been visited more than once To avoid this the system has to keep track of which situations have already been checked in the current query Using the notation of section 2 3 the new way of computing slot values can 4 2 IMPLEMENTATION be expressed in the following way
72. uation7 The car has colours Yellow Purple lt gt Blue lt gt Green speed 90 in situation _Situation8 The car has colours Blue Drange The command the has wheels of The car will give the same result True regardless of what situation the system is currently in since has wheels is a Non Fluent slot However that is not the case for colours 19 and speed whose values vary between situations Since speed is a Flu ent slot the system won t fetch values for it in any other situations For instance in _Situation7 the command the speed of The car will return the value 70 whilst it will give NIL i e no value in _Situation In the example _Paint2 an anonymous instance of Paint is exe cuted in _Situation1 producing _Situation3 and adding Green to the colours slot It is followed by _Remove colour4 leading to _Situation5 and adding lt gt Red to the colours slot i e prohibiting the instance slot combination to take the value Red in _Situation5 The last action to be performed is _Repaint6 which removes the present colours Blue and Green and adds the specified Yellow and Purple In the last situation the colours Blue and Orange are added Considering that colours is an Inertial Fluent slot one might wonder why it does not carry the values Yellow and Purple from _Situation7 in _Situation8 The reason is that the underlying principle in KM is never to compute anything
73. used the action is performed only if its preconditions are satisfied In order for changes to action definitions to work properly the fluent status of all slots used must be Non Fluent Otherwise changes made in situations other than the one where the action is performed will have no effect since in that case the changes are made locally in the current situation and not globally as is necessary For instance in the example presented here object and action colours should be Non Fluent Notice that in the above example the add and delete lists are not directly changed only the object and action colours slots There is no point in making direct changes to the add delete preconditions or negated preconditions lists of an action instance because their old values are removed when the action is performed and new values are computed from the action class definition There are two reasons for this Firstly if old values were not removed reperforming changed actions would not produce the desired result Secondly the chosen method ensures that all instances of a certain class for example Paint follow the class definitions and do not behave in an unexpected way Additionally if the definition of a certain action class is changed then when any instance of the class is performed the new definition is used even if the instance was created before the change 6 3 USAGE 41 Chapter 7 Non deterministic direct effects 7 1 Inspiration The
74. used the preconditions are asserted not checked and the system does not change to the new situation created by performing the action Executing a concurrent Remove colour action is done simply by passing the command try do a Remove colour with object The car action colours Green In this case the preconditions are checked rather than asserted Since the car has been painted green and since the preconditions related to the driving and speed slots hold thanks to the Fix engine action all of the preconditions hold and the action is carried out There are now three situations and three actions 8 3 USAGE _Situationi _Paint2 _Situation3 _Fix engine4 _Remove colour6 _Situation5 Passing the command showme The car now produces the following The car has instance of Car owner The owner object of _Paint2 _Fix engine4 _Remove colour6 in situation _Situation3 The car has colours Green driving lt gt True speed 0 engine broken True in situation _Situation5 The car has engine broken lt gt True amp amp False colours lt gt Green Suppose the values of colours driving and speed are changed in _Sit uations The car now has colours Blue Yellow driving True speed 90 Now queries for these slots will produce error messages The values Blue and Yellow are incompatible with _Paint2 and _Remove colour6 whilst
75. w has instance of Colour Green has instance of Colour Purple has instance of Colour Orange has instance of Colour These are followed by the slot declarations has wheels has instance of Slot fluent status Non Fluent speed has instance of Slot fluent status Fluent colours has instance of Slot fluent status Inertial Fluent 11 action colours has instance of Slot fluent status Non Fluent object has instance of Slot fluent status Non Fluent Next three kinds of actions are specified Remove colour has superclasses Action every Remove colour has object a Car action colours a Colour pces list triple the object of Self colours the action colours of Self del list triple the object of Self colours the action colours of Self Paint has superclasses Action every Paint has object a Car action colours a Colour add list triple the object of Self colours the action colours of Self Repaint has superclasses Action 2 2 SITUATION MECHANISM every Repaint has object a Car action colours a Colour del list triple the object of Self colours the colours of the object of Self add list triple the object of Self colours the action colours of Self In these action definitions the expressions a Car and a C

Download Pdf Manuals

image

Related Search

Related Contents

POLIZA DE GARANTIA  LIBRETTO ISTRUZIONI INSTRUCTION BOOKLET  Manual do Usuário    Manuel d`instructions - EVO  Résidence mode d`emploi (spectacle vivant)  Fujitsu AMILO Xi 2550 / T7700  DPC Mode d`emploi  MR-424 パワーヘルメットコム取扱説明書  Irak : « On est à la veille - Observatoire des Pays Arabes  

Copyright © All rights reserved.
Failed to retrieve file