ec02092d70b4c4274e87f910bf107c84.ppt
- Количество слайдов: 38
Chapter 2 Knowledge Representation 知識表示法 2. 知識表示法 S. S. Tseng & G. J Hwang
2. 1 The meaning of Knowledge(知識) • Knowledge(知識) + Inference (推論)= Expert Systems(專家系統) • Affect the development, efficiency, speed, and maintenance of expert systems • Epistemology(認識論): concerned with the nature, structure, and origin of knowledge • A priori comes from the Latin and means “That which precedes” Epistemology Philosophic Theories (哲學) ARISTOTLE PLATO LOCKE MILL A Priori Knowledge (定理) E. g. All triangles have 180 degrees (considered to be universally true) A posteriori Knowledge (經驗法則) E. g. the light is green • A posteriori knowledge can be verified using sense experience 2. 知識表示法 S. S. Tseng & G. J Hwang 2
Classifications of knowledge(知識) • Procedural Knowledge(程序性知識) How to do something • Declarative Knowledge(陳述性知識) The truth of something “Don’t put your fingers in a pot of boiling water” • Tacit Knowledge(隱含知識) (Unconscious Knowledge) Cannot be expressed explicitly -An example is how to move your hand -Walking or riding a bicycle -ANS is related to tacit knowledge 2. 知識表示法 S. S. Tseng & G. J Hwang 3
Analogy to Wirth’s classic expression • Algorithms + data structures = programs • Knowledge + Inference = expert systems 2. 知識表示法 S. S. Tseng & G. J Hwang 4
Levels Meta Knowledge (rules about rules) Knowledge Information Data (rules+facts) (facts) Noise 2. 知識表示法 S. S. Tseng & G. J Hwang 5
The sequence of 12 numbers: 137178007124 Without knowledge. This entire sequence may appear to be noise. Rule 1:IF Rain THEN Bring Raincoat Rule 2:IF Rain THEN Bring Umbrella Meta Rule 1:Try Rule 2 First Meta Rule 2:IF Ride a motorcycle THEN Try Rule 1 First Meta knowledge is knowledge about knowledge and expertise. -would specify which knowledge base was applicable. 2. 知識表示法 S. S. Tseng & G. J Hwang 6
Representation(表示法) • Backus-Naur Form • Ontology(本體論) • Semantic Network(語意網路) • Frames-based Knowledge(框架式知識) • Case-based Knowledge(案例式知識) • Rule-based Knowledge(規則式知識) • Knowledge Object(知識物件) • Logic(邏輯) 2. 知識表示法 S. S. Tseng & G. J Hwang 7
2. 2 Backus-Naur Form ( BNF ) • This notation is a meta language for defining the syntax of a language • Define the syntax of a language e. g. <sentence>: : = <subject><verb><end-mark> <subject>: : = I | You|We <verb> : : = left |came <end-mark> : : =. | ? |! • Parse Tree (derivation tree) sentence subject end-mark You 2. 知識表示法 verb came ? S. S. Tseng & G. J Hwang 8
2. 3 Ontology(本體論) • Ontology一詞在 90年代就開始被使用在人 智 慧領域,描述知識的知識構成要素之間的關係。 • Ontology的研究大致上可略為分為兩個方向: – 針對特定的問題領域建立大量的Ontology • 例如:建立某些領域詞彙的Ontology – 研究Ontology的建構方法與表示方法 • 例如:利用XML(可延伸標記語言)或 是RDF(資源描述格式) 2. 知識表示法 S. S. Tseng & G. J Hwang 9
• Ontology的發展主要是用來使知識分享和再用 更為容易。 • 不同的研究對於Ontology的表示與描述有不同 的方法,目前還未看到較一般化、通用的表示 法。 • 範例:使用RDF來描述適性化教材的Ontology 2. 知識表示法 S. S. Tseng & G. J Hwang 10
2. 4 Semantic Network(語意網路) (Quillian 67 & 68) • A classic AI representation technique used for propositional (命題) information is sometimes called Propositional Net • A proposition is a statement that is either TRUE or FALSE • A directed graph(有向圖形) • Node(點) : 知識的組成元素或是種類 • Arc(有向線段) : 知識組成元素間的關 • 「is a」 • 「a kind of」 2. 知識表示法 S. S. Tseng & G. J Hwang 11
General Net San Francisco Chicago New York Indianapolis Los Angeles Houston 2. 知識表示法 S. S. Tseng & G. J Hwang 12
A Semantic Net(語意網路) sister-of Carol wife-of Ann husbandof Mother-of Father. Motherof wife-of of Susan Mother-of husbandof David wife-of husbandfather-of of Tom father-of John 2. 知識表示法 S. S. Tseng & G. J Hwang 13
「is a」 and 「a kind of」 • 「is a」 : 在Tail(有向線段尾段)所表示的知識物件屬於 Head(有向線段頭段)的知識類別中的一個例子。 • 「a kind of」 : 在Tail(有向線段尾段)的知識類別屬Head(有 向線段頭段)所表示的知識類別。 • Superclass(父類別) and Subclass(子類別) • Attribute, Value, Property • Inheritance(繼承) 2. 知識表示法 S. S. Tseng & G. J Hwang 14
aircraft AKO round has-shape AKO Propeller driven balloon jet AKO ellipsoidal has-shape blimp AKO special AKO DC-3 AKO DC-9 is a Spirit of St. Louis Concorde is a Goodyear Blimp AKO Air Force 1 A Semantic Network with 「is a」 and 「a kind of」(AKO) Links 2. 知識表示法 S. S. Tseng & G. J Hwang 15
2. 5 PROLOG and Semantic Nets(語意網路) • Essentials of PROLOG Each of the following statements is a PROLOG predicate expression, or simply a predicate. Color(red). ; red is a color father_of(Tom, John). ; Tom is the father of John mother_of(Susan, John). ; Susan is the mother of John parents(Tom, Susan, John). ; Tom and Susan are parents of John 2. 知識表示法 S. S. Tseng & G. J Hwang 16
Predicates can also be expressed with relations such as the IS-A and HAS-A. is_a (red, color). has_a (John, father). has_a (John, mother). has_a (John, parents). Some additional predicates is_a (Tom, father). is_a (Susan, mother). is_a (Tom, parent). is_a (Susan, parent). 2. 知識表示法 S. S. Tseng & G. J Hwang 17
Programs in PROLOG consist of facts and rules in the general form of goals. p: -p 1, p 2…pn. In which p is the rule’s head and the pi’s are the subgoals. The symbol, : -, is interpreted as an IF. parent (x, y) : - father (x, y). parent (x, y) : - mother(x, y). grandparent(x, y) : - parent(x, z), parent(z, y). and an ancestor can be defined as: (1) ancestor(x, y) : - parent(x, y). (2) ancestor(x, y) : - ancestor(x, z), ancestor(z, y). 2. 知識表示法 S. S. Tseng & G. J Hwang 18
Predicate Database (Rules and Facts) Queries Answers Interpreter User General Organization of a PROLOG System 2. 知識表示法 S. S. Tseng & G. J Hwang 19
Facts: parent (Ann, Mary). parent (Ann, Susan). parent (Mary, Bob). parent (Susan, John). As another example, suppose the query is : -ancestor(Ann, John). The first ancestor rule(1) matches and X is set to Ann and Y is set to John. PROLOG now tries to match the body of (1), parent (Ann, John), with every parent statement. 2. 知識表示法 S. S. Tseng & G. J Hwang 20
Rule (1) is not true since its IF part cannot be true. Because Rule (1) cannot be true, PROLOG then tries the second ancestor statement. For Rule (2), ancestor(x, y) is TRUE of ancestor(x, z) & ancestor(z, y) are both TRUE. ; By setting X to Ann and Y to John, the problems become whether the expression ancestor(John, z) & ancestor(z, Ann) is TRUE. Control structure of PROLOG is of the Markov algorithm type, in which searching for pattern matching is normally determined by the order in which the Horn clauses are entered. 2. 知識表示法 S. S. Tseng & G. J Hwang 21
2. 6 Schema (plural schemas or schematas) • A semantic net(語意網路) is an example of a shallow knowledge(淺層知識) structure. • A general term to describe a complex knowledge structure • Focus on only relevant knowledge • For examples: FRAME, SCRIPT 2. 知識表示法 S. S. Tseng & G. J Hwang 22
2. 7 Frames-based Knowledge(框架式知識) • Suitable for related knowledge about a narrow subject with much default knowledge • script-a time-ordered sequence of frames • Slot: Attribute Slot Value: Attribute Value • Example a car frame 2. 知識表示法 S. S. Tseng & G. J Hwang 23
Slot value • Some frame-based tools (e. g. KEE) allow a wide range of items to be stored in slots • an assigned value. a default value • Rules. graphics • Comments. debugging information • questions for users. function • procedural attachment. to other frame 2. 知識表示法 S. S. Tseng & G. J Hwang 24
Procedural Attachment • If – needed, if-added, if-removed • Examples:Human Property 2. 知識表示法 S. S. Tseng & G. J Hwang 25
Hierarchy 2. 知識表示法 S. S. Tseng & G. J Hwang 26
• FRAMES Monthly Meeting School meeting A KIND OF Weekly Meeting Occasional Meeting IF-ADDED: inform the participants IF-REMOVED: inform the participants IS A IF-ADDED: inform the person IF-REMOVED: inform the person IF-CHANGED: . . . 2. 知識表示法 S. S. Tseng & G. J Hwang 27
Difficulties with FRAMES • Stereotype is that it have well defined features so that many of its slots have default values name elephant specialization of a-kind-of mammal color gray legs 4 trunk a cylinder • Most frame systems do not provide a way to assist defining frame structure and slots • Nothing can be really certain in such a unrestrained system 2. 知識表示法 S. S. Tseng & G. J Hwang 28
Script C(customer), S(salesperson) 1. C enters L M(merchandise), D(dollars) L(a store) 2. C begins looking around C looks for a specific M 4. C looks for any interesting M C asks S for help 6. 8. C fails to find M 7. C finds M’ C leaves L 10. C buys M’ 11. C leaves L 12. goto step 2 13. C leaves L 2. 知識表示法 14. C takes M’ S. S. Tseng & G. J Hwang 29
Did Mary buy anything? Mary went shopping for a new coat. She found a new one. She really liked When she got it home, and discovered that it went perfectly with her favorite dress. Question:Did Mary buy anything? 2. 知識表示法 S. S. Tseng & G. J Hwang 30
2. 8 Case-based Knowledge (案例式知識) • 通常是用來描述屬於經驗的知識 • 從過去的經驗中,判定是何種相似的case(案 例),並且依據過去解決此問題的方法,來解 決此次問題 案例名稱 • Case(案例) : 屬性 1 …… S. S. Tseng & G. J Hwang 屬性值 …… 屬性N 2. 知識表示法 屬性值 屬性 2 • 案例名稱 • 屬性值 屬性值 31
利用Case-based Knowledge(案例式知識) 建構Expert System(專家系統) • • Case Retrieve(案例擷取) Case Reuse(案例再用) Case Revise(案例修正) Case Retain(案例更新) 2. 知識表示法 S. S. Tseng & G. J Hwang 32
案例推論循環 2. 知識表示法 S. S. Tseng & G. J Hwang 33
2. 9 Rule-based Knowledge (規則式知識) • 知識領域具備需要推論的特性 – 例如:醫生依據其所學的醫學知識及病人所呈現的 症狀去判別所罹患的疾病 • 最基本的Rules(規則)形式 如果 「狀態」 則 「結論」 IF (condition) THEN (conclusion) • Inference Chaining(推論鏈) – Forward Inference(前向推論) – Backward Inference(後向推論) 2. 知識表示法 S. S. Tseng & G. J Hwang 34
2. 10 Knowledge Object (知識物件) • Object Oriented(物件導向) – Class(類別) and Object(物件) – Super-class(父類別) and Sub-class(子類別) – Inheritance(繼承)、Encapsulation(封裝)、 Polymorphism(多型) • Knowledge Object(知識物件) – Object-Attribute-Value Triples ( OAV ) (物件-屬性-屬性值法) – 物件導向規則庫管理系統 – Knowledge Object Model(知識物件模型) 2. 知識表示法 S. S. Tseng & G. J Hwang 35
Object-Attribute-Value Triples ( OAV ) (物件-屬性-屬性值法) • OAV can be used to characterizes all the knowledge( 知識) in a semantic net(語意網路) and was used in MYCIN for diagnosing infections diseases • Especially useful for representing facts(事實) • for only a single object: only attribute-value pairs (AV) 2. 知識表示法 S. S. Tseng & G. J Hwang 36
Object-Attribute-Value Triples(物件-屬性-屬性值法) Car Wheel: 4 Function: run Object Attribute Door: 3. . . AKO Value AKO Door: 4. . . AKO Carry: people size: small Carry: goods size: big AKO Civic R 9 price: $$$ is a year: 1988 owner: gjh 2. 知識表示法 ‧‧‧‧‧‧ price: $$$ ‧‧‧‧‧‧ is a year: 1992 owner: crt S. S. Tseng & G. J Hwang 37
Limitations • Lack of standard names for links and nodes(點) • Combinatorial explosion of searching nodes(點) • Logically inadequate no “for all”, “there exist”. . . • Heuristically inadequate no effective search heuristics 2. 知識表示法 S. S. Tseng & G. J Hwang 38
ec02092d70b4c4274e87f910bf107c84.ppt