Knowledge Representation http www um ac irkahani Knowledge

  • Slides: 83
Download presentation
Knowledge Representation ﺩﻛﺘﺮﻣﺤﺴﻦ ﻛﺎﻫﺎﻧﻲ http: //www. um. ac. ir/~kahani/

Knowledge Representation ﺩﻛﺘﺮﻣﺤﺴﻦ ﻛﺎﻫﺎﻧﻲ http: //www. um. ac. ir/~kahani/

Knowledge and its Meaning Epistemology u Types of Knowledge u Knowledge Pyramid u ﺩﻛﺘﺮ

Knowledge and its Meaning Epistemology u Types of Knowledge u Knowledge Pyramid u ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Epistemology u the science of knowledge EPISTEMOLOGY ( Gr. episteme, "knowledge"; logos, "theory"), branch

Epistemology u the science of knowledge EPISTEMOLOGY ( Gr. episteme, "knowledge"; logos, "theory"), branch of philosophy concerned with theory of knowledge. The main problems with which epistemology is concerned are the definition of knowledge and related concepts, the sources and criteria of knowledge, the kinds of knowledge possible and the degree to which each is certain, and the exact relation between the one who knows and the object known. ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Knowledge Definitions knowlaedge 'n. S-lij n [ME knowlege, fr. knowlechen to acknowledge, irreg. fr.

Knowledge Definitions knowlaedge 'n. S-lij n [ME knowlege, fr. knowlechen to acknowledge, irreg. fr. knowen ] (14 c) 1 obs : cognizance 2 a (1) : the fact or condition of knowing something with familiarity gained through experience or association (2) : acquaintance with or understanding of a science, art, or technique b (1) : the fact or condition of being aware of something (2) : the range of one's information or understanding <answered to the best of my 4> c : the circumstance or condition of apprehending truth or fact through reasoning : cognition d : the fact or condition of having information or of being learned <a man of unusual 4> 3 archaic : sexual intercourse 4 a : the sum of what is known : the body of truth, information, and principles acquired by mankind b archaic : a branch of learning syn knowledge, learning, erudition, scholarship mean what is or can be known by an individual or by mankind. knowledge applies to facts or ideas acquired by study, investigation, observation, or experience <rich in the knowledge of human nature>. learning applies to knowledge acquired esp. through formal, often advanced, schooling <a book that demonstrates vast learning >. erudition strongly implies the acquiring of profound, recondite, or bookish learning <an erudition unusual even in a scholar>. scholarship implies the possession of learning characteristic of the advanced scholar in a specialized field of study or investigation <a work of first-rate literary scholarship >. ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ [Merriam-Webster, 1994]

Types of Knowledge § a priori knowledge § § § a posteriori knowledge §

Types of Knowledge § a priori knowledge § § § a posteriori knowledge § § § knowing how to do something declarative knowledge § § knowledge verifiable through the senses may not always be reliable procedural knowledge § § comes before knowledge perceived through senses considered to be universally true knowing that something is true or false tacit knowledge § knowledge not easily expressed by language ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Knowledge in Expert Systems Conventional Programming Algorithms + Data Structures = Programs Knowledge-Based Systems

Knowledge in Expert Systems Conventional Programming Algorithms + Data Structures = Programs Knowledge-Based Systems Knowledge + Inference = Expert System ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Review of Knowledge Representation Criteria § Definition of Knowledge Representation: A formalism for representing

Review of Knowledge Representation Criteria § Definition of Knowledge Representation: A formalism for representing in a computer, facts and other kinds of knowledge about a subject or specialty such that these facts and knowledge can be used in reasoning. ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Criteria of Adequacy: Metaphysical Adequacy § § The representation scheme cannot contradict the actual,

Criteria of Adequacy: Metaphysical Adequacy § § The representation scheme cannot contradict the actual, real world circumstance, either by ignoring certain things that actually happen or by allowing things to happen that do not. An expert system is a representation of the real world, therefore it must reflect the real world. ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Epistemic Adequacy § The K. R. scheme must be able to represent facts, usually

