1 / 19

Events

Events. Events are abstractions. They represent time related objects in space and time. Events can be treated as similar to ”ordinary” objects, but when we talk about events, we use different wordings than for non temporal objects. The following paralells exist:.

vala
Télécharger la présentation

Events

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Events Events are abstractions. They represent time related objects in space and time. Events can be treated as similar to ”ordinary” objects, but when we talk about events, we use different wordings than for non temporal objects. The following paralells exist: SubEvent(BattleOf Britain,WorldWarII) Partof(BattleOfBritain,WorldWarII) Period(BattleOf Britain)= [1940,1942]. Has(BattleOfBritain,period,[1940,1942]) Duration(Period(BattleOf Britain))=Years(2) Has(BattleOf Britain,Duration,2). Note that time intervals can be regarded as special form of event. SubEvent(BattleOf Britain, [1940,1942]).

  2. Categorization of Events Like any other sort of objects, events can be grouped into categories. For example, WorldWarII belongs to the category Wars. To say that a Civil war occurred in England in the 1640s, we could say ako(event,thing). haveatt(event,period,interval). ako(war,event). haveatt(war,location,place). ako(civilwar,war). isa(w1,civilwars). has( w1,period,[1640,1649]). has(w1,location,england).

  3. Event Examples We can add arguments to event description to create more specific categories. To say that Shankar flew from New York to New Dehli yesterday, we could write ako(flyevent,event). haveatt(flyevent,passenger,agent). haveatt(flyevent,source,place). haveatt(flyevent,destination,place). ako(fly(shankar,newyork,newdehli),flyevent). isa(e1, fly(shankar,newyork,newdehli)). has(e1,period,yesterday). A short notation for all this is E(fly(shankar,newyork,newdehli),yesterday). If we use a slightly different notation, we get close to a verbal expression do(fly(shankar,newyork,newdehli),yesterday).

  4. Event objects and event categories In the previous example, it was tempting to let fly(shankar,newdelhi,newyork) be an event instead of an event category. ’isa(fly(shankar,newyork,newdehli),flyevent).’ ’has(fly(shankar,newyork,newdehli),period,yesterday).’ There are reasons to avoid this however because if Shankar flew from New York to New Delhi several times there would be no way to distinguish the the different times from the same expression fly(shankar,newyork,newdehli). However, there is a way of making a definition E(c,i)  e ec  SubEvent(e,i) E(fly(shankar,newyork,newdehli),yesterday). If we replace E by do, we we get closer to a verbal expression do(fly(shankar,newyork,newdehli),yesterday). Shankar did (at least once) yesterday fly from New York to New Delhi.

  5. Shopping Event Examples In the shopping world, we can talk about shopping events. Yesterday, John went to the North Berkely Safeway supermarket and bought two pound of tomatoes and a pound of ground beef. We could give properties to buying event like this ako(buyingevent,event). haveatt(buyingevent,buyer,person). haveatt(buyingevent,purchase,bunchofgoods). haveatt(buyingevent,amount,money).

  6. Shopping event cont’d A concrete shopping event can now be identified isa(e1,buyingevent). has(e1,buyer,john). has(e1,time,yesterday). has(e1,bunchofgoods,sometomatoesandbeef). We can also connect a verbal expression to a buyingevent do(buy(john, sometomatoesandbeef),yesterday). as isa(E,buyingevent), has(e1,buyer,john), has(e1,bunchofgoods,sometomatoesandbeef), has(e1,time,yesterday).

  7. Processes The events so far are what we call discrete events. However, the category or set of events denoted Flying(Shankar) is actually made up of several subevents which are all members of Flying(Shankar) . Categories of events with this property is called process categories. One metapredicate T(c,i) expresses that a process c is going on throughout an interval i. T(Working(Stuart),ToDayLunchHour).

  8. Time Intervals Time is important for agents, and we shall look at two types: Moments and Intervals. Intervals have a Start, an End and a duration. Moments are special cases of Intervals with no duration, and Start = End. J. Allen was a pioneer in systematization of interval structures:

  9. Relations between time intervals (13 relations ) j before(i,j) i equal(i,j) | equal(j,i) after(i,j)

  10. Predicates on time intervals There are 13 different relations (considering symmetries) i Meet(i,j) Before(i,j) After(j,i) During(i,j) Overlap(i,j) Overlap(j,i) Ends(i,j) Equals(i,j) Starts(i,j) j i j i j i i j j i i j j

  11. Event Calculus Event Calculus is a formalism for reasoning about events, times and actions. Event calculus reifies fluents and events. A complete set of predicates for one version of event calculus is: Holdsat(f,t) Fluent f is true at time t (”T(f,t)”) Happens(e,i) Event e happens over time interval i Initiates(e,f,t) Event e causes fluent f to start to hold at time t Terminates(e,f,t) Event e causes fluent f to cease to hold at time t Clipped(f,i) Fluent f ceases to be true during interval i Restored(f,i) Fluent f becomes true sometime during interval i

  12. EC scenario %% Tower Of Hanoi narration holdsat(on(a,b),sk(0)). holdsat(clear(a),sk(0)). holdsat(on(b,c)) ,sk(0)).. holdsat(on(c,p1),sk(0)). holdsat(clear(p2),sk(0)). holdsat(clear(p3),sk(0)). happens(begin,sk(0)). happens(move(a,p3), sk(1)). happens(move(b,p2), sk(2)). happens(move(a,b), sk(3)). happens(move(c,p3), sk(4)). happens(move(a,p1), sk(5)). happens(move(b,c), sk(6)). happens(move(a,b), sk(7)). happens(end,sk(10)). %% Sample run run:- happens(end,T), holdsat(on(X,Y),T), ans(on(X,Y)). | ?- run. on(c,p3) ; on(b,c) ; on(a,b);

  13. EC Scenario axioms % Box world axioms initiates(move(X,Y),on(X,Y),E1) :- holdsat(clear(X),E1), holdsat(clear(Y),E1), diff(X,Y), diff(X,table). initiates(move(X,Y),clear(Z),E1) :- holdsat(clear(X),E1), holdsat(clear(Y),E1), diff(X,Y), holdsat(on(X,Z),E1), diff(Y,Z). % terminates(move(X,Y),clear(Y),E1):- holdsat(clear(X),E1), holdsat(clear(Y),E1), diff(X,Y), diff(X,table). terminates(move(X,Y),on(X,Z),E1):- holdsat(clear(X),E1), holdsat(clear(Y),E1), diff(X,Y), holdsat(on(X,Z),E1), diff(Y,Z).

  14. Mental Events and Mental Objects Agents so far may have beliefs and can deduce new beliefs. Yet none of them has any knowledge about beliefs and about deduction. The objects of beliefs are called mental objects. So we have relationships between agents and mental objects, called propositional attitudes. The most important relationships between an agent A and a mental object P are Believes(A,P) Knows(A,P) Wants(A,P) Says(A,P) The representation of mental objects has the form of a proposition. Turning a proposition into an object is called reification. Example: Believes(Lois,Fly(Superman)).

  15. Referential Transparency and Opacity There is a problem with propositional attitudes. As we but not Lois knows, Clark = Superman But the following inference does not hold Clark=Superman  Believes(Lois,Fly(Superman)) Believes(Lois,Fly(Clark)) Technically, the property of being able to substitute a term freely is called referential transparency. If not, the situation is referentially opaque.

  16. Axioms of knowledge and belief Some definitions: Knowledge is true belief Knows(A,P) <=> Believes(A,P)  P From that follows that Knows(A,P) => P Knows(A,P) => Believes(A,P) If P is a tautology (|=P) then Knows(A,P) Know whether is defined by KnowsWhether(A,P) <=> Knows(A,P)  Knows(A,P).

  17. Axioms of knowledge and belief (cont) More funwithaxiomsofknowledge and belief The followingapplies for Believes as well Logical agents can do simple reasoning (Modus Ponens) Knows(A,P) Knows(A,P =>Q) => Knows(A,Q) Logical agents can handle conjuntions Knows(A,P) Knows(A,Q) <=> Knows(A,P  Q) Logical agents can make resolutioninference, e.g. Knows(A,P ) Knows(A ,P,Q) => Knows(A,Q)

  18. Three wise mens problem The two wise mens problem is a simplified version of the Three wise mens problem. Here is a version that is simplified to illustrate inference in modal logic. Two persons, A and B get a spot on their forehead. They can see each other's spot, but not their own. They are told that the colour of the spot is either black or white, and that at least one of them is white. The rule of the game is that as soon as one of them knows that he has a white spot, he shall announce it. Actually, both have got a white spot. After a period of time, A says: I have a white spot! How did he know that?

  19. Exercise Do exercise 12.5 in R&N: AIMA. You may use the book, chapter 12 as the basis. Try to answer the challenges stated in items (a) – (f). You may use the treatise in this handout and program examples on the repository as an inspiration. Ideally you should be able to make a runnable system for some of the tasks, but that is not a requirement. You are not required to to fill out details that are not explicitly asked for.

More Related