Presentation is loading. Please wait.

Presentation is loading. Please wait.

All rights reserved ©L. Manevitz Lecture 71 Artificial Intelligence Representing Commonsense Knowledge L. Manevitz.

Similar presentations


Presentation on theme: "All rights reserved ©L. Manevitz Lecture 71 Artificial Intelligence Representing Commonsense Knowledge L. Manevitz."— Presentation transcript:

1 All rights reserved ©L. Manevitz Lecture 71 Artificial Intelligence Representing Commonsense Knowledge L. Manevitz

2 All rights reserved ©L. Manevitz Lecture 72 Definitions Representation – a set of syntactic and semantic conventions that make it possible to describe things. Syntax – specifies the symbols that may be used and the ways those symbols may be arranged. Semantics – specifies how meaning is embodied in the symbol arrangements allowed by the syntax.

3 All rights reserved ©L. Manevitz Lecture 73 Semantic Network Approach Nodes and Slots: Nodes are objects, or classes, or properties. Slots are of different types.

4 All rights reserved ©L. Manevitz Lecture 74 A Semantic Network MammalPersonNosePee-Wee-ReeseBlueBrooklyn-Dodgers Is-a has-part instance team uniform- color

5 All rights reserved ©L. Manevitz Lecture 75 Representing Nonbinary Predicates Unary Predicates can be rewritten as binary ones. man(Marcus) could be rewritten as instance(Marcus,Man)

6 All rights reserved ©L. Manevitz Lecture 76 Representing Nonbinary Predicates cont. N-Place Predicates score(Cubs,Dodgers,5-3) becomes GameG235-3DodgersCubs Is-a score home-team visiting- team

7 All rights reserved ©L. Manevitz Lecture 77 A Semantic Net Representing a Sentence John gave the book to Mary. GiveEV7BK23MaryJohn object beneficiary agent instance Book instance

8 All rights reserved ©L. Manevitz Lecture 78 Some Important Distinctions First try: Second try: John72 height JohnH1 height BillH2 height greater-than

9 All rights reserved ©L. Manevitz Lecture 79 Some Important Distinctions cont. Third try: 72 value JohnH1 height BillH2 height greater-than

10 All rights reserved ©L. Manevitz Lecture 710 Partitioned Semantic Nets BitebmDogsd Is-a victimassailant Mail-carrier Is-a a)The dog bit the mail carrier.

11 All rights reserved ©L. Manevitz Lecture 711 Partitioned Semantic Nets cont. b)Every dog has bitten a mail carrier. BitebmDogsd Is-a victimassailant Mail-carrier Is-a gGS Is-a form SA S1

12 All rights reserved ©L. Manevitz Lecture 712 Partitioned Semantic Nets cont. c)Every dog in town has bitten the constable. BitebcTown-Dogsd Is-a victimassailant Constables Is-a gGS Is-a form Dogs SA S1

13 All rights reserved ©L. Manevitz Lecture 713 Partitioned Semantic Nets cont. d)Every dog has bitten every mail carrier. Bitebmd Is-a victimassailant Mail-carrier Is-a gGS Is-a form Dogs SA S1

14 All rights reserved ©L. Manevitz Lecture 714 Inheritance Is-a slot – appears between objects and classes. ako slot – appears between subsets.

15 All rights reserved ©L. Manevitz Lecture 715 Inheritance -Procedure F the given node; S the given slot; 1.Form a Queue of F and all class nodes connected to F via Is-A node. F is at top of Queue. 2.Until Queue is empty or default has been found determine if the first element of Queue has a value in its S slot: a.Yes – a value has been found. b.No – remove the first element from Queue and add the nodes related to the first element by AKO slots to the end of Queue. 3.If a value has been found say that this is the default value of Fs S slot. Otherwise announce Failure.

16 All rights reserved ©L. Manevitz Lecture 716 Inheritance - Example Is-a shape ako BlockBrickBrick12rectangular Is-a ako WedgeWedge18 shape Triangular

17 All rights reserved ©L. Manevitz Lecture 717 If-needed Inheritance -Procedure F the given node; S the given slot; 1.Form a Queue of F and all class nodes connected to F via Is-A node. F is at top of Queue. 2.Until Queue is empty or successful if-needed procedure has been found determine if the first element of Queue has a procedure in the If-Needed facet of its S slot: a.Yes – if the procedure produces a value than a value has been found. b.No – remove the first element from Queue and add the nodes related to the first element by AKO slots to the end of Queue. 3.If a value has been found say that the value found is the value of Fs S slot. Otherwise announce Failure.

18 All rights reserved ©L. Manevitz Lecture 718 If-needed Inheritance - Example Weight (if-needed) BlockBrickBrick12 Block-weight- procedure 40011 Volume Density

19 All rights reserved ©L. Manevitz Lecture 719 Example cont. Weight BlockBrickBrick1240011 Volume Density 4400 Weight is activated by request for the weight of Brick12 !

20 All rights reserved ©L. Manevitz Lecture 720 Default Inheritance Procedure F the given node; S the given slot; 1.Form a Queue of F and all class nodes connected to F via Is-A node. F is at top of Queue. 2.Until Queue is empty or default has been found determine if the first element of Queue has a value in the Default facet of its S slot: a.Yes – if the first element has a value than a value has been found. b.No – remove the first element from Queue and add the nodes related to the first element by AKO slots to the end of Queue. 3.If a value has been found say that the value found is the default value of Fs S slot. Otherwise announce Failure.