Epistemic Adequacy § The K. R. scheme must be able to represent facts, usually about individuals and their relations and attributes. ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Heuristic Adequacy § The K. R. scheme must be able to express the reasoning

Heuristic Adequacy § The K. R. scheme must be able to express the reasoning used to solve a problem. Probably the most difficult of these criteria to meet. ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Computational Tractability § The K. R. scheme must be able to manipulate the representation

Computational Tractability § The K. R. scheme must be able to manipulate the representation using a computer system. ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Expressiveness § § These criteria are "nice", but not necessary. Adequacy criteria are necessary

Expressiveness § § These criteria are "nice", but not necessary. Adequacy criteria are necessary ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Clarity § § Can humans understand what is being said as well as the

Clarity § § Can humans understand what is being said as well as the computer? Can take this further: we would like the use of the KR to increase or clarify our knowledge of the domain. ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Uniformity § § Able to handle all types of knowledge we need to represent

Uniformity § § Able to handle all types of knowledge we need to represent in a uniform fashion. Difficult to represent every type of knowledge (heuristic vs fact, etc) in a different manner. ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Notational convenience § § does the knowledge fit the representation? is the developer comfortable

Notational convenience § § does the knowledge fit the representation? is the developer comfortable with the representation scheme? ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Declarativeness § § not procedural, "processing" should not change or impact the meaning. A

Declarativeness § § not procedural, "processing" should not change or impact the meaning. A representation is declarative if: § § the meanings of the statements are independent of the use made of the statements referential transparency also exists. Referential transparency exists when equivalent expressions can always be substituted for one another while preserving the truth value of the statements in which they occur. ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Knowledge Representation Methods Production Rules u Structured Objects u u Semantic Nets u Frames

Knowledge Representation Methods Production Rules u Structured Objects u u Semantic Nets u Frames u Logic ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Production Rule Representations § § Consists of <condition, action> pairs Agent checks if a

Production Rule Representations § § Consists of <condition, action> pairs Agent checks if a condition holds § § § If so, the production rule “fires” and the action is carried out This is a recognize-act cycle Given a new situation (state) § § § Multiple production rules will fire at once Call this the conflict set Agent must choose from this set § § Call this conflict resolution Production system is any agent § Which performs using recognize-act cycles ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Case Studies Production Rules § sample domains § § e. g. theorem proving, determination

Case Studies Production Rules § sample domains § § e. g. theorem proving, determination of prime numbers, distinction of objects (e. g. types of fruit, trees vs. telephone poles, churches vs. houses, animal species) suitability of production rules § basic production rules § § rules in ES/KBS § § § no salience, certainty factors, arithmetic e. g. CLIPS, Jess enhanced rules § procedural constructs § e. g. loops § objects § e. g. COOL, Java objects § fuzzy logic § e. g. Fuzzy. CLIPS, Fuzzy. J ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Advantages of Production Rules § § § simple and easy to understand straightforward implementation

Advantages of Production Rules § § § simple and easy to understand straightforward implementation in computers possible formal foundations for some variants ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Problems with Production Rules § § § simplementations are very inefficient some types of

Problems with Production Rules § § § simplementations are very inefficient some types of knowledge are not easily expressed in such rules large sets of rules become difficult to understand maintain ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Semantic Nets u u graphical representation for propositional information originally developed by M. R.

Semantic Nets u u graphical representation for propositional information originally developed by M. R. Quillian as a model for human memory labeled, directed graph nodes represent objects, concepts, or situations labels indicate the name u nodes can be instances (individual objects) or classes (generic nodes) u u links represent relationships the relationships contain the structural information of the knowledge to be represented u the label indicates the type of the relationship u ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Relationships § without relationships, knowledge is an unrelated collection of facts § reasoning about

