INTRODUCTION One common methods used for representing knowledge



























- Slides: 27
INTRODUCTION One common methods used for representing knowledge in an expert systems. � How a FB experts system uses frames combined with techniques borrowed from OOP to create powerful tool for addressing complex problems. � Developing a FB system � Collection of related objects that describe the problem. �
OVERVIEW The motivation for current work in FB expert systems has its roots in earlier human problemsolving studies by cognitive psychologists. � Bartlett (1932) � Schema : is a unit of knowledge that contains info. About some concept automobile � Following this idea Minsky propose Frame (1975) � Frame : is a data structure for encoding in a computer typical info. On some concept. �
OVERVIEW (CONT. ) Frame = Name + Slots + Values + Procedures � Object Oriented Programming � CONCEPT INSTANCE Car Date : Your Car UNKWON Date : 1957 Make : UNKWON Make : Chevy Color UNKWON Color Red Wheels 4 Starting Procedure 1
FRAME-BASED SYSTEMS A computer program that process problemspecific information contained in working memory with a set of frames contained in the knowledge base, using an inference engine to infer new information. � FB Systems ≡ RB Systems � Relationships between frames is expressed by childto-parent distinction �
FRAME WORLD OF HUMANS Names Class Human s Properties(slots) Values Facets Subclass Men Jack Instance s Women Bob Rules Kathy Lucy Goal agenda
ANATOMY OF A CLASS � A collection of objects that share some common properties. Class name Humans Sub class Men, Women Properties Age Unknown Number of legs 2 Residence Unknown Life expectancy 72 Class of Humans
ANATOMY OF A SUBCLASS Subclasses are classes that represent subset of higher level classes. � Three kind of relationship among classes and subclasses. � Generalization Kind of… � Aggregation Part of… � Association Semantic… �
ANATOMY OF A SUBCLASS (CONT. ) � Generalization Vehicl e Kind of Cars Plane Boat
ANATOMY OF A SUBCLASS (CONT. ) � Aggregation Car Part of Door Engin e Batter y
ANATOMY OF A SUBCLASS (CONT. ) � Association I own Semantic Cars House s Asset s
ANATOMY OF A SUBCLASS (CONT. ) Procedures store in Facet � We can add more properties � Class name men Sub class Properties Age Unknown Number of legs 2 Residence Unknown Mustache Unknown Class of men
ANATOMY OF INSTANCE � A specific object from a class of objects. Object name Jack Class men Properties Age 40 Number of legs 1 Residence Pittsburg Mustache True Object jack
ANATOMY OF PROPERTIES The properties used in frames describe the major features or att. Of concept or object. � Properties = Form a set of object-attribute-values � Property values = Data assign to a given property � Values = Numeric, symbolic, boolean. � Another feature facets
ANATOMY OF PROPERTIES (CONT. ) Object name Refrigerator Class Home appliances Properties Age 10 Service No. 123 -1990 Location Pittsburg Condition Good Power Electricity Volume 16 Refrigerator Object
… � Inheritance � � Exception handling � � Process by which the characteristics of parent frame are assume by its child frame Don’t forget … Multiple inheritance � Jack is instance of Men & jack is instance of Employee
FACETS Extended knowledge about a frame’s property. � Facet extend the info. In � Type � Default � Documentation � Constraint � Minimum cardinality � Maximum cardinality � If needed � If changed �
SENSOR OBJECT WITH FACETS Object name Sensor 1 Class Temperature sensors Property Reading Unknown Facets Min cardinality 1 Type Numeric If-Needed Data acquisition If changed Change display Obj. Property Location Pump 1 Facets Min cardinality 1 Max cardinality 1 If-Needed Location Image Constraint Pump 1, Pump 2, Pump 3
… � Methods � � Encapsulation � � A procedure attached to an object, that will be executed whenever requested (if needed, if changed) Hiding of information (use w/o worrying about opration ) Communication between objects One Obj. use another one when if needed or changed (For example refrigerator + defrost timer + heating coil) � Message passing �
MESSAGE PASSING � A signal to an object to which the object responds by executing a method. Ask a request from your friend. � Draw message to a circle obj. � Sometimes named handler. � According to shell Send, Sendmsg, Send. Message. � � (Send message-name object-name arguments)
EXAMPLE OF MESSAGE-PASSING Bobs--Car Age method Args (year) Year 20 1970 1990 messag e 1990 Jacks--Car Age method Args (year) Year 1980 10
… � Inheriting behavior Bobs-car. year � Writing general methods � � Self. property � name to self, object’s property to property. Rule interaction with objects � Frame properties as Data If Humans. Legs=2 Then Humans can walk If Jack. Legs =2 Then Jack can walk
… Modifying a property value � IF jack likes to swim THEN Jack. Sports=Swimming � Creating a New Instance � � � IF Lucy is mad at jack because he doesn’t like walking THEN MAKE Frame BOB Instance of Humans WITH Sports=walking Delete an instance � IF Lucy is really mad at Jack THEN RETRACT Frame JACK
USING RULES WITH VARIABLES � Pattern matching Frame � ? X Instance of Humans WITH Residence=Pittsburg WITH Age= ? Age Using matches in rule’s conclusion Frame ? X Instance of Humans WITH Residence=Pittsburg WITH Age= ? Age THEN Age= ? Age +5
USING RULES WITH VARIABLES (CONT. ) � Complex variable Matching IF AND THEN Frame ? person 1 WITH Sex=Male WITH Sports = ? Sports 1 Frame ? Person 2 WITH Sex=Female WITH Sports=? Sports 1 Frame ? Person 1 WITH Likes=? Person 2
QUESTION… ?
r o f s k n a h T u o y n o i t a r e d i s n o c