21 All rights reserved ©L. Manevitz Lecture 721 Default Inheritance - Example Is-a Color (Default) ako BlockBrickBrick12Red Is-a ako WedgeWedge18 Color (Default) Blue Has no default color therefore probably Blue because of Blocks default color !

22 All rights reserved ©L. Manevitz Lecture 722 Perspective -Example Is-a Purpose SupportBrickStructure Is-a PlayCommemorateToy shape rectangular Gift perspective Toy perspective Structure perspective Brick12 Purpose Is-a Gift Purpose Is-a

23 All rights reserved ©L. Manevitz Lecture 723 Special Links - Summary IS-A and AKO links make class membership and subclass-class relations explicit, facilitating the movement of knowledge from one level to another. VALUE facets make values explicit.

24 All rights reserved ©L. Manevitz Lecture 724 Special Links – Summary cont. IF-NEEDED facets make procedures purposes explicit, and they relate procedures to the classes those procedures are relevant to. DEFAULT facets make likely values explicit without implying certainty. Perspectives make context sensitivity explicit, preventing confusion and ambiguity.

25 All rights reserved ©L. Manevitz Lecture 725 Frames Frames : A collection of nodes that describe a stereotyped object, act or event. Example : newspaper report.

26 All rights reserved ©L. Manevitz Lecture 726 Earthquake Example Disaster-eventEarthquake FloodHurricane Event Killed Injured Homeless Damage Magnitude Fault Crest River Wind-speed Name Place Day Time Social-eventBirthday-party Number-of- guests Host Age Birthday- person

27 All rights reserved ©L. Manevitz Lecture 727 Earthquake Example cont. Earthquake Hits Lower Slabovia Today an extremely serious earthquake of magnitude 8.5 hit Lower Slabovia killing 25 people and causing $500,000,000 in damage. The president of Lower Slabovia said the hard-hit area near the Sadie Hawkins fault has been a danger zone for years.

28 All rights reserved ©L. Manevitz Lecture 728 Earthquake Example cont. Earthquake13 place Lower SlaboviaToday25500,000,0008.5 day fatalities damage magnitude fault Sadie Hawkins

29 All rights reserved ©L. Manevitz Lecture 729 Earthquake Summary Pattern An earthquake occurred in value in location slot value in day slot. There were value in fatalities slot fatalities and value in damage slot in property damage. The magnitude was value in magnitude slot on the Richter scale, and the fault involved was the value in fault slot.

30 All rights reserved ©L. Manevitz Lecture 730 Instantiated Earthquake Summary Pattern An earthquake occurred in Lower Slabovia today. There were 25 fatalities and $500 million in property damage. The magnitude was 8.5 on the Richter scale, and the fault involved was the Sadie Hawkins.

31 All rights reserved ©L. Manevitz Lecture 731 Earthquake Example cont. Earthquake Study Stopped Today, the President of Lower Slabovia killed 25 proposals totaling $500 million for research in earthquake prediction. Our Lower Slabovian correspondent calculates that 8.5 research proposals are rejected for every one approved. There are rumors that the Presidents science advisor, Sadie Hawkins, is at fault.

32 All rights reserved ©L. Manevitz Lecture 732 Earthquake Example cont. The Earthquake Study Stopped story could be summarized, naively, as though it were the story about an actual earthquake, producing the same frame as the Earthquake Hits Lower Slabovia story does.

33 All rights reserved ©L. Manevitz Lecture 733 Scripts

34 All rights reserved ©L. Manevitz Lecture 734 Scripts Example - Restaurant script. Script: Restaurant Roles: S=Customer Track: Coffee Shop W=Waiter Props: Tables C=Cook Menu M=Cashier F=Food O=Owner Check Money

35 All rights reserved ©L. Manevitz Lecture 735 Restaurant Example cont. Entry conditions : S is hungry S has money Results : S has less money O has more money S is not hungry S is pleased (optional)

36 All rights reserved ©L. Manevitz Lecture 736 Restaurant Example cont. Scene 1: Entering S PTRANS S into restaurant S ATTEND eyes to tables S MBUILD where to sit S PTRANS S to table S MOVE S to sitting position

37 All rights reserved ©L. Manevitz Lecture 737 Restaurant Example cont. Scene 2: Ordering (menu on table)(W brings menu)(S asks for menu) S PTRANS menu to SS MTRANS signal to W S MTRANS need menu to W W PTRANS W to table W PTRANS W to menu W PTRANS W to table W ATRANS menu to S S MTRANS W to table *S MBUILD choice of F S MTRANS signal to W W PTRANS W to table S MTRANS I want F to W W PTRANS W to C W MTRANS (ATRANS) to C C DO (prepare F script) to Scene 3 C MTRANS no F to W W PTRANS W to S W MTRANS no F to S (go back to *) or (go to Scene 4 at no pay path)

38 All rights reserved ©L. Manevitz Lecture 738 Restaurant Example cont. Scene 3 : Eating C ATRANS F to W W ATRANS F to S S INGEST F (Option : Return to Scene 2 to order more; otherwise go to Scene 4)

39 All rights reserved ©L. Manevitz Lecture 739 Restaurant Example cont. Scene 4 : Exiting S MTRANS to W W PTRANS W to S W MOVE (write check) (W ATRANS check to S) W ATRANS check to S S ATRANS tip to W S PTRANS S to M S ATRANS money to M S PTRANS S to out of restaurant (No pay path)


Download ppt "All rights reserved ©L. Manevitz Lecture 71 Artificial Intelligence Representing Commonsense Knowledge L. Manevitz."

Similar presentations


Ads by Google