Relationships § without relationships, knowledge is an unrelated collection of facts § reasoning about these facts is not very interesting § § inductive reasoning is possible relationships express structure in the collection of facts § this allows the generation of meaningful new knowledge § § generation of new facts generation of new relationships ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Types of Relationships § relationships can be arbitrarily defined by the knowledge engineer §

Types of Relationships § relationships can be arbitrarily defined by the knowledge engineer § § allows great flexibility for reasoning, the inference mechanism must know how relationships can be used to generate new knowledge § § inference methods may have to be specified for every relationship frequently used relationships § IS-A § § relates an instance (individual node) to a class (generic node) AKO (a-kind-of) § relates one class (subclass) to another class (superclass) ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Objects and Attributes § attributes provide more detailed information on nodes in a semantic

Objects and Attributes § attributes provide more detailed information on nodes in a semantic network § often expressed as properties § § combination of attribute and value attributes can be expressed as relationships § e. g. has-attribute ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Implementation Questions § simple and efficient representation schemes for semantic nets § § §

Implementation Questions § simple and efficient representation schemes for semantic nets § § § tables that list all objects and their properties tables or linked lists for relationships conversion into different representation methods § predicate logic § § § nodes correspond variables or constants links correspond to predicates propositional logic § nodes and links have to be translated into propositional variables and properly combined with logical connectives ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

OAV-Triples § object-attribute-value triplets § § can be used to characterize the knowledge in

OAV-Triples § object-attribute-value triplets § § can be used to characterize the knowledge in a semantic net quickly leads to huge tables Object Attribute Value Astérix profession warrior Obélix size extra large Idéfix size petite Panoramix wisdom infinite ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Problems Semantic Nets § expressiveness § § § no internal structure of nodes relationships

Problems Semantic Nets § expressiveness § § § no internal structure of nodes relationships between multiple nodes no easy way to represent heuristic information extensions are possible, but cumbersome best suited for binary relationships efficiency § § may result in large sets of nodes and links search may lead to combinatorial explosion § § especially for queries with negative results usability § § lack of standards for link types naming of nodes § classes, instances ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Frame u represents related knowledge about a subject u u frames are organized hierarchically

Frame u represents related knowledge about a subject u u frames are organized hierarchically u u provides default values for most slots allows the use of inheritance knowledge is usually organized according to cause and effect relationships u slots can contain all kinds of items u u rules, facts, images, video, comments, debugging info, questions, hypotheses, other frames slots can also have procedural attachments u procedures that are invoked in specific situations involving a particular slot uon creation, modification, removal of the slot value ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Simple Frame Example Slot Name Filler name Astérix height small weight low profession warrior

