1 / 94

KNOWLEDGE REPRESENTATION

KNOWLEDGE REPRESENTATION. K nowledge Representation (KR), as the name implies, is the theory and practice of representing knowledge for computer systems . By that we mean concise representations for knowledge in a form that’s directly manipulatable by software .

wesley
Download Presentation

KNOWLEDGE REPRESENTATION

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. KNOWLEDGE REPRESENTATION

  2. Knowledge Representation (KR), as the name implies, is the theory and practice of representing knowledge for computer systems. • By that we mean concise representations for knowledge in a form that’s directly manipulatable by software. • This is an important distinction because representing knowledge is only useful if there’s some way to manipulate the knowledge and infer from it.

  3. INTRODUCTION • From the perspective of Strong AI, KR is concerned with the cognitive science behind representing knowledge. • How, for example, do people store and manipulate information? • Many of the early representation schemes resulted from this research, such as frames and semantic networks.

  4. This chapter will explore the various schemes for the representation of knowledge, from the early representation methods to present-day methods such as the Semantic Web. • We’ll also explore some of the mechanisms for the communication of knowledge, as would be used in multi-agent systems.

  5. TYPES OF KNOWLEDGE • While a large taxonomy of the varying types of knowledge, could be created we’ll focus on two of the most important, declarative and procedural. • Declarative (or descriptive) knowledge is the type of knowledge that is expressed as declarations of propositions (or factual knowledge). • On the other hand, procedural knowledge is expressed as the knowledge of achieving some goal (for example, how to perform a given task).

  6. Procedural knowledge is commonly represented using productions, and is very easy to use but difficult to manipulate. • Declarative knowledge can be represented as logic, and is simpler to manipulate, but is more flexible and has the potential to be used in ways beyond the original intent.

  7. THE ROLE OF KNOWLEDGE • From the context of AI, representing knowledge is focused on using that knowledge to solve problems, and the implication that knowledge is more than just factual information. • Therefore, the manner in which the knowledge is stored is important. • For example, we can store knowledge in a human readable form and use it (such as this book), but knowledge stored in this form is not readily useful by AI.

  8. Therefore, the knowledge must be stored in a way that makes it possible for AI to search it, and if necessary, infer new knowledge from it. • The primary goal of knowledge representation is to enable an intelligent entity (program) with a knowledge base to allow it to make intelligent decisions about its environment.

  9. This could embody an embodied agent to know that fire is hot (and it should be avoided), or that water in certain cases can be used to douse a fire to make it passable. • It could also be used to reason that repeated attempts to log in to a secure address is potentially an attempt to hack a device, and that the peer address associated with this activity could be monitored on other activities.

  10. 1) SEMANTIC NETWORKS • Semantic networks are a useful way to describe relationships between a numbers of objects. • This is similar to an important feature of human memory, where there exists a large number of relations. • Consider the concept of free association. • This technique was developed by Sigmund Freud, where the patient continually relates concepts given a starting seed concept.

  11. The technique assumed that memories are arranged in an associative network, which is why thinking of one concept can lead to many others. • The idea behind free association is that during the process, the patient will eventually stumble across an important memory.

  12. Consider the example shown in Figure 5.1. • This simple semantic network contains a number of facts and relationships between that knowledge. • Typical semantic networks use the “IS_A” and “AKO” (A Kind Of) relation to link knowledge. • As shown here, we’ve updated the relationships to provide more meaning to the network. • The rectangles in the network represent objects, and the arcs represent relationships.

  13. Here we can see that two capital cities are shown, and are capitals on the same continent. • One capital is of a state of the United States, while another is of Venezuela. • Simple relations also show that two cities of New Mexico are Albuquerque and Santa Fe.

  14. The interesting characteristic of semantic networks is that they have the ability to represent a large number of relationships between a large numbers of objects. • They can also be formed in a variety of ways, with varying types of relationships. • The construction of the semantic network is driven by the particular application.

  15. An interesting example of a semantic network is the Unified Modeling Language, or UML. • UML is a specification for object modeling in a graphical notation. • It’s a useful mechanism to visualize relationships of large and complex systems, and includes the ability to translate from a graphical form (abstract model) to a software form.

  16. 2) FRAMES • Frames, as introduced by Marvin Minsky, are another representation technique that evolved from semantic networks (frames can be thought of as an implementation of semantic networks). • But compared to semantic networks, frames are structured and follow a more object-oriented abstraction with greater structure. • The frame-based knowledge representation is based around the concept of a frame, which represents a collection of slots that can be filled by values or links to other frames (see Figure 5.2).

  17. An example use of frames is shown in Figure 5.3. • This example includes a number of different frames, and different types of frames. • The frames that are colored gray in Figure 5.3 are what are called generic frames. • These frames are frames that describe a class of objects. • The single frame which is not colored is called an instance frame.

  18. This frame is an instance of a generic frame. • Note also the use of inheritance in this example. • The Archer generic frame defines a number of slots that are inherited by generic frames of its class. • For example, the Longbowman generic frame inherits the slots of the Archer generic frame. • Therefore, while the weapon slot is not defined in the Longbowman frame, it inherits this slot and value from the Archer frame.

  19. Similarly, ‘john’ is an instance of the Longbowman frame, and inherits the ‘weapon’ slot and value as well. • Note also the redefinition fo the ‘defense’ slot value. • While a frame may define a default value for this slot, it may be overridden by the instance frame.

  20. Finally, in this example, we also relate generic frames through comparison. • We define that an instance of an Archer is strong against an instance of the Pikeman frame. • What makes frames different than semantic networks are the active components that cause side effects to occur when frames are created, manipulated, or removed.

  21. There are even elements that control actions for slot-level manipulations. • These can be thought of as triggers, but are also referred to as Demons. • Adding triggers to a frame representation language is called procedural attachement and is a way to include inferential capabilities into the frame representation (see Table 5.1).

  22. TABLE 5.1: Procedural attachments for use in frames.

  23. An example of this is shown in Listing 5.1. • In this example, we define some of the frames shown in Figure 5.3. • With frames (in iProlog), we can define ranges for some of the needed parameters (such as defense), and if the value falls outside of this range, indicate this issue to console. • This allows the frames to not only include their own metadata, but also their own selfchecking to ensure that the frames are correct and consistent.

  24. LISTING 5.1: Frame examples with iProlog.

  25. An extension of the frame concept is what are called scripts. • A script is a type of frame that is used to describe a timeline. • For example, a script can be used to describe the elements of a task that require multiple steps to be performed in a certain order.

  26. 3) PROPOSITIONAL LOGIC • Propositional Logic, also known as sentential logic, is a formal system in which knowledge is represented as propositions. • Further, these propositions can be joined in various ways using logical operators. • These expressions can then be interpreted as truth-preserving inference rules that can be used to derive new knowledge from the old, or test the existing knowledge.

  27. First, let’s introduce the proposition. • A propositionis a statement, or a simple declarative sentence. • For example, “lobster is expensive” is a proposition. • Note that a definition of truth is not assigned to this proposition; it can be either true or false. • In terms of binary logic, this proposition could be false in ชลบุรี, but true in เลย.

  28. But a proposition always has a truth value. • So, for any proposition, we can define the true-value based on a truth table (see Figure 5.4). • This simply says that for any given proposition, it can be either true or false.

  29. We can also negate our proposition to transform it into the opposite truth value. • For example, if P (our proposition) is “lobster is expensive,” then ~P is “lobster is not expensive.” • This is represented in a truth table as shown in Figure 5.5.

  30. Propositions can also be combined to create compound propositions. • The first, called a conjunction, is true only if both of the conjuncts are true (P and Q). • The second called a disjunction, is true if at least one of the disjuncts are true (P or Q). • The truth tables for these are shown in Figure 5.6. • These are obviously the AND and OR truth tables from Boolean logic.

  31. The power of propositional logic comes into play using the conditional forms. • The two most basic forms are called Modus Ponensand Modus Tollens. • Modus Ponens is defined as: P, (P->Q), infer Q • which simply means that given two propositions (P and Q), if P is true then Q is true.

  32. In English, let’s say that P is the proposition “the light is on” and Q is the proposition “the switch is on.” • The conditional here can be defined as: if “the light is on” then “the switch is on” • So, if “the light is on” is true, the implication is that “the light is on.” • Note here that the inverse is not true.

  33. Just because “the switch is on,” doesn’t mean that “the light is on.” • This is a piece of knowledge that gives us some insight into the state of the switch of which we know the state of the light. • In other words, using this rule, we have a way to syntactically obtain new knowledge from the old.

  34. In these examples, we can think of P as the antecedent, and Q as the consequent. • Using the if/then form, the conditional portion of the claim is the antecedent and the claim following the ‘then’ is the consequent. • The truth table for Modus Ponens is shown in Figure 5.7.

  35. Modus Ponens

  36. Modus Tollens takes the contradictory approach of Modus Ponens. • With Modus Tollens, we assume that Q is false and then infer that the P must be false. • Modus Tollens is defined as: P, (P->Q), not Q, therefore not P.

  37. Returning to our switch and light example, we can say “the switch is not on,” therefore “the light is not on.” • The formal name for this method is proof by contrapositive. • The truth table for Modus Tollens is provided in Figure 5.8. • TIP To help make sense of the names, Modus Ponens is Latin for “mode that affirms,” while Modus Tollens is Latin for the “mode that denies.”.

  38. Modus Tollens

  39. A famous inference rule from propositional logic is the hypothetical syllogism. • This has the form: ((P->Q) ^ (Q->R), therefore (P->R) • In this example, P is the major premise, Q is the minor premise. • Both P and Q have one common term with the conclusion, P->R.

  40. The most famous use of this rule, and the ideal illustration, is provided below: Major Premise (P): All men are mortal. Minor Premise (Q): Socrates is a man. Conclusion: Socrates is mortal. • Note in this example that both P and Q share a common term (men/man) and the Conclusion shares a term from each (Socrates from Q, and mortal from P).

  41. Propositional logic includes a number of additional inference rules (beyond Modus Ponens and Modus Tollens). • These inferences rules can be used to infer knowledge from existing knowledge (or deduce conclusions from an existing set of true premises).

  42. Deductive Reasoning with Propositional Logic • In deductive reasoning, the conclusion is reached from a previously known set of premises. • If the premises are true, then the conclusion must also be true. • Let’s now explore a couple of examples of deductive reasoning using propositional logic.

  43. As deductive reasoning is dependent on the set of premises, let’s investigate these first. • 1) If it’s raining, the ground is wet. • 2) If the ground is wet, the ground is slippery. • The two facts (knowledge about the environment) are Premise 1 and Premise 2.

  44. These are also inference rules that will be used in deduction. • Now we introduce another premise that it is raining. • 3) It’s raining.

  45. Now, let’s prove that it’s slippery. • First, using Modus Ponens with Premise 1 and Premise 3, we can deduce that the ground is wet: • 4) The ground is wet. (Modus Ponens: Premise 1, Premise 3)

More Related