Download presentation
Presentation is loading. Please wait.
1
Knowledge Representation
Unit II Knowledge Representation
2
rule-based system In computer science, a rule-based system is a set of "if-then" statements that uses a set of assertions, to which rules on how to act upon those assertions are created. Rule-based systems are also used in AI (artificial intelligence) programming and systems.
3
What are Expert Systems?
The expert systems are the computer applications developed to solve complex problems in a particular domain, at the level of extra-ordinary human intelligence and expertise. In software development, rule-based systems can be used to create software that will provide an answer to a problem in place of a human expert. These type of system may also be called an expert system.
4
Characteristics of Expert Systems
High performance Understandable Reliable Highly responsive
5
Capabilities of Expert Systems
Advising Instructing and assisting human in decision making Demonstrating Deriving a solution Diagnosing Explaining Interpreting input Predicting results Justifying the conclusion Suggesting alternative options to a problem
6
They are incapable of − Substituting human decision makers Possessing human capabilities Producing accurate output for inadequate knowledge base Refining their own knowledge
7
Components of Expert Systems
The components of ES include − Knowledge Base Inference Engine User Interface Working Memory Conflict Resolution
8
Knowledge Base What is Knowledge?
The data is collection of facts. The information is organized as data and facts about the task domain. Data, information, and past experience combined together are termed as knowledge.
9
Knowledge Base are of two types:
Rule Memory: contains rules which correlates figures and values with facts. Fact memory: contains factual data and values
10
Components of Knowledge Base
The knowledge base of an ES is a store of both, factual and heuristic knowledge. Factual Knowledge − It is the information widely accepted by the Knowledge Engineers and scholars in the task domain. Heuristic Knowledge − It is about practice, accurate judgement, one’s ability of evaluation, and guessing.
11
Knowledge representation
It is the method used to organize and formalize the knowledge in the knowledge base. It is in the form of IF-THEN-ELSE rules. Knowledge Acquisition The success of any expert system majorly depends on the quality, completeness, and accuracy of the information stored in the knowledge base. The knowledge base is formed by readings from various experts, scholars, and the Knowledge Engineers. The knowledge engineer is a person with the qualities of empathy, quick learning, and case analyzing skills.
12
Inference Engine Use of efficient procedures and rules by the Inference Engine is essential in deducting a correct, flawless solution. In case of knowledge-based ES, the Inference Engine acquires and manipulates the knowledge from the knowledge base to arrive at a particular solution. In case of rule based ES, it − Applies rules repeatedly to the facts, which are obtained from earlier rule application. Adds new knowledge into the knowledge base if required. Resolves rules conflict when multiple rules are applicable to a particular case.
13
To recommend a solution, the Inference Engine uses the following strategies −
Forward Chaining Backward Chaining
14
Forward Chaining It is a strategy of an expert system to answer the question, “What can happen next?” Here, the Inference Engine follows the chain of conditions and derivations and finally deduces the outcome. It considers all the facts and rules, and sorts them before concluding to a solution. This strategy is followed for working on conclusion, result, or effect. For example, prediction of share market status as an effect of changes in interest rates.
16
Backward Chaining With this strategy, an expert system finds out the answer to the question, “Why this happened?” On the basis of what has already happened, the Inference Engine tries to find out which conditions could have happened in the past for this result. This strategy is followed for finding out cause or reason. For example, diagnosis of blood cancer in humans.
18
Conflict Resolution When more than one rule unify with the known facts, then the control function must determine which rule to fire. The process of selecting a particular rule from the set of conflicts rule is known as conflict resolution. There are various strategies for this are available as follows:
19
Rule assigned property: Assign the priority such as -100(least priority) to 100(highest priority)
Complexity: most complex will fired first Recency: every element will be tagged with the number indicating how recent the data is. Random selection: rules which have an equal priority Specificity: specific rules are preferred to general ones because rules fires after many conditions are found confirmed Refactory: it prevents the system to fire the same rule with same instantiation again and again Control mechanism: Forward and Backward Chaining
20
Advantages of RBS Simplicity Uniformity Independent Modularity
Independence of information and control
21
Disadvantages of RBS Inefficiency Methodology and Structure
Illustration and explanation
22
Expert Systems Limitations
No technology can offer easy and complete solution. Large systems are costly, require significant development time, and computer resources. ESs have their limitations which include − Limitations of the technology Difficult knowledge acquisition ES are difficult to maintain High development costs
35
Type of Rules Text Book
36
Inference in a Semantic Net
the notion that spreading activation out of two nodes and finding their intersection finds relationships among objects.
37
Basic inference mechanism: follow links between nodes.
Two methods to do this: Intersection search-- the notion that spreading activation out of two nodes and finding their intersection finds relationships among objects. This is achieved by assigning a special tag to each visited node. Many advantages including entity-based organization and fast parallel implementation. However very structured questions need highly structured networks.
38
Inheritance-- the isa and instance representation provide a mechanism to implement this.
Inheritance also provides a means of dealing with default reasoning. E.g. we could represent: Emus are birds. Typically birds fly and have wings. Emus run.
39
in the following Semantic net:
Semantic Network for a Default Reasoning
40
In making certain inferences we will also need to distinguish between the link that defines a new entity and holds its value and the other kind of link that relates two existing entities. Consider the example shown where the height of two people is depicted and we also wish to compare them.
41
We need extra nodes for the concept as well as its value
42
Special procedures are needed to process these nodes, but without this distinction the analysis would be very limited.
43
Features Semantic Distance: The closeness of the concepts is measured by the number of nodes between the ‘concept node’. The lesser the number of nodes between the two concepts nodes, the concepts in semantic, the more will be they closer to each other. Multiple Inheritance Scoping: If a statement S is true for values of a variable V, then it is said that S is scope of V partitioned nets.
44
Disadvantages Nodes connected to super node should be independent of each other. For example, such as birds, the nodes originating from birds are not independent there is interrelationship among the objects or nodes.
45
WHAT ARE FRAMES? Natural language understanding requires inference i.e., assumptions about what is typically true of the objects or situations under consideration. Such information can be coded in structures known as frames. Frames provide a convenient structure for representing objects that are typical to a stereotypical situations. The situations to represent may be visual scenes, structure of complex physical objects, etc. Frames are also useful for representing commonsense knowledge. As frames allow nodes to have structures they can be regarded as three-dimensional representations of knowledge.
46
A frame is similar to a record structure and corresponding to the fields and values are slots and slot fillers. Basically it is a group of slots and fillers that defines a stereotypical object. A single frame is not much useful. Frame systems usually have collection of frames connected to each other. Value of an attribute of one frame may be another frame.
47
A frame for a book is given below.
Slots Fillers publisher Thomson title Expert Systems author Giarratano edition Third year 1998 pages 600
48
The above example is simple one but most of the frames are complex
The above example is simple one but most of the frames are complex. Moreover with filler slots and inheritance provided by frames powerful knowledge representation systems can be built. Frames can represent either generic or frame. Following is the example for generic frame.
49
Slot Fillers name computer specialization_of a_kind_of machine types (desktop, laptop,mainframe,super) if-added: Procedure ADD_COMPUTER speed default: faster if-needed: Procedure FIND_SPEED location (home,office,mobile) under_warranty (yes, no)
50
Properties Nested Structure: loop within the loop like frame within frame. Building is one frame and room may be taken as another frame. Values: Values may be constrained. Height of a man cannot exceed 18 ft. weight not more than 300 kg.. Default Values: If building is frame then door, rooms, are default values.
51
Conceptual Graphs Conceptual graphs (CGs) are a system of logic based on the existential graphs and the semantic networks of artificial intelligence. They express meaning in a form that is logically precise, humanly readable, and computationally tractable. With their direct mapping to language, conceptual graphs serve as an intermediate language for translating computer-oriented formalisms to and from natural languages. With their graphic representation, they serve as a readable, but formal design and specification language. CGs have been implemented in a variety of projects for information retrieval, database design, expert systems, and natural language processing.
52
Figure 5.1: CG display form for John is going to Boston by bus.
53
Figure 5.7: CG display form for If a cat is on a mat, then it is a happy pet.
54
Convert FOPL to CG
55
Conceptual Dependency
Conceptual Dependency originally developed to represent knowledge acquired from natural language input. The goals of this theory are: To help in the drawing of inference(conclusion) from sentences. To be independent of the words used in the original input. That is to say: For any 2 (or more) sentences that are identical in meaning there should be only one representation of that meaning.
56
It has been used by many programs that portend to understand English.
CD provides: a structure into which nodes representing information can be placed a specific set of primitives at a given level of granularity. Sentences are represented as a series of diagrams depicting actions using both abstract and real physical situations. The agent and the objects are represented The actions are built up from a set of primitive acts which can be modified by tense.
57
Examples of Primitive Acts are:
ATRANS-- Transfer of an abstract relationship. e.g. give. PTRANS-- Transfer of the physical location of an object. e.g. go. PROPEL-- Application of a physical force to an object. e.g. push. MTRANS-- Transfer of mental information. e.g. tell. MBUILD-- Construct new information from old. e.g. decide. SPEAK-- Utter a sound. e.g. say.
58
ATTEND-- Focus a sense on a stimulus. e.g. listen, watch.
MOVE-- Movement of a body part by owner. e.g. punch, kick. GRASP-- Actor grasping an object. e.g. clutch. INGEST-- Actor ingesting an object. e.g. eat. EXPEL-- Actor getting rid of an object from body. e.g. ????.
59
Six primitive conceptual categories provide building blocks which are the set of allowable dependencies in the concepts in a sentence: PP-- Real world objects. ACT-- Real world actions. PA-- Attributes of objects. AA-- Attributes of actions. T-- Times. LOC-- Locations.
60
John gives Mary a book Arrows indicate the direction of dependency. Letters above indicate certain relationships: o-- object. R-- recipient-donor. I-- instrument e.g. eat with a spoon. D-- destination e.g. going home.
61
Double arrows () indicate two-way links between the actor (PP) and action (ACT).
he use of tense and mood in describing events is extremely important and schank introduced the following modifiers: p– past f– future t-- transition-- start transition-- finished transition k-- continuing?-- interrogative/-- negative delta– timeless c– conditional : the absence of any modifier implies the present tense.
62
John gave Mary a book becomes:
The has an object (actor), PP and action, ACT. I.e. PP ACT. The triple arrow () is also a two link but between an object, PP, and its attribute, PA. I.e. PP PA.
63
Advantages of CD: Using these primitives involves fewer inference rules. Many inference rules are already represented in CD structure. The holes in the initial structure help to focus on the points still to be established.
64
Disadvantages of CD: Knowledge must be decomposed into fairly low level primitives. Impossible or difficult to find correct set of primitives. A lot of inference may still be required. Representations can be complex even for relatively simple actions. Consider: Dave bet Frank five pounds that Wales would win the Rugby World Cup. Complex representations require a lot of storage
65
Applications of CD: MARGIE(Meaning Analysis, Response Generation and Inference on English) -- model natural language understanding. SAM(Script Applier Mechanism) -- Scripts to understand stories. PAM(Plan Applier Mechanism) -- Scripts to understand stories
66
Scripts A script is a structure that prescribes a set of circumstances which could be expected to follow on from one another. It is similar to a thought sequence or a chain of situations which could be anticipated. It could be considered to consist of a number of slots or frames but with more specialised roles. Scripts are beneficial because: Events tend to occur in known runs or patterns. Causal relationships between events exist. Entry conditions exist which allow an event to take place Prerequisites exist upon events taking place. E.g. when a student progresses through a degree scheme or when a purchaser buys a house.
67
The components of a script include:
Entry Conditions-- these must be satisfied before events in the script can occur. Results-- Conditions that will be true after events in script occur. Props-- Slots representing objects involved in events. Roles-- Persons involved in the events. Track-- Variations on the script. Different tracks may share components of the same script. Scenes-- The sequence of events that occur. Events are represented in conceptual dependency form.
68
Scripts are useful in describing certain situations such as robbing a bank. This might involve:
Getting a gun. Hold up a bank. Escape with the money.
69
Here the Props might be Gun, G. Loot, L. Bag, B Get away car, C.
70
The Roles might be: Robber, S. Cashier, M. Bank Manager, O. Policeman, P.
71
The Entry Conditions might be:
S is poor. S is destitute.
72
The Results might be: S has more money. O is angry. M is in a state of shock. P is shot.
73
There are 3 scenes: obtaining the gun, robbing the bank and the getaway.
The full Script could be described as follow:
76
Advantages of Scripts:
Ability to predict events. A single coherent interpretation may be build up from a collection of observations.
77
Disadvantages: Less general than frames.
May not be suitable to represent all kinds of knowledge.
78
Develop Script Develop a script model of the model: shopping in a supermarket, going to restaurant
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.