Simple Frame Example Slot Name Filler name Astérix height small weight low profession warrior armor helmet intelligence very high marital status presumed single ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Overview of Frame Structure § § two basic elements: slots and facets (fillers, values,

Overview of Frame Structure § § two basic elements: slots and facets (fillers, values, etc. ); typically have parent and offspring slots § § descriptive slots § § contain declarative information or data (static knowledge) procedural attachments § § used to establish a property inheritance hierarchy (e. g. , specialization-of) contain functions which can direct the reasoning process (dynamic knowledge) (e. g. , "activate a certain rule if a value exceeds a given level") data-driven, event-driven ( bottom-up reasoning) expectation-drive or top-down reasoning pointers to related frames/scripts - can be used to transfer control to a more appropriate frame ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

§ Slots each slot contains one or more facets § facets may take the

§ Slots each slot contains one or more facets § facets may take the following forms: § § values default § § range § § procedural attachment which specifies an action to be taken when a value in the slot is added or modified (data-driven, event-driven or bottom-up reasoning) if-needed § § what kind of information can appear in the slot if-added § § used if there is not other value present procedural attachment which triggers a procedure which goes out to get information which the slot doesn't have (expectation-driven; top-down reasoning) other § may contain frames, rules, semantic networks, or other types of knowledge ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ [Rogers 1999]

Usage of Frames § filling slots in frames § § § can inherit the

Usage of Frames § filling slots in frames § § § can inherit the value directly can get a default value these two are relatively inexpensive can derive information through the attached procedures (or methods) that also take advantage of current context (slot-specific heuristics) filling in slots also confirms that frame or script is appropriate for this particular situation ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ [Rogers 1999]

Restaurant Frame Example § generic template for restaurants § § § different types default

Restaurant Frame Example § generic template for restaurants § § § different types default values script for a typical sequence of activities at a restaurant ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Generic RESTAURANT Frame Generic Restaurant Frame Specialization-of: Business-Establishment Types: range: (Cafeteria, Fast-Food, Seat-Yourself, Wait-To-Be-Seated)

Generic RESTAURANT Frame Generic Restaurant Frame Specialization-of: Business-Establishment Types: range: (Cafeteria, Fast-Food, Seat-Yourself, Wait-To-Be-Seated) default: Seat-Yourself if-needed: IF plastic-orange-counter THEN Fast-Food, IF stack-of-trays THEN Cafeteria, IF wait-for-waitress-sign or reservations-made THEN Wait-To-Be-Seated, OTHERWISE Seat-Yourself. Location: range: an ADDRESS if-needed: (Look at the MENU) Name: if-needed: (Look at the MENU) Food-Style: range: (Burgers, Chinese, American, Seafood, French) default: American if-added: (Update Alternatives of Restaurant) Times-of-Operation: range: a Time-of-Day default: open evenings except Mondays Payment-Form: range: (Cash, Credit. Card, Check, Washing-Dishes-Script) Event-Sequence: default: Eat-at-Restaurant Script Alternatives: range: all restaurants with same Foodstyle ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ if-needed: (Find all Restaurants with the same Foodstyle)

Frame Advantages § fairly intuitive for many applications § § similar to human knowledge

Frame Advantages § fairly intuitive for many applications § § similar to human knowledge organization suitable for causal knowledge easier to understand than logic or rules very flexible ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Frame Problems § it is tempting to use frames as definitions of concepts §

Frame Problems § it is tempting to use frames as definitions of concepts § § not appropriate because there may be valid instances of a concept that do not fit the stereotype exceptions can be used to overcome this § § can get very messy inheritance § § not all properties of a class stereotype should be propagated to subclasses alteration of slots can have unintended consequences in subclasses ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Introduction to Logic § expresses knowledge in a particular mathematical notation All birds have

Introduction to Logic § expresses knowledge in a particular mathematical notation All birds have wings --> x. Bird(x) -> Has. Wings(x) § rules of inference § guarantee that, given true facts or premises, the new facts or premises derived by applying the rules are also true All robins are birds --> x Robin(x) -> Bird(x) § given these two facts, application of an inference rule gives: x Robin(x) -> Has. Wings(x) ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Logic and Knowledge § rules of inference act on the superficial structure or syntax

Logic and Knowledge § rules of inference act on the superficial structure or syntax of the first 2 formulas § § § major advantages of this approach § § § doesn't say anything about the meaning of birds and robins could have substituted mammals and elephants etc. deductions are guaranteed to be correct to an extent that other representation schemes have not yet reached easy to automate derivation of new facts problems § § computational efficiency uncertain, incomplete, imprecise knowledge ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Summary of Logic Languages § propositional logic § § § first-order logic § §

Summary of Logic Languages § propositional logic § § § first-order logic § § facts, objects, relations, times true/false/unknown probability theory § § § facts, objects, relations true/false/unknown temporal logic § § facts true/false/unknown facts degree of belief [0. . 1] fuzzy logic § § degree of truth degree of belief [0. . 1] ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Syntax of Propositional Logic § A BNF (Backus-Naur Form) grammar of sentences in propositional

Syntax of Propositional Logic § A BNF (Backus-Naur Form) grammar of sentences in propositional logic Sentence -> Atomic. Sentence | Complex. Sentence Atomic. Sentence -> True | False | P | Q | R |. . . Complex. Sentence -> (Sentence) | Sentence Connective Sentence | ~Sentence Connective -> ^ | V | <=> | => ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Modus Ponens § eliminates => (X => Y), X _______ Y § § §

Modus Ponens § eliminates => (X => Y), X _______ Y § § § If it rains, then the streets will be wet. It is raining. Infer the conclusion: The streets will be wet. (affirms the antecedent) ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Modus tollens (X => Y), ~Y ________ ¬X § § If it rains, then

Modus tollens (X => Y), ~Y ________ ¬X § § If it rains, then the streets will be wet. The streets are not wet. Infer the conclusion: It is not raining. NOTE: Avoid the fallacy of affirming the consequent: § § § If it rains, then the streets will be wet. The streets are wet. cannot conclude that it is raining. If Bacon wrote Hamlet, then Bacon was a great writer. cannot conclude that Bacon wrote Hamlet. ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Resolution § (X v Y), (~Y v Z) _________ (X v Z) basis for

Resolution § (X v Y), (~Y v Z) _________ (X v Z) basis for the inference mechanism in the Prolog language and some theorem provers ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Complexity issues § truth table enumerates 2 n rows of the table for any

Complexity issues § truth table enumerates 2 n rows of the table for any proof involving n symbol § § § it is complete computation time is exponential in n checking a set of sentences for satisfiability is NP-complete § § but there are some circumstances where the proof only involves a small subset of the KB, so can do some of the work in polynomial time if a KB is monotonic (i. e. , even if we add new sentences to a KB, all the sentences entailed by the original KB are still entailed by the new larger KB), then you can apply an inference rule locally (i. e. , don't have to go checking the entire KB) ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Predicate Logic § new concepts (in addition to propositional logic) § complex objects §

Predicate Logic § new concepts (in addition to propositional logic) § complex objects § § relations § § § terms predicates quantifiers syntax semantics inference rules usage ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Objects § distinguishable things in the real world § § frequently includes concepts §

Objects § distinguishable things in the real world § § frequently includes concepts § § people, cars, computers, programs, . . . colors, stories, light, money, love, . . . properties § describe specific aspects of objects § § green, round, heavy, visible, can be used to distinguish between objects ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Relations § § establish connections between objects relations can be defined by the designer

Relations § § establish connections between objects relations can be defined by the designer or user § § neighbor, successor, next to, taller than, younger than, … functions are a special type of relation § non-ambiguous: only one output for a given input ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Syntax § also based on sentences, but more complex § § constant symbols: A,

Syntax § also based on sentences, but more complex § § constant symbols: A, B, C, Franz, Square 1, 3, … § § stand for unique objects ( in a specific context) predicate symbols: Adjacent-To, Younger-Than, . . . § § sentences can contain terms, which represent objects describes relations between objects function symbols: Father-Of, Square-Position, … § the given object is related to exactly one other object ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Semantics § § provided by interpretations for the basic constructs § usually suggested by

Semantics § § provided by interpretations for the basic constructs § usually suggested by meaningful names constants § the interpretation identifies the object in the real world predicate symbols § the interpretation specifies the particular relation in a model § may be explicitly defined through the set of tuples of objects that satisfy the relation function symbols § identifies the object referred to by a tuple of objects § may be defined implicitly through other functions, or explicitly through tables ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Terms § § § logical expressions that specify objects constants and variables are terms

Terms § § § logical expressions that specify objects constants and variables are terms more complex terms are constructed from function symbols and simpler terms, enclosed in parentheses § § basically a complicated name of an object semantics is constructed from the basic components, and the definition of the functions involved § either through explicit descriptions (e. g. table), or via other functions ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Unification § an operation that tries to find consistent variable bindings (substitutions) for two

Unification § an operation that tries to find consistent variable bindings (substitutions) for two terms § § a substitution is the simultaneous replacement of variable instances by terms, providing a “binding” for the variable without unification, the matching between rules would be restricted to constants often used together with the resolution inference rule unification itself is a very powerful and possibly complex operation § in many practical implementations, restrictions are imposed § e. g. substitutions may occur only in one direction (“matching”) ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Atomic Sentences § § state facts about objects and their relations specified through predicates

Atomic Sentences § § state facts about objects and their relations specified through predicates and terms § § the predicate identifies the relation, the terms identify the objects that have the relation an atomic sentence is true if the relation between the objects holds § this can be verified by looking it up in the set of tuples that define the relation ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Complex Sentences § § logical connectives can be used to build more complex sentences

Complex Sentences § § logical connectives can be used to build more complex sentences semantics is specified as in propositional logic ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Quantifiers § can be used to express properties of collections of objects § §

Quantifiers § can be used to express properties of collections of objects § § eliminates the need to explicitly enumerate all objects predicate logic uses two quantifiers § universal quantifier § existential quantifier ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Universal Quantification § § states that a predicate P is holds for all objects

Universal Quantification § § states that a predicate P is holds for all objects x in the universe under discourse x P(x) the sentence is true if and only if all the individual sentences where the variable x is replaced by the individual objects it can stand for are true ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Existential Quantification § § states that a predicate P holds for some objects in

Existential Quantification § § states that a predicate P holds for some objects in the universe x P(x) the sentence is true if and only if there is at least one true individual sentence where the variable x is replaced by the individual objects it can stand for ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Horn clauses or sentences § class of sentences for which a polynomial-time inference procedure

Horn clauses or sentences § class of sentences for which a polynomial-time inference procedure exists § § § P 1 P 2 . . . Pn => Q where Pi and Q are non-negated atomic sentences not every knowledge base can be written as a collection of Horn sentences Horn clauses are essentially rules of the form § If P 1 P 2 . . . Pn then Q ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Similarity § § Despite everything, there are many similarities between the three knowledge representation

Similarity § § Despite everything, there are many similarities between the three knowledge representation schemes. All express a binary relationship between two objects: entity-attribute-triples in production rules, instance-slot-filler in structured objects, and relationship between two parameters in predicate logic. ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Similarity § § § Production rules and structured objects are considered more object centered,

Similarity § § § Production rules and structured objects are considered more object centered, while logic is considered more relationship centered, but we can map from one to the other. Predicate logic makes is easier to represent non-binary relationships, other formalisms require the creation of a linking entity. Frames overcome some of the complexity by grouping like information together). ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Similarity § § With respect to the first three criteria (metaphysical, epsitemic, and heuristic)

Similarity § § With respect to the first three criteria (metaphysical, epsitemic, and heuristic) each representation scheme is adequate. With respect to the fourth criteria (computational tractability), Predicate logic has some unique qualities (discuss shortly). ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Production Rules § High notational convenience. § § Programmers are very comfortable working with

Production Rules § High notational convenience. § § Programmers are very comfortable working with production rules. More expert systems have used production rules than other knowledge representation schemes ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Structured Objects § The biggest problem is default reasoning, which creates a great deal

Structured Objects § The biggest problem is default reasoning, which creates a great deal of trouble. § § the ability to "inherit properties" from object more highly placed in the hierarchy Ironically, the ability to handle default reasoning was part of the initial attraction of these representation ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Structured Objects § § § When we attempt to implement "exception processing" we lose

Structured Objects § § § When we attempt to implement "exception processing" we lose the ability to express universal truths! Not much use to have a knowledge base that cannot express universal truths within its domain! Best problems such as taxonomizing. ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Predicate Logic § § § Special issues with respect to computational tractability. We limit

Predicate Logic § § § Special issues with respect to computational tractability. We limit Logic Representation to Horn Clauses so that logic more computationally tractable. The question is whether or not we lost "expressiveness" by limiting to Horn clauses. ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Predicate Logic § Limit predicate calculus in two ways: 1. only one literal on

Predicate Logic § Limit predicate calculus in two ways: 1. only one literal on the left hand side of the clause 2. cannot have negated literals ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Predicate Logic - One Problem: § Treat negation as failure. § § This a

Predicate Logic - One Problem: § Treat negation as failure. § § This a closed world assumption § § conclude that a literal is false unless we show it to be true. when all our predicates are taken together we know the necessary conditions for the truth of the predicate. This seems reasonable, but consider trying to enumerate the conditions for things like: birds that don't fly, etc. ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Predicate Logic § With negation as failure § § must know how our knowledge

Predicate Logic § With negation as failure § § must know how our knowledge base is going to be used (what sort of deductions it must make) so that we present the predicates properly (we may need to order them in a particular way). Difficult to envision every eventuality. Loose the declarative nature of logic. Can no longer interpret the knowledge "neutrally". ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Predicate Logic - Second Problem: § Lose the non-monotonic nature of the reasoning process.

Predicate Logic - Second Problem: § Lose the non-monotonic nature of the reasoning process. § § § In a monotonic system if a certain conclusion can be drawn from a body of evidence, then adding to the evidence cannot prevent the conclusion from being drawn. KB |- P then KB + delta |- P for any delta. By interpreting negation as failure, we lose the nonmonotonic nature that classical logic allows us. ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Predicate Logic § § Structured objects using an inheritance property appear to avoid this

Predicate Logic § § Structured objects using an inheritance property appear to avoid this issue, but the problems of default values in reasoning leads to another set of problems. With respect to Predicate Logic, can conclude that its expressiveness is adequate, but be aware of the limitations. ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Predicate Logic § § There are similar problems with the other knowledge representation schemes

Predicate Logic § § There are similar problems with the other knowledge representation schemes with respect to negation. What is meant by the absence of a relationship between to objects in a semantic network? § § Is there NO relationship or simply lack of knowledge about the existence of a relationship. With the closed-world assumption, the lack of link means that the relationship does not exist. ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Choosing a way to represent knowledge § The nature of the search space §

Choosing a way to represent knowledge § The nature of the search space § The nature of the data § The nature of the knowledge ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

The nature of the search space § If some basic problem solving approach will

The nature of the search space § If some basic problem solving approach will work (i. e. a brute force approach that explicitly examines all alternatives), then use it! § If the problem space is relatively small and data and rules are reliable, exhaustive search via Prolog or Lisp may be best. ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

The nature of the search space § Consider ways to factor the search space.

The nature of the search space § Consider ways to factor the search space. § § ”Pruning" branches that are unlikely Decomposing the domain into independent components that can be processes separately ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

The nature of the data § § If the data has some inherent structure

The nature of the data § § If the data has some inherent structure to it, you may be able to fit it to a structured object representation easily. Static knowledge is generally easier to use with structured objects than dynamic knowledge (dynamic knowledge changes during the execution of the program). ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

The nature of the data § § Consider use multiple representation schemes to represent

The nature of the data § § Consider use multiple representation schemes to represent all of the knowledge. Be careful how you organize the knowledge in the knowledge base. § § ”Declarativeness", is rarely achieved. Therefore, when executing the system, the ordering of knowledge within the knowledge base may affect the solution, certainly the solution path. ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

The nature of the knowledge § Is the reasoning along the lines of this

The nature of the knowledge § Is the reasoning along the lines of this and that and this other thing suggest A § § production rules with certainty factors are in order Or is it more categorical § as with standard logic ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ

Summary § § Despite all the work being done on knowledge representation, there is

Summary § § Despite all the work being done on knowledge representation, there is relatively little advice on how to pick a knowledge representation scheme. Even when using a shell, do not ignore the differences between knowledge representation schemes, otherwise you may end up with an unusable expert systems. ﺩﻛﺘﺮ ﻛﺎﻫﺎﻧﻲ - ﺳﻴﺴﺘﻤﻬﺎﻱ ﺧﺒﺮﻩ ﻭ ﻣﻬﻨﺪﺳﻲ ﺩﺍﻧﺶ