1 / 10

Frame-Based Representation

CLASS FRAME. INSTANCE FRAME. Frame Name. Frame Name. Bird. Tweety. Properties. Properties. Frame-Based Representation. Frame : stereotypical knowledge knowledge of some concept. Frames. Hold Structure and Behavior of a class of objects/concepts Structure

badru
Download Presentation

Frame-Based Representation

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. CLASS FRAME INSTANCE FRAME Frame Name Frame Name Bird Tweety Properties Properties Frame-Based Representation Frame: stereotypical knowledge knowledge of some concept.

  2. Frames • Hold Structure and Behavior of a class of objects/concepts • Structure properties/data/attributes • Behavior methods, rules defining how instances of the class typically behave • Generic structure and behavior defines at class level is specified in instances

  3. Birds Canaries Sparrows Robins Bird1 Bird2 Bird3 Bird4 Bird5 Bird6 Inheritance • Structural and behavioral properties are inherited • from super-class to sub-classes • subclasses automatically carry the structure an behavior of super-class • exception handling (birds fly, but penguins do not) • multiple inheritance

  4. class Bird color eats flies ... class Pet name veterinarian ... class Person age weight ... class Employee phone# salary ... class PetBird color eats flies name veterinarian talks ... Instance Jack age weight phone# salary Multiple Inheritance

  5. Facets • Facets provide further information on a property/attribute • define constraints on property value (data type, range of values, etc.) • how to obtain a value for a property (IF-NEEDED method) • what to do if a value changes (IF-CHANGED method)

  6. Properties and Facets: Example Object name: Refrigerator Class: Home Appliances - Initialize - from Database - from Procedure - Expert Rules - User specified - by Inheritance - Message passing from other objects

  7. Communication between objects IF-CHANGED methods Defrost Timer Refrigerator Heating Coil

  8. Rule Interaction with Objects • Frame properties as data IF Humans.Legs = 2 IF Jack.Legs=2 THEN humans can walk THEN Jack can walk • Modifying a property value IF Jack likes to swim THEN Jacks.Sports = swimming • Creating a new instance IF Lucy is mad at Jack because he doesn’t like hiking THEN MAKE Frame Bob Instance-of Humans WITH Sports = Hiking • Deleting a frame IF Lucy is really mad at Jack THEN RETRACT Frame Jack

  9. Humans Bob Jack Lucy

  10. ?xx denotes variable Frame ?x instance-of Humans WITH Residence = Pittsburgh WITH Age = ?Age IF Frame ?x instance-of Humans WITH Residence = Pittsburgh WITH Age = ?Age THEN Frame ?x WITH Age = ?Age + 5 IF Frame ?person1 WITH Sex = Male WITH Sports = ?sports1 AND Frame ?person2 WITH Sex = Female WITH Sports = ?sports1 THEN Frame ?person1 WITH Likes = ?person2 Pattern Matching

More Related