Presentation is loading. Please wait.

Presentation is loading. Please wait.

FT228/4 Knowledge Based Decision Support Systems Frame-Based Expert Systems Ref: Artificial Intelligence A Guide to Intelligent Systems, Michael Negnevitsky.

Similar presentations

Presentation on theme: "FT228/4 Knowledge Based Decision Support Systems Frame-Based Expert Systems Ref: Artificial Intelligence A Guide to Intelligent Systems, Michael Negnevitsky."— Presentation transcript:

1 FT228/4 Knowledge Based Decision Support Systems Frame-Based Expert Systems Ref: Artificial Intelligence A Guide to Intelligent Systems, Michael Negnevitsky – Aungier St. Call No

2 Knowledge Representation In building a knowledge base, the programmer must select the significant objects and relations in the domain and map these into formal language The resulting program must contain sufficient knowledge to solve the problem of the domain, it must make correct inferences and it must do so quickly We can consider a knowledge base as a mapping between objects and relations in a problem domain and the computational objects and relations in a program The results of inferences on the knowledge base should correspond to the results of actions or observations in the world The computational objects, relations and inferences are determined by the knowledge representation language the programmer selects.

3 Knowledge Representation General principles and issues Class hierarchies are found in both scientific and common sense classification schemes How do we provide a general mechanism for representing them? How may we represent definitions? How may we represent exceptions? When should a knowledge based system make default assumptions about missing information, and how should it adjust its reasoning if these assumptions prove wrong? How may we best represent time? How may we best represent causality? How may we best represent uncertainty?

4 Knowledge Representation Medium of representation is the language Scheme is how we use the language Classification of schemes Logical representation schemes: Use expressions in formal logic to represent a knowledge base. Inference rules and proof procedures apply this knowledge to problem instances Procedural representation schemes: Knowledge represented as a set of instructions for solving a problem. In a rule based system, an if…then may be seen as a procedure for solving a goal in a problem domain, by solving the premises in order.

5 Knowledge Representation Classification of schemes (contd.) Network representation schemes: Network representations capture knowledge as a graph in which the nodes represent objects or concepts in the problem domain and the arcs represent relations or associations between them Structured representation schemes: Extension of networks by allowing each node to be a complex data structures consisting of slots with attached values. These values may be simple numeric or symbolic data, pointers to other frames or even procedures for performing a particular task.

6 Issues in Knowledge Representation Most of the issues in knowledge representation are motivated by the effort to program a computer to understand natural languages such as English. Issues raised: Exactly what things can be represented by the objects and relations in the language. E.g. if a predicate relates an object to a value, such as hascolour(car,red) how can that be used to represent Johns car is redder than Marys. What level of complexity is required for our objects. How do we distinguish between intensional and extensional knowledge? The intension determines what a concept means at an abstract level (ball is round). The extension is the set of all things denoted by the object (set of all balls). A database denotes the extension of the object, whereas an expert system includes the intension of the object.

7 Issues in Knowledge Representation Issues raised (contd.): How do we represent meta-knowledge, or knowledge about the objects and structures of the representation language itself? This type of knowledge helps us represent things such as George believes thaty Tom knows that Marys car is red How do we represent into class hierarchies, use inheritance, excpetions, overriding, overloading, default values etc.

8 Frames Thinking always begins with suggestive but imperfect plans and images; these are progressively replaced by better–but usually still imperfect–ideas

9 What is a frame ? Minsky 1975 : When one encounters a new situation (or makes a substantial change in ones view of a problem) one selects from memory a structure called a frame. This is a remembered framework to be adapted to fit reality by changing details as necessary

10 What is a frame ? Complex unit that represent situations or objects in our domain of interest Data structure with typical knowledge about a particular object or concept Proposed by Marvin Minsky in 1970s Used to capture and represent knowledge in frame-based expert systems

11 Example John kicked the ball John Person Male 64 Ball Round White Black spots

12 Frame Examples Quantas Boarding Pass Carrier: Quantas Name: Mr. Black Flight: Q 101 Date: 12 Dec Seat: 24A From: Melbourne To: Sydney Boarding: 0600 Gate: 4 Air New Zealand Boarding Pass Carrier: Air New Zealand Name: Mr. White Flight: NZ 101 Date: 13 Dec Seat: 25A From: Melbourne To: Christchurch Boarding: 1800 Gate: 7

13 Frames Has a name A set of attributes or slots associated with it E.g. Frame Boarding Pass has attributes Carrier, Name, Flight, Date,Seat,From, To, Boarding,Gate Each slot has a value associated with it Slot may have a procedure associated with it to determine its value Slot may be a pointer to another frame or set of rules

14 Frames Rule Based systems may work with facts scattered through the knowledge base May have to search through knowledge that is not relevant Search may be slow

15 Slots Frame is a collection of slots. May include information such as Frame name Relationship of frame to other frames E.g. frame DELL Laptop may be member of class Computer which may belong to class Hardware Slot Value Can be symbolic, numeric or Boolean. Can be assigned when the frame is created or during an expert system session Default Slot Value Taken to be true when no evidence to contrary is found. Range of Slot Value Determines where a particular object or concept complies with the stereotype requirements Procedural Information Procedure executed when the slot is changed or needed

