1 / 29

Knowledge Representation

Knowledge Representation. Representations and mappings. To solve complex problems in AI , large amount of knowledge and mechanisms to manipulate the knowledge is also required Deals with 2 different kinds of entities Facts: truth in some relevant world. Needs to be represented

jessescott
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. Representations and mappings • To solve complex problems in AI , large amount of knowledge and mechanisms to manipulate the knowledge is also required • Deals with 2 different kinds of entities • Facts: truth in some relevant world. Needs to be represented • Representation of facts in some chosen formalism. Can be manipulated • These entities can be structured at two levels • Knowledge level- facts are described • Symbol level-objects at knowledge level are defined in terms of symbols that can be manipulated

  3. Representations and mappings Cont.. • There is a two way mapping that exist between facts and their representations.. These links are called representation mapping. • In order to get information into and out of the system we need the English representation of facts

  4. Representations and mappings Cont.. Example English sentence: Spot is a dog Logic representation: Dog(spot) English sentence: All dogs have tails Logic representation: x:dog(x)->hastail(x) • Using deductive mechanism of logic we can generated new representation object.-hastail(spot) • Using backward mapping –English sentence can be generated- spot has tail • Mapping functions are not one to one but are many to many relations • For example all dogs have tail and every dog has a tail represent the same facts that every dog has at least one tail or the fact that there is a tail that every dog has.

  5. Representations and mappings Cont.. • A good representation makes the operation of a reasoning program not only correct but trivial. • 3 ways in which the problem can be represented

  6. Representations and mappings Cont.. • If a good mapping cannot be defined for a problem then even a good program cannot produce answers that corresponds to real answers • In data type design it is expected that the backward representation mapping is a function (i.e every representaion corresponds to only one fact and that it is onto(i.e there is atleast one representation of every fact. • Unfortunately in many AI domains it may not be possible to come up with such representation mapping

  7. Approaches to knowledge representation • A good system for the representation of knowledge in a paticular domain should posses following properties • Representational adequacy- The ability to represent all of the kinds of knowledge that are needed in that domain. • Inferential adequacy-The ability to manipulate the knowledge structure to derive new knowledge structure • Inferential effeciency- The ability to incorporate into the knowledge structure additional information for better inference mechanisms • Acquisitional efficiency-The ability to acquire new information easily.

  8. Approaches to knowledge representation cont.. Simple Relational knowledge • Representing declarative facts as a set of relations • These facts standing alone provides weak inferential capabilities • These representations may serve as input to powerful inference engines

  9. Approaches to knowledge representation cont.. Inheritable knowledge Semantic network or collection of frames

  10. Approaches to knowledge representation cont.. • It is possible to enhance the basic representation with inference mechanism that operate on the structure of the representation • The structure must be designed to correspond to the inference mechanism that is desired. • One of the most useful forms of inference is property inheritance where elements of specific classes inherit attributes and values from more general classes. • Each individual frame consist of the collection of attributes and values associated with a particular node,

  11. Approaches to knowledge representation cont.. Algorithm : Property inference To retrieve a value V for attribute A of an instance Object O • Find O in the knowledge base • If there is a value there for the attributes A , report that value. • Otherwise, see if there is a value for the attribute instance, if not then fail. • Otherwise, move to the node corresponding to that value and look for a value for the attribute A. If one is found report it. • Otherwise, do until there is no value for the isa attribute or until an answer is found: • Get the value of the isa attribute and move to that node. • See if there is a value for the attribute A . If there is report it.

  12. Approaches to knowledge representation cont.. Examples • Team(pee-wee-Reese)= Brooklyn-Dodgers • Batting-average(Three-Finger-Brown)=106 • height(pee-wee-Reese)=6-1 • Bats(Three-finger-Brown)= Right • Produces default values

  13. Approaches to knowledge representation cont.. Inferential Knowledge • Use of predicate logic to represent additional inferential knowledge about base ball. • Along with the knowledge an inference procedure that can exploit the procedures is also required • Commonly used procedure resolution. • Example • x: Ball(x) ^Fly(x)^Fair(x)^infield-catchable(x)^ Occupied_Base(First) ^Occupied_Base(Second)^ (Outs<2) ^  [Line-Drive(x)  Attempted-Bt(x) ->infield-Fly(x) x,y=Batter(x)^batted(x,y)^ infield-fly(y)->out(x)

  14. Approaches to knowledge representation cont.. Procedural Knowledge • Specifies what to do when • Many ways of representing it , most common way is through codes in programming languages like LISP. • Disadvantages • Inferential adequacy-Difficult to write programs that can reason about another programs behavior • Acquisitional efficiency- process of updating and debugging large piece of code is difficult

  15. Approaches to knowledge representation cont.. • Baseball Player Lisp Code Isa:Adult-Male Bats: (lambda(x) (prog() L1 (cond((caddr x)(return(caddr x))) (t(setq x (eval(cadr x))) (cond (x(go L1) (t (return nil)))))) Height:6-1 Batting-average:.252 • Production rules is the most commonly used technique for representing procedural knowledge in AI. If: ninth inning , and score is close, and less than 2 outs, and first base is vacant, and batter is better than next batter, Then: walk the batter

  16. Issues in Knowledge Representation 1.Important Attributes • 2 attributes of general significance-instance and isa • Support property inheritance • These attributes should be handled appropriately in each mechanism 2.Relationships among attributes • The attributes that are used to describe objects are themselves entities and are represented • The properties that they posses in addition to the specific knowledge are • Inverses • Esxistence in an isa hierarchy • Techniques for reasoning about values • Single-valued attribute

  17. Issues in Knowledge Representation cont.. Inverses • Entities in the world are related to each other in many ways • Attributes are relationships that focus on one objects and show binary relation between that object and others • If the focus is on the object representing the value then the representation is different. • There are two ways of doing this • Represent both relationships as a single relationship that ignores focus. • Logical representations usually interpret it this way • Example: team(pee-wee-Resse, Brooklyn-Dodgers) • Use attributes that focus on a single entity but to use them in pairs one the inverse of the other. • Example – here the team information is represented with 2 atrtributes Associated with Pee Wee Reese: Team= Brooklyn-Dodgers. Associated with Brooklyn Dodgers Team members= Pee wee Reese,… This approach is taken in semantic net and frame based system. When ever a value is added to an attribute the corresponding value is added to inverse.

  18. Issues in Knowledge Representation cont.. An isa hierarchy of attributes • Just as there are classes of objects and specialized subsets of those classes there are attributes and specialization of attributes • Example: attribute height is a specialization of the general attribute physical attribute which in turn is a specialization of the attribute physical attribute • Support inheritance- help inheriting information about things such as constraints on values that attributes can have and mechanisms of computing these values. Techniques for reasoning about values • Sometimes values are specified explicitly. • Reasoning system must reason about values not specified explicitly • Information that can play a role in this reasoning are • Information about the type of the value. Example height should be number • Constraints on the values, often stated interms of related entities. Example a persons age sholuld not exceed the age of their parents • Rules for computing the values. Called backward rules or if needed rules • Rules that describes actions to be taken when a value is known. Called forward rules or if- added rules

  19. Issues in Knowledge Representation cont.. Single valued Attributes • Attribute is guaranteed to take a unique value. Example height of a base ball player • If the value changes the world has changed or there is a contradiction in the knowledge base that needs to be resolved. • Support provided by knowledge based system are • Introduce a separate notation for temporal interval. If two different values are asserted for the same temporal interval signal a contradiction. • Assume the only temporal interval is now. If a new value is asserted replace old value • Provide no explicit support. Logic bases system belongs to this category. Axioms may be added to specify only one value

  20. Issues in Knowledge Representation cont.. 3.Choosing the granularity of representation • Should there be a small number of low level primitives or should there be a larger number covering a range of granularities. • Example: John spotted sue • Represented as spotted(agent(John),object(sue)) Who spotted sue? Can answer Did John see sue? Cannot answer. • Facts can be modified as • Spotted(x,y)->saw(x,y) • Saw(agent(John)),Object(sue),time span(briefly)) • Major advantage in converting all statements in terms of a small set of primitives is that the rules are written only in terms of primitives and not based how the knowledge may have appeared. • Arguments against low level primitives • Requires a lot of storage. • Example representation of the statement John punched Mary.

  21. Issues in Knowledge Representation cont.. 2.The detailed primitive representation may not be necessary 3. In many domains primitives are not clear. Example1 If the primitives are father mother,son daughter, brother, and sister. Mary is sue’s cousin

  22. Issues in Knowledge Representation cont.. Example 2: John broke the window. • Choosing the correct granularity of representation is not easy. • Lower the level we choose inference required is lesser but conference required to create representation from English is more 4. Representing Sets of Objects • It is important to be able to represent set of objects • There are some properties that are true of sets but are not true of the individual members of a set • Example:-” There are more sheep than people in Australia”, “English speakers can be found all over the world”. • Facts can be represented by attaching assertion to the sets representing people, sheep and English speakers. Since No single English speaker is found all over the world. • If property is true for all elements of the set then it is more efficient to associate it once with the set. Example : Large(elephant) • When we represent sets we should consider uses of both set level representation • Example when we assert large(Elephant) it must be clear whether the set itself is large or anything that is an elephant is large.

  23. Issues in Knowledge Representation cont.. • There are 3 ways in which the sets may be represented. • By name • It helps predicates to be associated with sets • Does not provide any information about the set. • Example: base ball player was the name of the set and Ball and Batter were the predicates used • There are two ways to define a set with its elements • Extensional definition- List the members • example sun’s planet on which people live {Earth} • Intensional definition- Specify rule that returns true or false depending on whether the object is present or not. • example sun’s planet on which people live {x:sun-planet(x)^ human-inhabited(x)}

  24. Issues in Knowledge Representation cont.. Difference between intentional and extensional definitions • Do not have a one to one correspondence. • Intentional representations have 2 important properties that extensional representation lack • Can be used to describe infinite sets and sets whose elements are not explicitly known. Example prime numbers , kings of England • Allow to depend on parameters that can change such as time or spatial location example president(t). 5.Finding the right structures as needed • It is a problem of locating the appropriate knowledge structure that have been stored in memory. • To access the right structure for describing a particular situation, the following problems needs to be solved • How to perform an initial selection of the most appropriate structure • How to fill appropriate details from the current situation • How to find a better structure if the current one is not appropriate • When to create and remember a new structure

  25. Issues in Knowledge Representation cont.. Selecting an initial structure • Index by significant English words that can describe them • Example let every verb have with it an associated structure. • This approach may not be adequate since • some words have several distinct meaning Example : John flew to New York, John flew a kite, John flew into a rage,. • Only useful when there is an English description of the problem to be solved • Consider each major concept as a pointer to all of the structures in which it is involved. • This may produce several sets of prospective structures • Example: the concept Bill might point to a shopping or a restaurant • Take the intersection of these structures with the content of the word and choose on structure that is most appropriate. • Problems • If the problem description contains even one extraneous concept then the intersection of the associated structure will be empty. For ex John rode to steak and Ale. • Computing all possibility sets and intersecting them. If done parallely can produce an answer in reasonable time

  26. Issues in Knowledge Representation cont.. • Locate one major clue in the problem description and select an initial structure. • As other clues appear refine the initial selection or make a new selection • Problem • Some situations clues are not easily identifiable. • To anticipate which clues are important. The importance of the clue changes from one situation to another. Revising the choice when necessary. • Once a candidate knowledge structure is found a detail match of it to the problem at hand must be done. • Details of matching process will vary from variables to attributes or values that satisfy required restriction which may be placed in structure in appropriate places. • If values are not found structure has to change. If values are appropriate current structure can be taken. But the situation may change

  27. Issues in Knowledge Representation cont.. • When the process run to a snag. It is not often necessary to abandon the effort and start over rather various things can be tried. • Select the fragments of the current structure that do correspond to the situation and match them against candidate alternatives. Chose the best match. • Make and excuse for the current structures failure and continue to use it. For example proposed chair with 3 legs might have the fourth leg broken, or may there is another object in front of it blocking the view. • Refer to specific stored links between structure to suggest new directions. • If the knowledge structures are stored in an isa hierarchy then traverse upward in it until a structure is found that does not conflict the evidence.

  28. The Frame problem • Another issue of concern is how to efficiently represent the sequences of problem states that arise from search process. • There are many object and relationship in this world and a state description must include facts like on(plant12,Table 34),under(table34,window 13). • One strategy is to store each state description with a list of facts. • During problem solving description is very long. • Most of the facts do not change but are still represented at each node. Example above(ceiling ,floor) • The problem of representing the facts that will change and those that do not is known as the frame problem • Example: robot world- a table under the window with a plant on it, if the table is moved the plant may move not the window. If an object is moved color does not change. • To support this kind of reasoning some systems make use of frame axioms such as color(x,y,s1)^ move(x,s2,s2)->color(x,y,s2)

  29. The Frame problem cont.. • A changing problem state can be represented by starting with the description of the initial state and then making changes to the description as indicated by the rules we apply. • Solves the problem of wasted space and copying information to each node. • When a search has to backtrack all the changes that were made are ignored. • There are two way to know what changes need to be undone. • Do not modify initial state description. At each node store the specific changes that should be made at this node. In this method backtracking is easy but referring to state description is complex. • Modify the initial state description but also at each node record steps to undo the move. • It is sometimes necessary to remember the time at which the fact was true this indication is called state variable.

More Related