16 Facets A facet is a means of providing extended knowledge about an attribute of a frame Used to establish the attribute value, control end-user queries and tell the inference engine how to process the attribute Value facet Specify default and initial values Prompt facet Enable the end-user to enter the attribute online Inference facet Allow us to stop the inference process when a value of a specified attribute changes

17 Classes and Instances Frame may refer to a particular object or a group of similar objects Class-frame describes a group of objects with common attributes Instance-frame refers to a particular instance of an object Each frame knows its class Implicit property of the frame

18 Class and Instance Example INSTANCE: Quantas Boarding Pass Carrier: Quantas Name: Mr. Black Flight: Q 101 Date: 12 Dec Seat: 24A From: Melbourne To: Sydney Boarding: 0600 Gate: 4 INSTANCE: Air New Zealand Boarding Pass Carrier: Air New Zealand Name: Mr. White Flight: NZ 101 Date: 13 Dec Seat: 25A From: Melbourne To: Christchurch Boarding: 1800 Gate: 7 CLASS: Boarding Pass Carrier: [Str] Name: [Str] Flight: [Str] Date: [Str] Seat: [Str] From: [Str] To: [Str] Boarding: [Num] Gate: [Num]

19 Class Inheritance Attributes of a class-frame represent things that are typically true for all objects in the class Slots and default values of a class frame are inherited across the class/sub-class and class/member hierarchy. Slots in instance-frames can be filled with actual data uniquely specified for each instance

20 Relationships among classes Subclass is related to its superclass by an is- a relation An instance-frame can overwrite some of the typical attribute values in the hierarchy The instance-frame remains a member of the class with access to properties further up the hierarchy even if it violates the typical value in its class Relationships in such a hierarchy constitute a process of specialisation Frame at the top of the hierarchy represents some generic concept, frames further down represent more restricted concepts

21 Relationships among objects Generalisation denotes a-kind-of or is-a relationship. E.g. car is a vehicle, boat is a vehicle Aggregation denotes a part-of or part- whole relationship in which subclasses representing components are associated with a superclass representing a whole. E.g. an engine is part of a car Association describes some semantic relationship between different classes unrelated otherwise. Usually appear as verbs and are bi-directional. E.g. Mr. Black owns a house, Mr. Black owns a car, John kicked a ball

22 More about inheritance Inheritance is the process by which all characteristics of a class-frame are assumed by an instance frame. Instance-frame inherits from its parent- frame. Can have multiple inheritance All parents must have unique attribute names Means code reuse Reduces number of independent and specific features of an expert system

23 Disadvantages Cannot distinguish between essential properties and accidental properties May become impossible to construct composite concepts when using multiple inheritance Leave the knowledge engineer with difficult decisions to make about the hierarchical structure of the systems and its inheritance paths

24 Methods and Demons A method is a procedure associated with a frame attribute that is executed whenever requested Method can determine an attributes specific value or execute a series of actions when the value changes A demon generally has an IF-THEN structure Executed when attribute in IF statement changes Two types of method WHEN CHANGED Executed immediately when an attribute value changes WHEN NEEDED Used to obtain attribute value only when needed

25 Interaction of Rules and Frames – Inference Engine Rule-Based Expert System Inference engine links rules in knowledge base with data in database When goal is set up, inference engine searches knowledge base to find rule with that goal in its consequent If it finds such a rule and if part matches data in database, rule is fired and goal obtains its value. If no such rule found, the queries user for value

26 Inference Engine Frame-Based System Inference engine also searches for goal Rules play auxiliary role. Frames represent major source of knowledge. Methods and demons used to add actions to frames. Goal can be established either in method or demon.

27 Inference engine Frame-based system Based on goal, inference engine finds rules whose consequents find goal of interest Examines these rules one at a time in order they appear in the rule base Examines the validity of each antecedent in the first rule This may require the If all antecedents are valid, concludes the goal If any of the antecedents are invalid, concludes goal is invalid and will proceed to next rule

28 Inference engine Has to obtain value from WHEN NEEDED method only when it has not been determined from rule base Search order for attribute value has to be determined first Attach a SEARCH ORDER facet to an attribute to indicate where and in what order to obtain attribute value E.g. set the order so that it first searches the rule base and only when this fails executes when needed

29 Rule-Based Expert Systems Set of rules represents the domain knowledge useful for problem solving. Each rule captures some heuristic of the problem. Each rule adds some new knowledge and thus makes the system smarter. Rule base can be easily modified by changing, adding and subtracting rules.

30 Frame-based Expert Systems Overall hierarchical structure of knowledge is decided first. Classes and attributes are identified. Hierarchical relationship between frames are established. Architecture allows us to add actions to the frames through methods and demons.

31 Building Frame-based Expert System Specify the problem and define the scope of the system Determine the classes and their attributes Define instances. Design displays. Define WHEN CHANGED and WHEN NEEDED methods, and demons. Define rules. Evaluate and expand the system.

Download ppt "FT228/4 Knowledge Based Decision Support Systems Frame-Based Expert Systems Ref: Artificial Intelligence A Guide to Intelligent Systems, Michael Negnevitsky."

Similar presentations

Ads by Google